Kikuyo Nagamatsu wrote:
> 
> Thank you for your rapid reply,
> I'm going to read the openssl.txt very well. (really to say,
> I could not understand that meaning well..I'm sorry.)
> 
> When I made a self-certificate using following command,
>         openssl req -x509 -newkey rsa:1024 -keyout selfkey.pem -out selfcert.pem
> I can find the extensions in the certificate.
>         #X509v3 extensions:
>         #    X509v3 Subject Key Identifier:
>         #        05:9C:4C:7C:69:38:D7:0D:DE:56:91:55:F2:E7:2D:79:B1:C7:1A:32
>         #    X509v3 Authority Key Identifier:
>         #        keyid:05:9C:4C:7C:69:38:D7:0D:DE:56:91:55:F2:E7:2D:79:B1:C7:1A:32
>         #        DirName:/C=JP/ST=Kanagawa/L=Hi........
>         #        serial:00
>         #    X509v3 Basic Constraints:
>         #        CA:TRUE
> 
> There is already the line in the openssl.cnf, as following.
> 
> [ CA_default ]
> x509_extensions = usr_cert              # The extentions to add to the cert
> 
> But when I made a user certificate, the extensions of [usr_cert] section
> don't apear in the certificate, so I thought I needed to make a request.
> 
> Myabe I cannot understand.
> 
> Anyway , thanks a lot.
> 

I suggest you read the manual pages for the relevant commands. 

In the case of req -x509 it looks in the 'req' section of the config
file which contains the line:

x509_extensions = v3_ca

so it uses the v3_ca section which is what you get above.

If you sign a request with the 'ca' utility then it uses the CA_default
section, look up x509_extensions and will use the extensions in
usr_cert.

If however you use the 'x509' utility to sign a request then by default
you don't get any extensions at all. You have to supply the
configuration file using -extfile and section using -extensions on the
command line.

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
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to