summaryrefslogtreecommitdiffstats
path: root/crypto/pem/pem_pkey.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-11-04 12:23:19 +0100
committerRichard Levitte <levitte@openssl.org>2020-11-13 09:35:02 +0100
commit9311d0c471ca2eaa259e8c1bbbeb7c46394c7ba2 (patch)
treee82c26569e5a952980e65a746af920beed602aab /crypto/pem/pem_pkey.c
parent31a6b52f6db009c639c67387a707dd235f29a430 (diff)
Convert all {NAME}err() in crypto/ to their corresponding ERR_raise() call
This includes error reporting for libcrypto sub-libraries in surprising places. This was done using util/err-to-raise Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/13318)
Diffstat (limited to 'crypto/pem/pem_pkey.c')
-rw-r--r--crypto/pem/pem_pkey.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/pem/pem_pkey.c b/crypto/pem/pem_pkey.c
index e6c07b8fd6..717fb4ef4d 100644
--- a/crypto/pem/pem_pkey.c
+++ b/crypto/pem/pem_pkey.c
@@ -122,7 +122,7 @@ EVP_PKEY *PEM_read_PUBKEY_ex(FILE *fp, EVP_PKEY **x,
EVP_PKEY *ret;
if ((b = BIO_new(BIO_s_file())) == NULL) {
- PEMerr(0, ERR_R_BUF_LIB);
+ ERR_raise(ERR_LIB_PEM, ERR_R_BUF_LIB);
return 0;
}
BIO_set_fp(b, fp, BIO_NOCLOSE);
@@ -234,7 +234,7 @@ EVP_PKEY *PEM_read_PrivateKey_ex(FILE *fp, EVP_PKEY **x, pem_password_cb *cb,
EVP_PKEY *ret;
if ((b = BIO_new(BIO_s_file())) == NULL) {
- PEMerr(0, ERR_R_BUF_LIB);
+ ERR_raise(ERR_LIB_PEM, ERR_R_BUF_LIB);
return 0;
}
BIO_set_fp(b, fp, BIO_NOCLOSE);
@@ -257,7 +257,7 @@ int PEM_write_PrivateKey(FILE *fp, const EVP_PKEY *x, const EVP_CIPHER *enc,
int ret;
if ((b = BIO_new_fp(fp, BIO_NOCLOSE)) == NULL) {
- PEMerr(PEM_F_PEM_WRITE_PRIVATEKEY, ERR_R_BUF_LIB);
+ ERR_raise(ERR_LIB_PEM, ERR_R_BUF_LIB);
return 0;
}
ret = PEM_write_bio_PrivateKey(b, x, enc, kstr, klen, cb, u);