Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14340)
X509_EXTENSION_free(X509_delete_ext(x, i));
}
X509_EXTENSION_free(X509_delete_ext(x, i));
}
- if ((reqfile || newcert || signkey != NULL || CAfile != NULL)
- && !preserve_dates && !set_cert_times(x, NULL, NULL, days))
- goto end;
-
issuer_cert = x;
if (CAfile != NULL) {
issuer_cert = xca;
issuer_cert = x;
if (CAfile != NULL) {
issuer_cert = xca;
if (sno != NULL && !X509_set_serialNumber(x, sno))
goto end;
if (sno != NULL && !X509_set_serialNumber(x, sno))
goto end;
- if (!X509_set_issuer_name(x, X509_get_subject_name(issuer_cert)))
- goto end;
+ if (reqfile || newcert || signkey != NULL || CAfile != NULL) {
+ if (!preserve_dates && !set_cert_times(x, NULL, NULL, days))
+ goto end;
+ if (!X509_set_issuer_name(x, X509_get_subject_name(issuer_cert)))
+ goto end;
+ }
X509V3_set_ctx(&ext_ctx, issuer_cert, x, req, NULL, X509V3_CTX_REPLACE);
if (extconf != NULL) {
X509V3_set_ctx(&ext_ctx, issuer_cert, x, req, NULL, X509V3_CTX_REPLACE);
if (extconf != NULL) {