- d2i_X509_ALGOR( &crl->sig_alg, &buffer, signature.size() );
- d2i_ASN1_BIT_STRING( &crl->signature, &buffer, signature.size() + data - buffer );
- d2i_ASN1_TIME( &crl->crl->lastUpdate, &buffer, signature.size() + data - buffer );
- d2i_ASN1_TIME( &crl->crl->nextUpdate, &buffer, signature.size() + data - buffer );
+ X509_ALGOR *alg = d2i_X509_ALGOR( NULL, &buffer, signature.size() );
+ ASN1_BIT_STRING *sig = d2i_ASN1_BIT_STRING( NULL, &buffer, signature.size() + data - buffer );
+ ASN1_TIME *a1 = d2i_ASN1_TIME( NULL, &buffer, signature.size() + data - buffer );
+ ASN1_TIME *a2 = d2i_ASN1_TIME( NULL, &buffer, signature.size() + data - buffer );
+ *palg = *alg;
+ *psig = *sig;
+ X509_CRL_set1_lastUpdate( crl.get(), a1);
+ X509_CRL_set1_nextUpdate( crl.get(), a2);
+
+ //X509_ALGOR_free(alg);
+ //ASN1_BIT_STRING_free(sig);
+ ASN1_TIME_free(a1);
+ ASN1_TIME_free(a2);