summaryrefslogtreecommitdiffstats
path: root/crypto/crmf/crmf_lib.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2019-05-31 13:52:45 -0400
committerRichard Levitte <levitte@openssl.org>2019-07-16 05:26:28 +0200
commitaac96e2797c34a6b2a839eb58c30ab3328a0cee8 (patch)
tree105434e5b948326f7846dce7a9a8fb7ff41974e6 /crypto/crmf/crmf_lib.c
parent3d9b33b5e48d82d098a1f8c37dbf616a0d84621c (diff)
Remove function name from errors
Deprecate all xxx_F_ defines. Removed some places that tested for a specific function. Use empty field for the function names in output. Update documentation. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9058)
Diffstat (limited to 'crypto/crmf/crmf_lib.c')
-rw-r--r--crypto/crmf/crmf_lib.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/crypto/crmf/crmf_lib.c b/crypto/crmf/crmf_lib.c
index 55f1f38af8..e777a34e67 100644
--- a/crypto/crmf/crmf_lib.c
+++ b/crypto/crmf/crmf_lib.c
@@ -299,20 +299,20 @@ int OSSL_CRMF_MSG_set_certReqId(OSSL_CRMF_MSG *crm, int rid)
}
/* get ASN.1 encoded integer, return -1 on error */
-static int crmf_asn1_get_int(int func, const ASN1_INTEGER *a)
+static int crmf_asn1_get_int(const ASN1_INTEGER *a)
{
int64_t res;
if (!ASN1_INTEGER_get_int64(&res, a)) {
- CRMFerr(func, ASN1_R_INVALID_NUMBER);
+ CRMFerr(0, ASN1_R_INVALID_NUMBER);
return -1;
}
if (res < INT_MIN) {
- CRMFerr(func, ASN1_R_TOO_SMALL);
+ CRMFerr(0, ASN1_R_TOO_SMALL);
return -1;
}
if (res > INT_MAX) {
- CRMFerr(func, ASN1_R_TOO_LARGE);
+ CRMFerr(0, ASN1_R_TOO_LARGE);
return -1;
}
return (int)res;
@@ -324,8 +324,7 @@ int OSSL_CRMF_MSG_get_certReqId(OSSL_CRMF_MSG *crm)
CRMFerr(CRMF_F_OSSL_CRMF_MSG_GET_CERTREQID, CRMF_R_NULL_ARGUMENT);
return -1;
}
- return crmf_asn1_get_int(CRMF_F_OSSL_CRMF_MSG_GET_CERTREQID,
- crm->certReq->certReqId);
+ return crmf_asn1_get_int(crm->certReq->certReqId);
}