Fix EC_KEY_print so it prints out private key information
even when the public key is not present in an EC_KEY Reviewed-by: Stephen Henson <steve@openssl.org>
This commit is contained in:
parent
141d7325e7
commit
82f52631b2
1 changed files with 1 additions and 1 deletions
|
@ -345,7 +345,7 @@ static int do_EC_KEY_print(BIO *bp, const EC_KEY *x, int off, ec_print_t ktype)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ktype != EC_KEY_PRINT_PARAM) {
|
if (ktype != EC_KEY_PRINT_PARAM && EC_KEY_get0_public_key(x) != NULL) {
|
||||||
publen = EC_KEY_key2buf(x, EC_KEY_get_conv_form(x), &pub, NULL);
|
publen = EC_KEY_key2buf(x, EC_KEY_get_conv_form(x), &pub, NULL);
|
||||||
if (publen == 0)
|
if (publen == 0)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
Loading…
Reference in a new issue