[rs-commit] r281 - in /mod_scep/trunk: ChangeLog openssl_setter_compat.h

rs-commit at redwax.eu rs-commit at redwax.eu
Sat Feb 15 22:16:11 CET 2020


Author: minfrin at redwax.eu
Date: Sat Feb 15 22:16:10 2020
New Revision: 281

Log:
Don't try and free an algorithm if unset.

Modified:
    mod_scep/trunk/ChangeLog
    mod_scep/trunk/openssl_setter_compat.h

Modified: mod_scep/trunk/ChangeLog
==============================================================================
--- mod_scep/trunk/ChangeLog	(original)
+++ mod_scep/trunk/ChangeLog	Sat Feb 15 22:16:10 2020
@@ -1,5 +1,7 @@
 
 Changes with v0.2.4
+
+ *) Don't try and free an algorithm if unset. [Graham Leggett]
 
  *) Change the order of processing PKIOPeration requests so that PKCS7
     POST bodies are parsed first before interpreting a message parameter.

Modified: mod_scep/trunk/openssl_setter_compat.h
==============================================================================
--- mod_scep/trunk/openssl_setter_compat.h	(original)
+++ mod_scep/trunk/openssl_setter_compat.h	Sat Feb 15 22:16:10 2020
@@ -58,10 +58,14 @@
 
 static void X509_REQ_set1_signature(X509_REQ *req, X509_ALGOR *palg)
 {
-    if (req->sig_alg->algorithm)
-        ASN1_OBJECT_free(req->sig_alg->algorithm);
-    if (req->sig_alg->parameter)
-        ASN1_TYPE_free(req->sig_alg->parameter);
+    if (req->sig_alg) {
+        if (req->sig_alg->algorithm) {
+            ASN1_OBJECT_free(req->sig_alg->algorithm);
+        }
+        if (req->sig_alg->parameter) {
+            ASN1_TYPE_free(req->sig_alg->parameter);
+        }
+    }
     req->sig_alg = palg;
 }
 #define HAVE_X509_REQ_SET1_SIGNATURE 1



More information about the rs-commit mailing list