summaryrefslogtreecommitdiffstats
path: root/crypto/pkcs12/p12_p8e.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/pkcs12/p12_p8e.c
parentEVP: Adapt EVP_PKEY2PKCS8() to better handle provider-native keys (diff)
downloadopenssl-9311d0c471ca2eaa259e8c1bbbeb7c46394c7ba2.tar.xz
openssl-9311d0c471ca2eaa259e8c1bbbeb7c46394c7ba2.zip
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/pkcs12/p12_p8e.c')
-rw-r--r--crypto/pkcs12/p12_p8e.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/pkcs12/p12_p8e.c b/crypto/pkcs12/p12_p8e.c
index 14df4fdea4..32a06d7fc3 100644
--- a/crypto/pkcs12/p12_p8e.c
+++ b/crypto/pkcs12/p12_p8e.c
@@ -29,7 +29,7 @@ X509_SIG *PKCS8_encrypt(int pbe_nid, const EVP_CIPHER *cipher,
pbe = PKCS5_pbe_set(pbe_nid, iter, salt, saltlen);
}
if (pbe == NULL) {
- PKCS12err(PKCS12_F_PKCS8_ENCRYPT, ERR_R_ASN1_LIB);
+ ERR_raise(ERR_LIB_PKCS12, ERR_R_ASN1_LIB);
return NULL;
}
p8 = PKCS8_set0_pbe(pass, passlen, p8inf, pbe);
@@ -51,14 +51,14 @@ X509_SIG *PKCS8_set0_pbe(const char *pass, int passlen,
PKCS12_item_i2d_encrypt(pbe, ASN1_ITEM_rptr(PKCS8_PRIV_KEY_INFO),
pass, passlen, p8inf, 1);
if (!enckey) {
- PKCS12err(PKCS12_F_PKCS8_SET0_PBE, PKCS12_R_ENCRYPT_ERROR);
+ ERR_raise(ERR_LIB_PKCS12, PKCS12_R_ENCRYPT_ERROR);
return NULL;
}
p8 = OPENSSL_zalloc(sizeof(*p8));
if (p8 == NULL) {
- PKCS12err(PKCS12_F_PKCS8_SET0_PBE, ERR_R_MALLOC_FAILURE);
+ ERR_raise(ERR_LIB_PKCS12, ERR_R_MALLOC_FAILURE);
ASN1_OCTET_STRING_free(enckey);
return NULL;
}