diff options
Diffstat (limited to 'src/lib/libcrypto/pem/pem_pk8.c')
-rw-r--r-- | src/lib/libcrypto/pem/pem_pk8.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/libcrypto/pem/pem_pk8.c b/src/lib/libcrypto/pem/pem_pk8.c index 6deab8c338..db38a2a79d 100644 --- a/src/lib/libcrypto/pem/pem_pk8.c +++ b/src/lib/libcrypto/pem/pem_pk8.c | |||
@@ -118,7 +118,7 @@ static int do_pk8pkey(BIO *bp, EVP_PKEY *x, int isder, int nid, const EVP_CIPHER | |||
118 | char buf[PEM_BUFSIZE]; | 118 | char buf[PEM_BUFSIZE]; |
119 | int ret; | 119 | int ret; |
120 | if(!(p8inf = EVP_PKEY2PKCS8(x))) { | 120 | if(!(p8inf = EVP_PKEY2PKCS8(x))) { |
121 | PEMerr(PEM_F_DO_PK8PKEY, | 121 | PEMerr(PEM_F_PEM_WRITE_BIO_PKCS8PRIVATEKEY, |
122 | PEM_R_ERROR_CONVERTING_PRIVATE_KEY); | 122 | PEM_R_ERROR_CONVERTING_PRIVATE_KEY); |
123 | return 0; | 123 | return 0; |
124 | } | 124 | } |
@@ -127,7 +127,8 @@ static int do_pk8pkey(BIO *bp, EVP_PKEY *x, int isder, int nid, const EVP_CIPHER | |||
127 | if(!cb) klen = PEM_def_callback(buf, PEM_BUFSIZE, 1, u); | 127 | if(!cb) klen = PEM_def_callback(buf, PEM_BUFSIZE, 1, u); |
128 | else klen = cb(buf, PEM_BUFSIZE, 1, u); | 128 | else klen = cb(buf, PEM_BUFSIZE, 1, u); |
129 | if(klen <= 0) { | 129 | if(klen <= 0) { |
130 | PEMerr(PEM_F_DO_PK8PKEY,PEM_R_READ_KEY); | 130 | PEMerr(PEM_F_PEM_WRITE_BIO_PKCS8PRIVATEKEY, |
131 | PEM_R_READ_KEY); | ||
131 | PKCS8_PRIV_KEY_INFO_free(p8inf); | 132 | PKCS8_PRIV_KEY_INFO_free(p8inf); |
132 | return 0; | 133 | return 0; |
133 | } | 134 | } |
@@ -214,7 +215,7 @@ static int do_pk8pkey_fp(FILE *fp, EVP_PKEY *x, int isder, int nid, const EVP_CI | |||
214 | BIO *bp; | 215 | BIO *bp; |
215 | int ret; | 216 | int ret; |
216 | if(!(bp = BIO_new_fp(fp, BIO_NOCLOSE))) { | 217 | if(!(bp = BIO_new_fp(fp, BIO_NOCLOSE))) { |
217 | PEMerr(PEM_F_DO_PK8PKEY_FP,ERR_R_BUF_LIB); | 218 | PEMerr(PEM_F_PEM_F_DO_PK8KEY_FP,ERR_R_BUF_LIB); |
218 | return(0); | 219 | return(0); |
219 | } | 220 | } |
220 | ret = do_pk8pkey(bp, x, isder, nid, enc, kstr, klen, cb, u); | 221 | ret = do_pk8pkey(bp, x, isder, nid, enc, kstr, klen, cb, u); |