Hi all,
I am working on the ca.c command. I want to be able to pass
a new subject to the ca command to issue the new certificate
with the new subject.
I've almost ended, anyway I get strange behaviour.
In the ca command I have added a function to modify the
req subject name so in the do_body it will results like
the following:
BIO_printf(bio_err,"The Subjects Distinguished Name is as follows\n");
if (subj)
X509_REQ_set_subject_name(req,do_subject(subj));
name=X509_REQ_get_subject_name(req);
The subj contains the new subject in text format while the
do_subject returns the X509_NAME related structure. It all
works ok, except for the subjectAltName.
If I use the -preserveDN switch I get no subjectAltName
(empty) while without -preserveDN all goes well.
This either if I use the new subj or not. The preserve code
is ever the same (I did not have the need to change it):
if (preserve)
{
X509_NAME_free(subject);
subject=X509_NAME_dup(X509_REQ_get_subject_name(req));
if (subject == NULL) goto err;
}
I cannot fix this, I tried almost everything: I am surely
missing something. Someone can help me ??
C'you,
Massimiliano Pala ([EMAIL PROTECTED])
S/MIME Cryptographic Signature