[openssl-commits] [openssl] OpenSSL_1_1_0-stable update
paul.dale at oracle.com
paul.dale at oracle.com
Tue Jul 31 03:19:04 UTC 2018
The branch OpenSSL_1_1_0-stable has been updated
via 35fa31cc9d480dcd5108d17ccf8dc576bee20f09 (commit)
from 34515e8f88e57c13cdf2b1d4ec094ffd4e9f8d94 (commit)
- Log -----------------------------------------------------------------
commit 35fa31cc9d480dcd5108d17ccf8dc576bee20f09
Author: Pauli <paul.dale at oracle.com>
Date: Tue Jul 31 11:37:05 2018 +1000
Check conversion return in ASN1_INTEGER_print_bio.
Also streamline the code by relying on ASN1_INTEGER_to_BN to allocate the
BN instead of doing it separately.
Reviewed-by: Tim Hudson <tjh at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6821)
(cherry picked from commit 35c9408108f3608eb572acd7f64a93cf4f43f4f6)
-----------------------------------------------------------------------
Summary of changes:
crypto/ts/ts_lib.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/crypto/ts/ts_lib.c b/crypto/ts/ts_lib.c
index de36e0e..ce2e12c 100644
--- a/crypto/ts/ts_lib.c
+++ b/crypto/ts/ts_lib.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -22,10 +22,9 @@ int TS_ASN1_INTEGER_print_bio(BIO *bio, const ASN1_INTEGER *num)
int result = 0;
char *hex;
- num_bn = BN_new();
+ num_bn = ASN1_INTEGER_to_BN(num, NULL);
if (num_bn == NULL)
return -1;
- ASN1_INTEGER_to_BN(num, num_bn);
if ((hex = BN_bn2hex(num_bn))) {
result = BIO_write(bio, "0x", 2) > 0;
result = result && BIO_write(bio, hex, strlen(hex)) > 0;
More information about the openssl-commits
mailing list