diff options
author | Richard Levitte <levitte@openssl.org> | 2020-11-04 16:14:00 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-11-13 09:35:31 +0100 |
commit | a150f8e1fcc38752fef4d7c75d765d8efc7d46d6 (patch) | |
tree | f7f62c9a5d8407d8b17820fbef67378aa7b9ddbb /crypto/x509/v3_cpols.c | |
parent | 9311d0c471ca2eaa259e8c1bbbeb7c46394c7ba2 (diff) | |
download | openssl-new-a150f8e1fcc38752fef4d7c75d765d8efc7d46d6.tar.gz |
CRYPTO: refactor ERR_raise()+ERR_add_error_data() to ERR_raise_data()
This is not done absolutely everywhere, as there are places where
the use of ERR_add_error_data() is quite complex, but at least the
simple cases are done.
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13318)
Diffstat (limited to 'crypto/x509/v3_cpols.c')
-rw-r--r-- | crypto/x509/v3_cpols.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/x509/v3_cpols.c b/crypto/x509/v3_cpols.c index 7d27c1f225..55aa5cac05 100644 --- a/crypto/x509/v3_cpols.c +++ b/crypto/x509/v3_cpols.c @@ -126,8 +126,8 @@ static STACK_OF(POLICYINFO) *r2i_certpol(X509V3_EXT_METHOD *method, polsect = X509V3_get_section(ctx, pstr + 1); if (polsect == NULL) { - ERR_raise(ERR_LIB_X509V3, X509V3_R_INVALID_SECTION); - ERR_add_error_data(1, cnf->name); + ERR_raise_data(ERR_LIB_X509V3, X509V3_R_INVALID_SECTION, + "%s", cnf->name); goto err; } pol = policy_section(ctx, polsect, ia5org); @@ -136,9 +136,9 @@ static STACK_OF(POLICYINFO) *r2i_certpol(X509V3_EXT_METHOD *method, goto err; } else { if ((pobj = OBJ_txt2obj(cnf->name, 0)) == NULL) { - ERR_raise(ERR_LIB_X509V3, - X509V3_R_INVALID_OBJECT_IDENTIFIER); - ERR_add_error_data(1, cnf->name); + ERR_raise_data(ERR_LIB_X509V3, + X509V3_R_INVALID_OBJECT_IDENTIFIER, + "%s", cnf->name); goto err; } pol = POLICYINFO_new(); |