check for error when creating PKCS#8 structure
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 2849707fa6
)
This commit is contained in:
parent
296559b0ce
commit
aaa654d607
1 changed files with 2 additions and 0 deletions
|
@ -138,6 +138,8 @@ static int do_pk8pkey(BIO *bp, EVP_PKEY *x, int isder, int nid,
|
|||
if (kstr == buf)
|
||||
OPENSSL_cleanse(buf, klen);
|
||||
PKCS8_PRIV_KEY_INFO_free(p8inf);
|
||||
if (p8 == NULL)
|
||||
return 0;
|
||||
if (isder)
|
||||
ret = i2d_PKCS8_bio(bp, p8);
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue