From a150f8e1fcc38752fef4d7c75d765d8efc7d46d6 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Wed, 4 Nov 2020 16:14:00 +0100 Subject: 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 (Merged from https://github.com/openssl/openssl/pull/13318) --- crypto/cms/cms_smime.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'crypto/cms') diff --git a/crypto/cms/cms_smime.c b/crypto/cms/cms_smime.c index 84cd27afea..5c903f204b 100644 --- a/crypto/cms/cms_smime.c +++ b/crypto/cms/cms_smime.c @@ -281,10 +281,8 @@ static int cms_signerinfo_verify_cert(CMS_SignerInfo *si, i = X509_verify_cert(ctx); if (i <= 0) { j = X509_STORE_CTX_get_error(ctx); - ERR_raise(ERR_LIB_CMS, - CMS_R_CERTIFICATE_VERIFY_ERROR); - ERR_add_error_data(2, "Verify error:", - X509_verify_cert_error_string(j)); + ERR_raise_data(ERR_LIB_CMS, CMS_R_CERTIFICATE_VERIFY_ERROR, + "Verify error: %s", X509_verify_cert_error_string(j)); goto err; } r = 1; -- cgit v1.2.3