[rs-commit] r150 - in /mod_scep/trunk: mod_scep.c openssl_setter_compat.h
rs-commit at redwax.eu
rs-commit at redwax.eu
Wed Dec 4 22:06:10 CET 2019
Author: dirkx at redwax.eu
Date: Wed Dec 4 22:06:03 2019
New Revision: 150
Log:
Adapt to changens on openssl-master for 1.1.1e II
Modified:
mod_scep/trunk/mod_scep.c
mod_scep/trunk/openssl_setter_compat.h
Modified: mod_scep/trunk/mod_scep.c
==============================================================================
--- mod_scep/trunk/mod_scep.c (original)
+++ mod_scep/trunk/mod_scep.c Wed Dec 4 22:06:03 2019
@@ -2008,8 +2008,8 @@
/* duplicate the signature algorithm */
#if OPENSSL_VERSION_NUMBER >= 0x010100000L
const X509_ALGOR *psigalg;
- X509_REQ_get0_signature(req,NULL /* no need for signature */,&psigalg);
- X509_REQ_set0_signature(creq, NULL, X509_ALGOR_dup((X509_ALGOR*)psigalg));
+ X509_REQ_get0_signature(req, NULL, &psigalg);
+ X509_REQ_set1_signature(creq, X509_ALGOR_dup((X509_ALGOR*)psigalg));
#else
creq->sig_alg = X509_ALGOR_dup(req->sig_alg);
#endif
Modified: mod_scep/trunk/openssl_setter_compat.h
==============================================================================
--- mod_scep/trunk/openssl_setter_compat.h (original)
+++ mod_scep/trunk/openssl_setter_compat.h Wed Dec 4 22:06:03 2019
@@ -53,12 +53,13 @@
# endif
};
-static void X509_REQ_set0_signature(X509_REQ *req, ASN1_BIT_STRING *psigOrNull,
- X509_ALGOR *palgOrNull)
+
+void X509_REQ_set1_signature(X509_REQ *req, X509_ALGOR *palg)
{
- if (psigOrNull != NULL)
- req->signature = psigOrNull;
- if (palgOrNull != NULL)
- req->sig_alg = *palgOrNull;
+ 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;
}
#endif
More information about the rs-commit
mailing list