Massimiliano Pala wrote:
>
> 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 ??
>
Can you give some more information about what you've actually modified?
Or is it possible to get this behaviour with the standard 'ca' utility?
If so, how?
Steve.
--
Dr Stephen N. Henson. http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED]
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]