summaryrefslogtreecommitdiff
path: root/Cryptlib/OpenSSL/crypto/asn1/t_x509.c
diff options
context:
space:
mode:
authorGary Lin <glin@suse.com>2016-07-21 12:28:11 +0800
committerPeter Jones <pjones@redhat.com>2016-09-06 15:05:36 -0400
commit8dcfecc6c76effa8afe0d4b6eca95023d51f1e03 (patch)
tree42c00f22bb1e6c668703bd83939f30dda01ad7e6 /Cryptlib/OpenSSL/crypto/asn1/t_x509.c
parentd8b0e8e0ce347d9f5830cfeb3fd09a887a903d09 (diff)
downloadefi-boot-shim-8dcfecc6c76effa8afe0d4b6eca95023d51f1e03.tar.gz
efi-boot-shim-8dcfecc6c76effa8afe0d4b6eca95023d51f1e03.zip
Update to openssl 1.0.2h
Signed-off-by: Gary Lin <glin@suse.com>
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/asn1/t_x509.c')
-rw-r--r--Cryptlib/OpenSSL/crypto/asn1/t_x509.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Cryptlib/OpenSSL/crypto/asn1/t_x509.c b/Cryptlib/OpenSSL/crypto/asn1/t_x509.c
index 8aab5513..8888396f 100644
--- a/Cryptlib/OpenSSL/crypto/asn1/t_x509.c
+++ b/Cryptlib/OpenSSL/crypto/asn1/t_x509.c
@@ -140,7 +140,8 @@ int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags,
goto err;
bs = X509_get_serialNumber(x);
- if (bs->length <= (int)sizeof(long)) {
+ if (bs->length < (int)sizeof(long)
+ || (bs->length == sizeof(long) && (bs->data[0] & 0x80) == 0)) {
l = ASN1_INTEGER_get(bs);
if (bs->type == V_ASN1_NEG_INTEGER) {
l = -l;