[rs-commit] r424 - /mod_cms_verify/trunk/mod_cms_verify.c

rs-commit at redwax.eu rs-commit at redwax.eu
Sat Aug 7 23:08:40 CEST 2021


Author: dirkx at redwax.eu
Date: Sat Aug  7 23:08:39 2021
New Revision: 424

Log:
Improve error messages.

Modified:
    mod_cms_verify/trunk/mod_cms_verify.c

Modified: mod_cms_verify/trunk/mod_cms_verify.c
==============================================================================
--- mod_cms_verify/trunk/mod_cms_verify.c	(original)
+++ mod_cms_verify/trunk/mod_cms_verify.c	Sat Aug  7 23:08:39 2021
@@ -292,7 +292,7 @@
     len = BIO_get_mem_data(in, &ptr);
     if (NULL == (err = _extract_json(r->pool, ptr, len, &sig, &lsig, &pay, &lpay))) {
         if (!(ci = d2i_CMS_ContentInfo(NULL, &sig, lsig))) {
-		ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, HANDLER ": could not decode: %s",
+		ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, HANDLER ": could not decode JSON: %s",
 		      ERR_reason_error_string(ERR_get_error()));
 		goto exit;
         };
@@ -307,7 +307,7 @@
     } else
     if (!(out = BIO_new(BIO_s_mem())) ||
 	!(ci = d2i_CMS_bio(in, NULL))) {
-	ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, HANDLER ": could not decode: %s",
+	ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, HANDLER ": could not decode DER: %s",
 		      ERR_reason_error_string(ERR_get_error()));
 	goto exit;
     } else {
@@ -324,7 +324,8 @@
     if (!(signers = CMS_get0_signers(ci)) ||
 	!(signer = sk_X509_value(signers, 0)) ||
 	!(subject = X509_get_subject_name(signer)) ||
-	!(dn = X509_NAME_oneline(subject, NULL, 0))) {
+	!(dn = X509_NAME_oneline(subject, NULL, 0))
+       ) {
 	ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, HANDLER ": verified; but no signers ?!: %s",
 		      ERR_reason_error_string(ERR_get_error()));
 	goto exit;



More information about the rs-commit mailing list