@@ -1479,7 +1479,6 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509,
|
||||
goto end;
|
||||
}
|
||||
X509_REQ_set_subject_name(req, n);
|
||||
req->req_info->enc.modified = 1;
|
||||
X509_NAME_free(n);
|
||||
}
|
||||
|
||||
@@ -1993,7 +1992,6 @@ static int certify_spkac(X509 **xret, char *infile, EVP_PKEY *pkey,
|
||||
X509_REQ *req = NULL;
|
||||
CONF_VALUE *cv = NULL;
|
||||
NETSCAPE_SPKI *spki = NULL;
|
||||
X509_REQ_INFO *ri;
|
||||
char *type, *buf;
|
||||
EVP_PKEY *pktmp = NULL;
|
||||
X509_NAME *n = NULL;
|
||||
@@ -2037,8 +2035,7 @@ static int certify_spkac(X509 **xret, char *infile, EVP_PKEY *pkey,
|
||||
/*
|
||||
* Build up the subject name set.
|
||||
*/
|
||||
ri = req->req_info;
|
||||
n = ri->subject;
|
||||
n = X509_REQ_get_subject_name(req);
|
||||
|
||||
for (i = 0;; i++) {
|
||||
if (sk_CONF_VALUE_num(sk) <= i)
|
||||
|
@@ -726,8 +726,6 @@ int req_main(int argc, char **argv)
|
||||
goto end;
|
||||
}
|
||||
|
||||
req->req_info->enc.modified = 1;
|
||||
|
||||
if (verbose) {
|
||||
print_name(bio_err, "new subject=",
|
||||
X509_REQ_get_subject_name(req), nmflag);
|
||||
|
13
apps/x509.c
13
apps/x509.c
@@ -567,15 +567,6 @@ int x509_main(int argc, char **argv)
|
||||
goto end;
|
||||
}
|
||||
|
||||
if ((req->req_info == NULL) ||
|
||||
(req->req_info->pubkey == NULL) ||
|
||||
(req->req_info->pubkey->public_key == NULL) ||
|
||||
(req->req_info->pubkey->public_key->data == NULL)) {
|
||||
BIO_printf(bio_err,
|
||||
"The certificate request appears to corrupted\n");
|
||||
BIO_printf(bio_err, "It does not contain a public key\n");
|
||||
goto end;
|
||||
}
|
||||
if ((pkey = X509_REQ_get_pubkey(req)) == NULL) {
|
||||
BIO_printf(bio_err, "error unpacking public key\n");
|
||||
goto end;
|
||||
@@ -611,9 +602,9 @@ int x509_main(int argc, char **argv)
|
||||
} else if (!X509_set_serialNumber(x, sno))
|
||||
goto end;
|
||||
|
||||
if (!X509_set_issuer_name(x, req->req_info->subject))
|
||||
if (!X509_set_issuer_name(x, X509_REQ_get_subject_name(req)))
|
||||
goto end;
|
||||
if (!X509_set_subject_name(x, req->req_info->subject))
|
||||
if (!X509_set_subject_name(x, X509_REQ_get_subject_name(req)))
|
||||
goto end;
|
||||
|
||||
X509_gmtime_adj(X509_get_notBefore(x), 0);
|
||||
|
Reference in New Issue
Block a user