summaryrefslogtreecommitdiffstats
path: root/crypto/pkcs7/pk7_attr.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/pkcs7/pk7_attr.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/pkcs7/pk7_attr.c')
-rw-r--r--crypto/pkcs7/pk7_attr.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/crypto/pkcs7/pk7_attr.c b/crypto/pkcs7/pk7_attr.c
index 7df05c8084..e9904c5950 100644
--- a/crypto/pkcs7/pk7_attr.c
+++ b/crypto/pkcs7/pk7_attr.c
@@ -23,7 +23,7 @@ int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si,
ASN1_STRING *seq;
if ((seq = ASN1_STRING_new()) == NULL) {
- PKCS7err(PKCS7_F_PKCS7_ADD_ATTRIB_SMIMECAP, ERR_R_MALLOC_FAILURE);
+ ERR_raise(ERR_LIB_PKCS7, ERR_R_MALLOC_FAILURE);
return 0;
}
seq->length = ASN1_item_i2d((ASN1_VALUE *)cap, &seq->data,
@@ -53,7 +53,7 @@ int PKCS7_simple_smimecap(STACK_OF(X509_ALGOR) *sk, int nid, int arg)
X509_ALGOR *alg;
if ((alg = X509_ALGOR_new()) == NULL) {
- PKCS7err(PKCS7_F_PKCS7_SIMPLE_SMIMECAP, ERR_R_MALLOC_FAILURE);
+ ERR_raise(ERR_LIB_PKCS7, ERR_R_MALLOC_FAILURE);
return 0;
}
ASN1_OBJECT_free(alg->algorithm);
@@ -77,7 +77,7 @@ int PKCS7_simple_smimecap(STACK_OF(X509_ALGOR) *sk, int nid, int arg)
}
return 1;
err:
- PKCS7err(PKCS7_F_PKCS7_SIMPLE_SMIMECAP, ERR_R_MALLOC_FAILURE);
+ ERR_raise(ERR_LIB_PKCS7, ERR_R_MALLOC_FAILURE);
ASN1_INTEGER_free(nbit);
X509_ALGOR_free(alg);
return 0;
@@ -96,8 +96,7 @@ int PKCS7_add_attrib_content_type(PKCS7_SIGNER_INFO *si, ASN1_OBJECT *coid)
int PKCS7_add0_attrib_signing_time(PKCS7_SIGNER_INFO *si, ASN1_TIME *t)
{
if (t == NULL && (t = X509_gmtime_adj(NULL, 0)) == NULL) {
- PKCS7err(PKCS7_F_PKCS7_ADD0_ATTRIB_SIGNING_TIME,
- ERR_R_MALLOC_FAILURE);
+ ERR_raise(ERR_LIB_PKCS7, ERR_R_MALLOC_FAILURE);
return 0;
}
return PKCS7_add_signed_attribute(si, NID_pkcs9_signingTime,