diff options
author | Parménides GV <parmegv@sdf.org> | 2014-12-20 12:06:03 +0100 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2014-12-20 12:06:03 +0100 |
commit | 5f6cb652dbd2ef0879673cf7338520dc2be236b9 (patch) | |
tree | bc47c8ccbcd48bfc5aee6b404c8ef3f1d9a359cb /app/openssl/crypto/ec/ec_ameth.c | |
parent | 576b0c26baf9b5b1418650a572604325ca7fb3af (diff) | |
parent | f347c871d0433ef3efb85beb5e386b58d700faad (diff) |
Merge branch 'develop'
Diffstat (limited to 'app/openssl/crypto/ec/ec_ameth.c')
-rw-r--r-- | app/openssl/crypto/ec/ec_ameth.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/app/openssl/crypto/ec/ec_ameth.c b/app/openssl/crypto/ec/ec_ameth.c index f715a238..11283769 100644 --- a/app/openssl/crypto/ec/ec_ameth.c +++ b/app/openssl/crypto/ec/ec_ameth.c @@ -453,14 +453,16 @@ static int do_EC_KEY_print(BIO *bp, const EC_KEY *x, int off, int ktype) if (ktype > 0) { public_key = EC_KEY_get0_public_key(x); - if ((pub_key = EC_POINT_point2bn(group, public_key, - EC_KEY_get_conv_form(x), NULL, ctx)) == NULL) + if (public_key != NULL) { - reason = ERR_R_EC_LIB; - goto err; - } - if (pub_key) + if ((pub_key = EC_POINT_point2bn(group, public_key, + EC_KEY_get_conv_form(x), NULL, ctx)) == NULL) + { + reason = ERR_R_EC_LIB; + goto err; + } buf_len = (size_t)BN_num_bytes(pub_key); + } } if (ktype == 2) |