ASIdentifiers_free(ret->rfc3779_asid);
#endif
ASN1_OCTET_STRING_free(ret->distinguishing_id);
+ OPENSSL_free(ret->propq);
break;
case ASN1_OP_DUP_POST:
{
X509 *old = exarg;
- ret->libctx = old->libctx;
- ret->propq = old->propq;
+ if (!x509_set0_libctx(ret, old->libctx, old->propq))
+ return 0;
}
break;
-
default:
break;
}
return 1;
-
}
ASN1_SEQUENCE_ref(X509, x509_cb) = {
{
if (x != NULL) {
x->libctx = libctx;
- x->propq = propq;
+ OPENSSL_free(x->propq);
+ x->propq = NULL;
+ if (propq != NULL) {
+ x->propq = OPENSSL_strdup(propq);
+ if (x->propq == NULL)
+ return 0;
+ }
}
return 1;
}
X509 *cert = NULL;
cert = (X509 *)ASN1_item_new((X509_it()));
- (void)x509_set0_libctx(cert, libctx, propq);
+ if (!x509_set0_libctx(cert, libctx, propq)) {
+ X509_free(cert);
+ cert = NULL;
+ }
return cert;
}