Discussion:
Challenge Password - Newbie question
Sevcik Berndt
2003-08-18 15:57:52 UTC
Permalink
I am using the following script to create my certificate.
openssl req -new -keyout newreq.pem -out newreq.pem -passin
pass:1whatever -passout pass:whatever -days 365
openssl ca -policy policy_anything -out newcert.pem -passin
pass:whatever -key whatever -extensions xpclient_ext -extfile
xpextensions -infiles newreq.pem
openssl pkcs12 -export -in newcert.pem -inkey newreq.pem -out $1.p12
-clcerts -passin pass:whatever -passout pass:whatever
openssl x509 -inform PEM -outform DER -in $1.pem -out $1.der
rm -rf newcert newreq.pem

When I execute this command I am asked for an challenge password. But I
provided at the commands themselv a -passin pass and -passout pass. Is
this the same or are this different passwords? It seems to me that the
challenge password I am asked to enter during creation is not used for
the certificate.

And a second question:
When I import the .p12 file into Windows I am asked for a password I am
asked for a Secret. Is this the challenge password?

Thanks for the help
Berndt


Command output.
ITS-Test1:/etc/1x# ./createcert.pl karaduman
Generating a 1024 bit RSA private key
............................++++++
........++++++
writing new private key to 'newreq.pem'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a
DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AT]:AT
State or Province Name (full name) [Vienna]:Vienna
Locality Name (eg, city) []:
Organization Name (eg, company) [TGM - Schule der Technik]:TGM - Die
Schule der Technik
Organizational Unit Name (eg, section) [IT-Service]:IT-Service
Common Name (eg, YOUR name) [TGM Wireless CA]:Ercan Karaduman
Email Address [its-***@public.gmane.org]:***@tgm.ac.at

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:G5N5B3Y3
An optional company name []:
Using configuration from /usr/lib/ssl/openssl.cnf
Check that the request matches the signature
Signature ok
Certificate Details:
Serial Number: 163 (0xa3)
Validity
Not Before: Aug 18 15:42:54 2003 GMT
Not After : Aug 17 15:42:54 2004 GMT
Subject:
countryName = AT
stateOrProvinceName = Vienna
organizationName = TGM - Die Schule der Technik
organizationalUnitName = IT-Service
commonName = Ercan Karaduman
emailAddress = ercan.karaduman-***@public.gmane.org
X509v3 extensions:
X509v3 Extended Key Usage:
TLS Web Client Authentication
Certificate is to be certified until Aug 17 15:42:54 2004 GMT (365 days)
Sign the certificate? [y/n]:y

openssl req -new -keyout newreq.pem -out newreq.pem -passin
pass:1whatever -passout pass:whatever -days 365
openssl ca -policy policy_anything -out newcert.pem -passin
pass:whatever -key whatever -extensions xpclient_ext -extfile
xpextensions -infiles newreq.pem
openssl pkcs12 -export -in newcert.pem -inkey newreq.pem -out $1.p12
-clcerts -passin pass:whatever -passout pass:whatever
openssl x509 -inform PEM -outform DER -in $1.pem -out $1.der
rm -rf newcert newreq.pem

------------------------------------------
TGM - Die Schule der Technik
IT - Service
A - 1200 Wien, Wexstr. 19-23
Tel. +43(1)33126/316 Fax: +43(1)33126/154
E-Mail: berndt.sevcik-***@public.gmane.org
------------------------------------------



______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Charles B Cranston
2003-08-18 16:53:15 UTC
Permalink
You seem to be somewhat confused on several counts.
I think there is a problem with your script, which
openssl req -new -keyout newreq.pem -out newreq.pem \
-passin pass:1whatever -passout pass:whatever \
-days 365

Unless there's some new wrinkle to OpenSSL that handles
this case, it looks very much like you are writing both
the request and the private key to the same file newreq.pem
Is this really correct, or will it bite you later?

Also, on some Unix systems it is possible to read the
command lines of other processes, passing passwords as
command line arguments is insecure under these conditions.
I don't think you need passin in this case, since there is
nothing encrypted to be read.
openssl ca -policy policy_anything -out newcert.pem \ > -passin pass:whatever -key whatever \
-extensions xpclient_ext -extfile xpextensions \
-infiles newreq.pem
openssl pkcs12 -export -in newcert.pem -inkey newreq.pem \
-out $1.p12 -clcerts -passin pass:whatever \
-passout pass:whatever
openssl x509 -inform PEM -outform DER -in $1.pem \
-out $1.der
rm -rf newcert newreq.pem
When I execute this command I am asked for an challenge password. But I
provided at the commands themselv a -passin pass and -passout pass. Is
this the same or are this different passwords? It seems to me that the
challenge password I am asked to enter during creation is not used for
the certificate.
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:G5N5B3Y3
-----
then it is a different password. This is a password that will be
placed into the request that is being generated. The idea is that
it may be used to verify the identity of the requestor at a later
time when the certificate is being returned to him. I don't think
openssl ca does anything directly with it, though. You can control
the questions being asked by openssl req by editing the openssl
configuration file. By doing so you can make it stop asking this
and other questions.
Post by Sevcik Berndt
Using configuration from /usr/lib/ssl/openssl.cnf
If you cannot edit there you can always use the -config
option to specify your OWN configuration file. One of the
things I tend to do in scripts is to create a custom config
file on the fly using cat <<@eof to do exactly what I want.
I'll attach an example.
When I import the .p12 file into Windows I am asked for a password I am
asked for a Secret. Is this the challenge password?
I believe this is the transport password used to keep the
pkcs12 (.p12) data secure while you are moving it around on
the internet. My guess is it would be passout on the pkcs12
command but you should check the man to be sure.

Another problem is that (I think) you stomp on the private
key in the req command then try to import it from the
stomped name in the pkcs12 command. I think maybe you
should use two files newreq.pem and newkey.pem?

Or does this actually work? Will req stack the two outputs,
request and key, into the same file, then will both ca and
pkcs12 know which piece of the file to use???

=====

Example of script that creates a custom OpenSSL config
file on the fly:

#! /bin/sh

# Test8 is Test7 with SubjectKeyIdentifier extension added to
# server cert

OPENSSL="/usr/bin/openssl"
CONFFILE=conf.$$
SNUMFILE=snum.$$
CA="University of Maryland CA8"

# Generate the Root certificate

cat <<@eof >$CONFFILE
[req] # openssl req params
prompt = no
distinguished_name = dn-param
x509_extensions = extend
[dn-param] # DN fields
C = US
O = University of Maryland
CN = $CA
[extend] # openssl extensions
nsCertType = sslCA,emailCA,objCA
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always
basicConstraints = CA:true
keyUsage = keyCertSign,cRLSign
nsComment = "See http://cert.umd.edu/root for details."
issuerAltName = "DNS:umd.edu","email:certmaster-***@public.gmane.org"
subjectAltName = "DNS:umd.edu","email:certmaster-***@public.gmane.org"
@eof

$OPENSSL req -config $CONFFILE -x509 -newkey rsa:2048 -days 365 \
-passout pass:aaaaa -keyout root.key.pem -out root.cert.pem

# Generate a server certificate from CSR in csr.pem

cat <<@eof >$CONFFILE
extensions = extend
[extend] # openssl extensions
nsCertType = SSL Server
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always
basicConstraints = CA:false
keyUsage = Key Encipherment
extendedKeyUsage = serverAuth, clientAuth
nsComment = "See http://cert.umd.edu/server for details."
issuerAltName = "DNS:umd.edu","email:certmaster-***@public.gmane.org"
subjectAltName = email:netmail-***@public.gmane.org
@eof

echo 13 >$SNUMFILE

$OPENSSL x509 -req -extfile $CONFFILE -in csr.pem \
-CAserial $SNUMFILE -days 362 -passin pass:aaaaa \
-CA root.cert.pem -CAkey root.key.pem -out server.cert.pem

rm $CONFFILE $SNUMFILE

cat root.cert.pem server.cert.pem >chain.pem

$OPENSSL x509 -noout -text -in root.cert.pem
$OPENSSL x509 -noout -text -in server.cert.pem
--
Charles B (Ben) Cranston
mailto: zben-***@public.gmane.org
http://www.wam.umd.edu/~zben

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Sevcik Berndt
2003-08-18 17:21:59 UTC
Permalink
Thanks for the fast response! The explanations helped me a lot.

Putting both in the same file works without any problems.

------------------------------------------
TGM - Die Schule der Technik
IT - Service
A - 1200 Wien, Wexstr. 19-23
Tel. +43(1)33126/316 Fax: +43(1)33126/154
E-Mail: berndt.sevcik-***@public.gmane.org
------------------------------------------


-----Ursprüngliche Nachricht-----
Von: owner-openssl-users-MCmKBN63+***@public.gmane.org
[mailto:owner-openssl-users-MCmKBN63+***@public.gmane.org] Im Auftrag von Charles B
Cranston
Gesendet: Montag, 18. August 2003 18:53
An: openssl-users-MCmKBN63+***@public.gmane.org
Betreff: Re: Challenge Password - Newbie question

You seem to be somewhat confused on several counts.
I think there is a problem with your script, which
openssl req -new -keyout newreq.pem -out newreq.pem \
-passin pass:1whatever -passout pass:whatever \
-days 365

Unless there's some new wrinkle to OpenSSL that handles
this case, it looks very much like you are writing both
the request and the private key to the same file newreq.pem
Is this really correct, or will it bite you later?

Also, on some Unix systems it is possible to read the
command lines of other processes, passing passwords as
command line arguments is insecure under these conditions.
I don't think you need passin in this case, since there is
nothing encrypted to be read.
openssl ca -policy policy_anything -out newcert.pem \ >
-passin pass:whatever -key whatever \
-extensions xpclient_ext -extfile xpextensions \
-infiles newreq.pem
openssl pkcs12 -export -in newcert.pem -inkey newreq.pem \
-out $1.p12 -clcerts -passin pass:whatever \
-passout pass:whatever
openssl x509 -inform PEM -outform DER -in $1.pem \
-out $1.der
rm -rf newcert newreq.pem
When I execute this command I am asked for an challenge password. But I
provided at the commands themselv a -passin pass and -passout pass. Is
this the same or are this different passwords? It seems to me that the
challenge password I am asked to enter during creation is not used for
the certificate.
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:G5N5B3Y3
-----
then it is a different password. This is a password that will be
placed into the request that is being generated. The idea is that
it may be used to verify the identity of the requestor at a later
time when the certificate is being returned to him. I don't think
openssl ca does anything directly with it, though. You can control
the questions being asked by openssl req by editing the openssl
configuration file. By doing so you can make it stop asking this
and other questions.
Post by Sevcik Berndt
Using configuration from /usr/lib/ssl/openssl.cnf
If you cannot edit there you can always use the -config
option to specify your OWN configuration file. One of the
things I tend to do in scripts is to create a custom config
file on the fly using cat <<@eof to do exactly what I want.
I'll attach an example.
When I import the .p12 file into Windows I am asked for a password I am
asked for a Secret. Is this the challenge password?
I believe this is the transport password used to keep the
pkcs12 (.p12) data secure while you are moving it around on
the internet. My guess is it would be passout on the pkcs12
command but you should check the man to be sure.

Another problem is that (I think) you stomp on the private
key in the req command then try to import it from the
stomped name in the pkcs12 command. I think maybe you
should use two files newreq.pem and newkey.pem?

Or does this actually work? Will req stack the two outputs,
request and key, into the same file, then will both ca and
pkcs12 know which piece of the file to use???

=====

Example of script that creates a custom OpenSSL config
file on the fly:

#! /bin/sh

# Test8 is Test7 with SubjectKeyIdentifier extension added to
# server cert

OPENSSL="/usr/bin/openssl"
CONFFILE=conf.$$
SNUMFILE=snum.$$
CA="University of Maryland CA8"

# Generate the Root certificate

cat <<@eof >$CONFFILE
[req] # openssl req params
prompt = no
distinguished_name = dn-param
x509_extensions = extend
[dn-param] # DN fields
C = US
O = University of Maryland
CN = $CA
[extend] # openssl extensions
nsCertType = sslCA,emailCA,objCA
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always
basicConstraints = CA:true
keyUsage = keyCertSign,cRLSign
nsComment = "See http://cert.umd.edu/root for details."
issuerAltName = "DNS:umd.edu","email:certmaster-***@public.gmane.org"
subjectAltName = "DNS:umd.edu","email:certmaster-***@public.gmane.org"
@eof

$OPENSSL req -config $CONFFILE -x509 -newkey rsa:2048 -days 365 \
-passout pass:aaaaa -keyout root.key.pem -out root.cert.pem

# Generate a server certificate from CSR in csr.pem

cat <<@eof >$CONFFILE
extensions = extend
[extend] # openssl extensions
nsCertType = SSL Server
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always
basicConstraints = CA:false
keyUsage = Key Encipherment
extendedKeyUsage = serverAuth, clientAuth
nsComment = "See http://cert.umd.edu/server for details."
issuerAltName = "DNS:umd.edu","email:certmaster-***@public.gmane.org"
subjectAltName = email:netmail-***@public.gmane.org
@eof

echo 13 >$SNUMFILE

$OPENSSL x509 -req -extfile $CONFFILE -in csr.pem \
-CAserial $SNUMFILE -days 362 -passin pass:aaaaa \
-CA root.cert.pem -CAkey root.key.pem -out server.cert.pem

rm $CONFFILE $SNUMFILE

cat root.cert.pem server.cert.pem >chain.pem

$OPENSSL x509 -noout -text -in root.cert.pem
$OPENSSL x509 -noout -text -in server.cert.pem
--
Charles B (Ben) Cranston
mailto: zben-***@public.gmane.org
http://www.wam.umd.edu/~zben

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Rohan Pinto
2003-08-19 00:21:23 UTC
Permalink
Hi All,
Please help. (openssl newbie - the newest of bees)

I installed openssl.
I generated my private key using
./openssl genrsa -des3 -out privkey.pem 2048


I have a webserver running on www.abcd.com (on a different box)
I generated a CSR from the webserver (using the admin console)
I copied the CSR over to my server running openssl (placed it in
/usr/local/ssl/bin)
I tried to sign this CSR using
./openssl x509 -req -days 1461 -in abcd.csr -signkey privkey.pem -out
abcd.crt


Now i tried to install this certificate on the webserver (www.abcd.com)

I get an error "Incorrect usage: No Private key", " the server could not
find the private key assicated with this certificate"

What do i need to do in order to be able to sign certificate signing
requests generated from various webservers.



I also generated a CA cert using
./openssl req -new -x509 -key privkey.pem -out cacert.pem -days 1095

I installed this on my webserver (www.abcd.com) as a Trusted Certificate
Authority (CA). This install was just fine. It's the webserver cert install
thats killing me..

HELP !!!


Rohan

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Vadim Fedukovich
2003-08-19 09:16:43 UTC
Permalink
Post by Rohan Pinto
Hi All,
Please help. (openssl newbie - the newest of bees)
I installed openssl.
I generated my private key using
./openssl genrsa -des3 -out privkey.pem 2048
I have a webserver running on www.abcd.com (on a different box)
I generated a CSR from the webserver (using the admin console)
I copied the CSR over to my server running openssl (placed it in
/usr/local/ssl/bin)
I tried to sign this CSR using
./openssl x509 -req -days 1461 -in abcd.csr -signkey privkey.pem -out
abcd.crt
this will output a certificate with issuer set to subject picked up
from CSR. Public key is also set to one from CSR. However, certificate
is signed using private key generated with "./openssl genrsa"
and it would not match public key from CSR

One should expect any application to complain about
such a certificate somehow
Post by Rohan Pinto
Now i tried to install this certificate on the webserver (www.abcd.com)
I get an error "Incorrect usage: No Private key", " the server could not
find the private key assicated with this certificate"
What do i need to do in order to be able to sign certificate signing
requests generated from various webservers.
please try "openssl ca" instead
Post by Rohan Pinto
I also generated a CA cert using
./openssl req -new -x509 -key privkey.pem -out cacert.pem -days 1095
I installed this on my webserver (www.abcd.com) as a Trusted Certificate
Authority (CA). This install was just fine. It's the webserver cert install
thats killing me..
HELP !!!
Rohan
hope this helps,
Vadim

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Charles B Cranston
2003-08-19 14:31:33 UTC
Permalink
Forget about that advice to use ca -- x509 works just
fine, I've built an entire PKI with it.

You seem to have the pieces down well, but you need a
global strategy in order to sequence them :-)

The "standard model" for server certificate generation
is that server software generates a key pair and packages
the public key into a CSR, which is then sent off to a
CA to be converted into a Certificate. Thus the 'real'
private key you want to use is sitting somewhere in
your webserver running on abcd, and there should be a
function in the admin console that brings in the certificate.

So, the immediate problem is that the public key in the
certificate matches the private key you generated with genrsa
and NOT the (different) private key that was generated with
the CSR and is waiting for it.

What you need to do is:

1. create a root certificate
2. install that root certificate into all your web browsers
3. create a CSR on the server
4. use the root to sign that CSR into a server certificate
5. install the server certificate on the server

So there are two certificates, a root certificate and a
server certificate.

Please don't be afraid to ask intelligent questions.
The people on this list were very helpful to me while I
was learning this stuff, and as a result of their kindness
I've built a PKI for a major eastern university that is
issuing hundreds of server certificates, and the biggest
problem we have is the question of how much to charge
for them...
--
Charles B (Ben) Cranston
mailto: zben-***@public.gmane.org
http://www.wam.umd.edu/~zben

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
David García Aristegui
2003-08-19 16:15:46 UTC
Permalink
I have a beta CA MiniHowto/Example for Newbies (like me!!!), at first
only for Netscape browsers. If somebody is interested i'll send the
Howto, and i think we could collaborate. Is based on the following
works

1. CA Recipe - Ketil Danielsen
http://home.himolde.no/~kd/prosjekt/ca/ca.html
2. Securing web access with a private certificate authority - Paul Weinstein
http://weinstein.org/work/presentations/apacheconus02/pca.pdf
3. Creating your own CA/Distributing your CA to client browsers - Rob
Flickenger
http://www.onlamp.com/pub/a/onlamp/2003/02/06/linuxhacks.html
http://www.onlamp.com/pub/a/onlamp/2003/02/20/linuxhacks.html

and with (by the moment a little buggy) scripts to do the common tasks.
See you!!!
Post by Charles B Cranston
Forget about that advice to use ca -- x509 works just
fine, I've built an entire PKI with it.
You seem to have the pieces down well, but you need a
global strategy in order to sequence them :-)
The "standard model" for server certificate generation
is that server software generates a key pair and packages
the public key into a CSR, which is then sent off to a
CA to be converted into a Certificate. Thus the 'real'
private key you want to use is sitting somewhere in
your webserver running on abcd, and there should be a
function in the admin console that brings in the certificate.
So, the immediate problem is that the public key in the
certificate matches the private key you generated with genrsa
and NOT the (different) private key that was generated with
the CSR and is waiting for it.
1. create a root certificate
2. install that root certificate into all your web browsers
3. create a CSR on the server
4. use the root to sign that CSR into a server certificate
5. install the server certificate on the server
So there are two certificates, a root certificate and a
server certificate.
Please don't be afraid to ask intelligent questions.
The people on this list were very helpful to me while I
was learning this stuff, and as a result of their kindness
I've built a PKI for a major eastern university that is
issuing hundreds of server certificates, and the biggest
problem we have is the question of how much to charge
for them...
--
Charles B (Ben) Cranston
http://www.wam.umd.edu/~zben
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Rohan Pinto
2003-08-19 16:37:03 UTC
Permalink
Post by Charles B Cranston
1. create a root certificate
2. install that root certificate into all your web browsers
3. create a CSR on the server
4. use the root to sign that CSR into a server certificate
This is the part that i would need help on. I have created a root
certificate, I've imported that into all my web browsers and also on the
webserver. I have also crested a cSR from the webserver. I dont know how to
sign the CSR .... If I could get some advise on jow to sign a CSR i would at
leats get an understanding of the flow. From what i have understood so
far... I used the rootCA private key while signing the CSR. The webservers
public key is sittign somewhere on the webserver. i would need to use that
key to sign the CSR. The question is. how do i get that key?. Also.... I am
confused as i believed that the webservers key would be embedded in the CSR.
Post by Charles B Cranston
5. install the server certificate on the server
Wish i could get some pointers on the the steps to sign a CSR thats
generated from a webserver (which resides on abcd.com domain) using openssl
that resides on (xyz.com)

Rohan

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Dr. Stephen Henson
2003-08-19 17:05:23 UTC
Permalink
Post by Rohan Pinto
This is the part that i would need help on. I have created a root
certificate, I've imported that into all my web browsers and also on the
webserver. I have also crested a cSR from the webserver. I dont know how to
sign the CSR .... If I could get some advise on jow to sign a CSR i would at
leats get an understanding of the flow. From what i have understood so
far... I used the rootCA private key while signing the CSR. The webservers
public key is sittign somewhere on the webserver. i would need to use that
key to sign the CSR. The question is. how do i get that key?. Also.... I am
confused as i believed that the webservers key would be embedded in the CSR.
This normally involves using the 'ca' utility, before you do that a certain
directory structure needs to be set up. This is documented in the ca manual
page.

However its easier to use the CA.pl script this can create the root CA and
directory structure and sign the request among other things. Something like:

CA.pl -newca
<move server request to newreq.pem>
CA.pl -sign
new cert is then in newcert.pem

Steve.
--
Dr Stephen N. Henson.
Core developer of the OpenSSL project: http://www.openssl.org/
Freelance consultant see: http://www.drh-consultancy.demon.co.uk/
Email: shenson-Pqzf/mBTa20vnmoEvQhlZgbYiX8G1TQY9dF7HbQ/***@public.gmane.org, PGP key: via homepage.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Charles B Cranston
2003-08-19 19:21:32 UTC
Permalink
Post by Rohan Pinto
Post by Charles B Cranston
1. create a root certificate
2. install that root certificate into all your web browsers
3. create a CSR on the server
4. use the root to sign that CSR into a server certificate
This is the part that i would need help on. I have created a root
certificate, I've imported that into all my web browsers and also on the
webserver. I have also crested a cSR from the webserver. I dont know how to
sign the CSR .... If I could get some advise on jow to sign a CSR i would at
leats get an understanding of the flow. From what i have understood so
far... I used the rootCA private key while signing the CSR. The webservers
public key is sittign somewhere on the webserver. i would need to use that
key to sign the CSR. The question is. how do i get that key?. Also.... I am
confused as i believed that the webservers key would be embedded in the CSR.
You are doing fine until you get to "signing the CSR with the
webserver's public key which is sitting somewhere on the webserver."

Important theoretical points

1. The CSR "IS" the webserver's public key, plus some ID info

2. The CSR is made INTO the Certificate by signing with the
root's private key (not any server key nor any public key)

3. The webserver's PRIVATE key is the one sitting somewhere on
the webserver

4. The Certificate IS the webserver's public key (as obtained
from the CSR) and is SIGNED using the root's private key.
Why? So the root's public key, which EVERYBODY has access to,
can be used to VERIFY that the certificate has not been forged.

So, take the CSR from the webserver machine to the machine where
you are running OpenSSL. Sign the CSR into a certificate using
the private key from the root certificate. This can be done with
either the "ca" tool (or something like CA.PL which calls it) or
with the "x509" tool. Take the certificate back and install it
into the webserver. The way to do this varies from webserver to
webserver but go to

http://www.ssl.com/support/installation.jsp

and look at the menu over on the right hand side. Find your
webserver software and see if they have good installation
documentation. This is a VERY well done web site.
Post by Rohan Pinto
Post by Charles B Cranston
5. install the server certificate on the server
Wish i could get some pointers on the the steps to sign a CSR thats
generated from a webserver (which resides on abcd.com domain) using
openssl that resides on (xyz.com)
on xyz.com:

ftp abcd.com
get server.csr.pem
quit
openssl x509 -req -in server.csr.pem \
-CA root.cert.pem -CAkey root.key.pem <more options> \
-out server.cert.pem
ftp abcd.com
put server.cert.pem

Under <more options> there is -CAserial to set a serial number,
maybe -sha1 to use SHA instead of MD5 as a hash, -days to set the
certificate lifetime, etc. Some of these things can be set in the
OpenSSL configuration file. I'd look at "man x509".

Alternatively, signing can be done with the "ca" tool, but I'm
not so familiar with it. It requires an infrastructure of a data
file and a serial number file and directories of various things etc
and since I based our database on Oracle it seemed too high-level and
high-maintenance to use. Unfortunately it seems I need to use it
for my personal identity and privacy PKIs since "x509" doesn't seem
to know how to process a SPKIX file.

Sorry about my somewhat fuzzy (and in some places WRONG) answer
before. I should REALLY learn not to type anything in before noon.
--
Charles B (Ben) Cranston
mailto: zben-***@public.gmane.org
http://www.wam.umd.edu/~zben

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Rohan Pinto
2003-08-21 01:01:55 UTC
Permalink
I keep getting a error when i try this.

i generated privkey.pem by using

./openssl genrsa -out privkey.pem 2048

AND cacert.pem by using
./openssl req -new -x509 -key privkey.pem -out cacert.pem -days 1095

Then I generated a CSR from my webserver (on a different domain/different
box different instalce altogether) named it mev.csr.pem
transfered that file over to the box running openssl.

./openssl x509 -req -in mev.csr.pem -CA cacert.pem -CAkey
rivkey.pem -days 1024 -out mev.cert.pem
Signature ok
subject=/C=US/ST=California/L=San Jose/O=MEV DEMO LAB
SERVER/OU=RandD/CN=www.mev.com
Getting CA Private Key
Enter PEM pass phrase:
cacert.srl: No such file or directory
2279:error:02001002:system library:fopen:No such file or
directory:bss_file.c:245:fopen('cacert.srl','r')
2279:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:247:

looks like it's looking for a file cacert.srl, but I never specified this
filename,

any insight on this

Rohan
----- Original Message -----
From: "Charles B Cranston" <zben-***@public.gmane.org>
To: <openssl-users-MCmKBN63+***@public.gmane.org>
Sent: Tuesday, August 19, 2003 12:21 PM
Subject: Re: Newbie question - Signing CSR's
Post by Charles B Cranston
Post by Rohan Pinto
Post by Charles B Cranston
1. create a root certificate
2. install that root certificate into all your web browsers
3. create a CSR on the server
4. use the root to sign that CSR into a server certificate
This is the part that i would need help on. I have created a root
certificate, I've imported that into all my web browsers and also on the
webserver. I have also crested a cSR from the webserver. I dont know how to
sign the CSR .... If I could get some advise on jow to sign a CSR i would at
leats get an understanding of the flow. From what i have understood so
far... I used the rootCA private key while signing the CSR. The webservers
public key is sittign somewhere on the webserver. i would need to use that
key to sign the CSR. The question is. how do i get that key?. Also.... I am
confused as i believed that the webservers key would be embedded in the CSR.
You are doing fine until you get to "signing the CSR with the
webserver's public key which is sitting somewhere on the webserver."
Important theoretical points
1. The CSR "IS" the webserver's public key, plus some ID info
2. The CSR is made INTO the Certificate by signing with the
root's private key (not any server key nor any public key)
3. The webserver's PRIVATE key is the one sitting somewhere on
the webserver
4. The Certificate IS the webserver's public key (as obtained
from the CSR) and is SIGNED using the root's private key.
Why? So the root's public key, which EVERYBODY has access to,
can be used to VERIFY that the certificate has not been forged.
So, take the CSR from the webserver machine to the machine where
you are running OpenSSL. Sign the CSR into a certificate using
the private key from the root certificate. This can be done with
either the "ca" tool (or something like CA.PL which calls it) or
with the "x509" tool. Take the certificate back and install it
into the webserver. The way to do this varies from webserver to
webserver but go to
http://www.ssl.com/support/installation.jsp
and look at the menu over on the right hand side. Find your
webserver software and see if they have good installation
documentation. This is a VERY well done web site.
Post by Rohan Pinto
Post by Charles B Cranston
5. install the server certificate on the server
Wish i could get some pointers on the the steps to sign a CSR thats
generated from a webserver (which resides on abcd.com domain) using
openssl that resides on (xyz.com)
ftp abcd.com
get server.csr.pem
quit
openssl x509 -req -in server.csr.pem \
-CA root.cert.pem -CAkey root.key.pem <more options> \
-out server.cert.pem
ftp abcd.com
put server.cert.pem
Under <more options> there is -CAserial to set a serial number,
maybe -sha1 to use SHA instead of MD5 as a hash, -days to set the
certificate lifetime, etc. Some of these things can be set in the
OpenSSL configuration file. I'd look at "man x509".
Alternatively, signing can be done with the "ca" tool, but I'm
not so familiar with it. It requires an infrastructure of a data
file and a serial number file and directories of various things etc
and since I based our database on Oracle it seemed too high-level and
high-maintenance to use. Unfortunately it seems I need to use it
for my personal identity and privacy PKIs since "x509" doesn't seem
to know how to process a SPKIX file.
Sorry about my somewhat fuzzy (and in some places WRONG) answer
before. I should REALLY learn not to type anything in before noon.
--
Charles B (Ben) Cranston
http://www.wam.umd.edu/~zben
______________________________________________________________________
OpenSSL Project http://www.openssl.org
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Charles B Cranston
2003-08-21 14:38:11 UTC
Permalink
Sigh. But if you READ THE MAN PAGE FOR X509 YOU WOULD
SEE THAT IF THERE IS NO -CASERIAL FILE SPECIFIED IT
LOOKS IN A FILE WITH THE SAME NAME AS THE SIGNING CERT
BUT WITH A SRL SUFFIX.

So if you put the two ASCII characters 1A into a file
called cacert.srl you would expect the certificate that
is produced to have serial number 25 and the file to
contain 1B after all the smoke has cleared.

Honestly, you'd think after you led the horse to within
two feet of the river he would figure it out...
Post by Rohan Pinto
I keep getting a error when i try this.
i generated privkey.pem by using
./openssl genrsa -out privkey.pem 2048
AND cacert.pem by using
./openssl req -new -x509 -key privkey.pem -out cacert.pem -days 1095
Then I generated a CSR from my webserver (on a different domain/different
box different instalce altogether) named it mev.csr.pem
transfered that file over to the box running openssl.
./openssl x509 -req -in mev.csr.pem -CA cacert.pem -CAkey
rivkey.pem -days 1024 -out mev.cert.pem
Signature ok
subject=/C=US/ST=California/L=San Jose/O=MEV DEMO LAB
SERVER/OU=RandD/CN=www.mev.com
Getting CA Private Key
cacert.srl: No such file or directory
2279:error:02001002:system library:fopen:No such file or
directory:bss_file.c:245:fopen('cacert.srl','r')
looks like it's looking for a file cacert.srl, but I never specified this
filename,
any insight on this
Rohan
----- Original Message -----
Sent: Tuesday, August 19, 2003 12:21 PM
Subject: Re: Newbie question - Signing CSR's
Post by Charles B Cranston
Post by Rohan Pinto
Post by Charles B Cranston
1. create a root certificate
2. install that root certificate into all your web browsers
3. create a CSR on the server
4. use the root to sign that CSR into a server certificate
This is the part that i would need help on. I have created a root
certificate, I've imported that into all my web browsers and also on the
webserver. I have also crested a cSR from the webserver. I dont know how
to
Post by Charles B Cranston
Post by Rohan Pinto
sign the CSR .... If I could get some advise on jow to sign a CSR i
would at
Post by Charles B Cranston
Post by Rohan Pinto
leats get an understanding of the flow. From what i have understood so
far... I used the rootCA private key while signing the CSR. The
webservers
Post by Charles B Cranston
Post by Rohan Pinto
public key is sittign somewhere on the webserver. i would need to use
that
Post by Charles B Cranston
Post by Rohan Pinto
key to sign the CSR. The question is. how do i get that key?. Also.... I
am
Post by Charles B Cranston
Post by Rohan Pinto
confused as i believed that the webservers key would be embedded in the
CSR.
Post by Charles B Cranston
You are doing fine until you get to "signing the CSR with the
webserver's public key which is sitting somewhere on the webserver."
Important theoretical points
1. The CSR "IS" the webserver's public key, plus some ID info
2. The CSR is made INTO the Certificate by signing with the
root's private key (not any server key nor any public key)
3. The webserver's PRIVATE key is the one sitting somewhere on
the webserver
4. The Certificate IS the webserver's public key (as obtained
from the CSR) and is SIGNED using the root's private key.
Why? So the root's public key, which EVERYBODY has access to,
can be used to VERIFY that the certificate has not been forged.
So, take the CSR from the webserver machine to the machine where
you are running OpenSSL. Sign the CSR into a certificate using
the private key from the root certificate. This can be done with
either the "ca" tool (or something like CA.PL which calls it) or
with the "x509" tool. Take the certificate back and install it
into the webserver. The way to do this varies from webserver to
webserver but go to
http://www.ssl.com/support/installation.jsp
and look at the menu over on the right hand side. Find your
webserver software and see if they have good installation
documentation. This is a VERY well done web site.
Post by Rohan Pinto
Post by Charles B Cranston
5. install the server certificate on the server
Wish i could get some pointers on the the steps to sign a CSR thats
generated from a webserver (which resides on abcd.com domain) using
openssl that resides on (xyz.com)
ftp abcd.com
get server.csr.pem
quit
openssl x509 -req -in server.csr.pem \
-CA root.cert.pem -CAkey root.key.pem <more options> \
-out server.cert.pem
ftp abcd.com
put server.cert.pem
Under <more options> there is -CAserial to set a serial number,
maybe -sha1 to use SHA instead of MD5 as a hash, -days to set the
certificate lifetime, etc. Some of these things can be set in the
OpenSSL configuration file. I'd look at "man x509".
Alternatively, signing can be done with the "ca" tool, but I'm
not so familiar with it. It requires an infrastructure of a data
file and a serial number file and directories of various things etc
and since I based our database on Oracle it seemed too high-level and
high-maintenance to use. Unfortunately it seems I need to use it
for my personal identity and privacy PKIs since "x509" doesn't seem
to know how to process a SPKIX file.
Sorry about my somewhat fuzzy (and in some places WRONG) answer
before. I should REALLY learn not to type anything in before noon.
--
Charles B (Ben) Cranston
http://www.wam.umd.edu/~zben
______________________________________________________________________
OpenSSL Project http://www.openssl.org
______________________________________________________________________
OpenSSL Project http://www.openssl.org
--
Charles B (Ben) Cranston
mailto: zben-***@public.gmane.org
http://www.wam.umd.edu/~zben

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Charles B Cranston
2003-08-21 15:30:50 UTC
Permalink
Post by Charles B Cranston
So if you put the two ASCII characters 1A into a file
called cacert.srl you would expect the certificate that
is produced to have serial number 25 and the file to
contain 1B after all the smoke has cleared.
I'm sorry, that example should have been (of course) that
if you put 19 into the file then it should generate cert
serial 25 and increment the file to 1A. The pedagogical
principle was to hammer home the idea that it is in hex
format (and an even number of digits).

I refer to previous messages that I should not post
before noon...
--
Charles B (Ben) Cranston
mailto: zben-***@public.gmane.org
http://www.wam.umd.edu/~zben

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Rohan Pinto
2003-08-21 20:39:28 UTC
Permalink
Followed every step.
I stalled the rootCA on my webserver
also installe dhte server cert on the webserve

installed the rootCA on my browser (mozilla)

when i access the site via htps i get a error message "Could not establish a
encrypted connection because certificate presented by www.abcd.com is
invalid or corrupt errorcode -8182"

WOW!!!

Rohan
----- Original Message -----
From: "Charles B Cranston" <zben-***@public.gmane.org>
To: <openssl-users-MCmKBN63+***@public.gmane.org>
Sent: Thursday, August 21, 2003 8:30 AM
Subject: Re: Newbie question - Signing CSR's
Post by Charles B Cranston
Post by Charles B Cranston
So if you put the two ASCII characters 1A into a file
called cacert.srl you would expect the certificate that
is produced to have serial number 25 and the file to
contain 1B after all the smoke has cleared.
I'm sorry, that example should have been (of course) that
if you put 19 into the file then it should generate cert
serial 25 and increment the file to 1A. The pedagogical
principle was to hammer home the idea that it is in hex
format (and an even number of digits).
I refer to previous messages that I should not post
before noon...
--
Charles B (Ben) Cranston
http://www.wam.umd.edu/~zben
______________________________________________________________________
OpenSSL Project http://www.openssl.org
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Charles B Cranston
2003-08-21 20:50:38 UTC
Permalink
OK, use

openssl s_client -connect www.abcd.com:443 -showcerts

and see if the certs that are being presented are sane.

This is progress!
Post by Rohan Pinto
Followed every step.
I stalled the rootCA on my webserver
also installe dhte server cert on the webserve
installed the rootCA on my browser (mozilla)
when i access the site via htps i get a error message "Could not establish a
encrypted connection because certificate presented by www.abcd.com is
invalid or corrupt errorcode -8182"
WOW!!!
Rohan
----- Original Message -----
Sent: Thursday, August 21, 2003 8:30 AM
Subject: Re: Newbie question - Signing CSR's
Post by Charles B Cranston
Post by Charles B Cranston
So if you put the two ASCII characters 1A into a file
called cacert.srl you would expect the certificate that
is produced to have serial number 25 and the file to
contain 1B after all the smoke has cleared.
I'm sorry, that example should have been (of course) that
if you put 19 into the file then it should generate cert
serial 25 and increment the file to 1A. The pedagogical
principle was to hammer home the idea that it is in hex
format (and an even number of digits).
I refer to previous messages that I should not post
before noon...
--
Charles B (Ben) Cranston
http://www.wam.umd.edu/~zben
______________________________________________________________________
OpenSSL Project http://www.openssl.org
______________________________________________________________________
OpenSSL Project http://www.openssl.org
--
Charles B (Ben) Cranston
mailto: zben-***@public.gmane.org
http://www.wam.umd.edu/~zben

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Saju Paul
2003-08-21 21:36:48 UTC
Permalink
Did a similair thing recently and did not have any problems. Referred to a document called 'SSL Certificates HOWTO' written by Franck Martin. Not sure where I got it from but it is available somewhere in the OpenSSL documentation.

Hope this helps...

Saju Paul
----- Original Message -----
From: "Charles B Cranston" <zben-***@public.gmane.org>
To: <openssl-users-MCmKBN63+***@public.gmane.org>
Sent: Thursday, August 21, 2003 4:50 PM
Subject: Re: Newbie question - Signing CSR's
Post by Charles B Cranston
OK, use
openssl s_client -connect www.abcd.com:443 -showcerts
and see if the certs that are being presented are sane.
This is progress!
Post by Rohan Pinto
Followed every step.
I stalled the rootCA on my webserver
also installe dhte server cert on the webserve
installed the rootCA on my browser (mozilla)
when i access the site via htps i get a error message "Could not establish a
encrypted connection because certificate presented by www.abcd.com is
invalid or corrupt errorcode -8182"
WOW!!!
Rohan
----- Original Message -----
Sent: Thursday, August 21, 2003 8:30 AM
Subject: Re: Newbie question - Signing CSR's
Post by Charles B Cranston
Post by Charles B Cranston
So if you put the two ASCII characters 1A into a file
called cacert.srl you would expect the certificate that
is produced to have serial number 25 and the file to
contain 1B after all the smoke has cleared.
I'm sorry, that example should have been (of course) that
if you put 19 into the file then it should generate cert
serial 25 and increment the file to 1A. The pedagogical
principle was to hammer home the idea that it is in hex
format (and an even number of digits).
I refer to previous messages that I should not post
before noon...
--
Charles B (Ben) Cranston
http://www.wam.umd.edu/~zben
______________________________________________________________________
OpenSSL Project http://www.openssl.org
______________________________________________________________________
OpenSSL Project http://www.openssl.org
--
Charles B (Ben) Cranston
http://www.wam.umd.edu/~zben
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Rohan Pinto
2003-08-21 23:00:10 UTC
Permalink
Certs presented are just fine...

Rohan
----- Original Message -----
From: "Charles B Cranston" <zben-***@public.gmane.org>
To: <openssl-users-MCmKBN63+***@public.gmane.org>
Sent: Thursday, August 21, 2003 1:50 PM
Subject: Re: Newbie question - Signing CSR's
Post by Charles B Cranston
OK, use
openssl s_client -connect www.abcd.com:443 -showcerts
and see if the certs that are being presented are sane.
This is progress!
Post by Rohan Pinto
Followed every step.
I stalled the rootCA on my webserver
also installe dhte server cert on the webserve
installed the rootCA on my browser (mozilla)
when i access the site via htps i get a error message "Could not establish a
encrypted connection because certificate presented by www.abcd.com is
invalid or corrupt errorcode -8182"
WOW!!!
Rohan
----- Original Message -----
Sent: Thursday, August 21, 2003 8:30 AM
Subject: Re: Newbie question - Signing CSR's
Post by Charles B Cranston
Post by Charles B Cranston
So if you put the two ASCII characters 1A into a file
called cacert.srl you would expect the certificate that
is produced to have serial number 25 and the file to
contain 1B after all the smoke has cleared.
I'm sorry, that example should have been (of course) that
if you put 19 into the file then it should generate cert
serial 25 and increment the file to 1A. The pedagogical
principle was to hammer home the idea that it is in hex
format (and an even number of digits).
I refer to previous messages that I should not post
before noon...
--
Charles B (Ben) Cranston
http://www.wam.umd.edu/~zben
______________________________________________________________________
OpenSSL Project http://www.openssl.org
______________________________________________________________________
OpenSSL Project http://www.openssl.org
--
Charles B (Ben) Cranston
http://www.wam.umd.edu/~zben
______________________________________________________________________
OpenSSL Project http://www.openssl.org
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Dr. Stephen Henson
2003-08-21 23:37:35 UTC
Permalink
Post by Rohan Pinto
Certs presented are just fine...
Duplicate serial numbers is a problem if you use some (broken) techniques to
create the certificates, which is why I suggested CA.pl.

Why don't you send the certificates to either me or the list to see if there's
anything obviously wrong?

Steve.
--
Dr Stephen N. Henson.
Core developer of the OpenSSL project: http://www.openssl.org/
Freelance consultant see: http://www.drh-consultancy.demon.co.uk/
Email: shenson-Pqzf/mBTa20vnmoEvQhlZgbYiX8G1TQY9dF7HbQ/***@public.gmane.org, PGP key: via homepage.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Rohan Pinto
2003-08-22 02:36:58 UTC
Permalink
*Pardon the lengthy email*
Well, the serial numbers are correct, I see one with the serialno 00 and one
with the serialno 01.
I'm trying to do it all over again... and this time i'm typing notes into my
email as i'm doing it.

guess, I did not explain what I'm trying to do here. let me take a stab at
what i'm trying to achieve.. (this would enable you to tell me if it sounds
like i'm smoking)

I have a SunONE WebServer 6.0 running on a certain subnet. (www.abcd.com -
for this example)
The Webserver serves content over http.
I intend to protect this content via PDC authentication. To do so, I'd need
2 things.
1. A Server Cert
2. A User Cert (on a smartcard) [assumption is that the user would be
prompted to insert his smartcard everytime he wishes to access the server.
i'd plug the usercert on the browser (custom app) and retain the public key
on the card. the browser would have a pointer to the card for the piublic
key]

Both these certs would need to be issued by the same authority.

SO: I installed openSSL on a seperate box altogether. (www.xyz.com)
I wassumed that in order for the SSL cert to be trusted the webserver and
all client machines would neeed the rootCA cert as well.
So i followed the caminihoto guide and created self signed a rootCAcert
using: (on www.xyz.com)
openssl req -new -x509 -keyout ca/private/ca.key -out
ca/certs/ca.cert -config /opt/openssl/openssl.cnf
I then generated a CSR from my webserver (using it's admin utility)
(www.abcd.com)
I then FTP'd the CSR over to www.xyz.com from www.abcd.com (saved it as
ca/certs/server.csr)
I tried to sign it (on www.xyz.com) using :
openssl ca -out ca/certs/server.cert -config
/opt/openssl/openssl.cnf -infiles ca/certs/server.csr

Now I assumed that I had 2 things. a rootCA cert (ca.cert) and a webserver
ssl cert (server.cert)
I renamed these files as .cer

Then I launched my webserver admin console and added ca.cer as the
rootCAcert and server.cer as the cert for the server itself.
I then added a listen socket on the server listening on port 443. I also
enabled Client Authentication (for PDC authentication)
at this point even though i did not have a PDC i assumed that teh server
would simply deny access.
but the issue is that this method just didnt work.
Well, i may sound stipid (this is my first take at openssl). Usually i user
verisign certs and dont bother too much with the certs themselves. Well, For
this project of mine I cannot afford to buy certs from verisign !!! so here
comes openssl to my rescue...

hopefully I shall be rescued soon...

in the process.... i would also like to know how to issue user certs using
openssl !!!


My ca.cer file is as follows: (for www.xyz.com)
-----BEGIN CERTIFICATE-----
MIIEajCCA9O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YIZIAYb4QgENBB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRp
ZmljYXRlMB0GA1UdDgQWBBToFUmY3keE7W3S15aq5CnyZY6ftzCCAQcGA1UdIwSB
/zCB/IAUW6lXMMVmNK9Vz6dT5nOpddcArROhgeCkgd0wgdoxCzAJBgNVBAYTAlVT
MRMwEQYDVQQIEwpDYWxpZm9ybmlhMREwDwYDVQQHEwhTYW4gSm9zZTElMCMGA1UE
ChMcTUcgU29sdXRpb25zIENsYXNzIDMgUm9vdCBDQTE+MDwGA1UECxM1U2VjdXJp
dHkgSW5mcmFzdHJ1Y3R1cmUgRGVwbG95bWVudCBFbmdpbmVlcmluZyAoU0lERSkx
GTAXBgNVBAMTEHd3dy5sZGFwZ3VydS5jb20xITAfBgkqhkiG9w0BCQEWEmFkbWlu
QGxkYXBndXJ1LmNvbYIBADANBgkqhkiG9w0BAQQFAAOBgQBTAA88qcCuBLzZVSZG
kMO6Y2hrpxWw/rAIvtyhOrWUTu+Wr3T4/WiURfXv13SYGi4taNoNhqp7mIBDFmjG
hG14y5gcr06pdNpHCIR+E6skJoy07so+HrAGhINETxWd9fBT23JZ85xoLxTuZzCj
GDbnpPBSARQTLh8tsLoEvAavTw==
-----END CERTIFICATE-----

HELP !!!
Rohan



----- Original Message -----
From: "Dr. Stephen Henson" <steve-MCmKBN63+***@public.gmane.org>
To: <openssl-users-MCmKBN63+***@public.gmane.org>
Sent: Thursday, August 21, 2003 4:37 PM
Subject: Re: Newbie question - Signing CSR's
Post by Dr. Stephen Henson
Post by Rohan Pinto
Certs presented are just fine...
Duplicate serial numbers is a problem if you use some (broken) techniques to
create the certificates, which is why I suggested CA.pl.
Why don't you send the certificates to either me or the list to see if there's
anything obviously wrong?
Steve.
--
Dr Stephen N. Henson.
Core developer of the OpenSSL project: http://www.openssl.org/
Freelance consultant see: http://www.drh-consultancy.demon.co.uk/
______________________________________________________________________
OpenSSL Project http://www.openssl.org
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Rohan Pinto
2003-08-22 02:52:30 UTC
Permalink
super-quick question again.

god-bless

i can access my site over https but ONLY using netscape or mozilla NOT ie.
are the servercerts BROWSER specific ?

Rohan
----- Original Message -----
From: "Rohan Pinto" <rohan-***@public.gmane.org>
To: <openssl-users-MCmKBN63+***@public.gmane.org>
Sent: Thursday, August 21, 2003 7:36 PM
Subject: Re: Newbie question - Signing CSR's
Post by Rohan Pinto
*Pardon the lengthy email*
Well, the serial numbers are correct, I see one with the serialno 00 and one
with the serialno 01.
I'm trying to do it all over again... and this time i'm typing notes into my
email as i'm doing it.
guess, I did not explain what I'm trying to do here. let me take a stab at
what i'm trying to achieve.. (this would enable you to tell me if it sounds
like i'm smoking)
I have a SunONE WebServer 6.0 running on a certain subnet. (www.abcd.com -
for this example)
The Webserver serves content over http.
I intend to protect this content via PDC authentication. To do so, I'd need
2 things.
1. A Server Cert
2. A User Cert (on a smartcard) [assumption is that the user would be
prompted to insert his smartcard everytime he wishes to access the server.
i'd plug the usercert on the browser (custom app) and retain the public key
on the card. the browser would have a pointer to the card for the piublic
key]
Both these certs would need to be issued by the same authority.
SO: I installed openSSL on a seperate box altogether. (www.xyz.com)
I wassumed that in order for the SSL cert to be trusted the webserver and
all client machines would neeed the rootCA cert as well.
So i followed the caminihoto guide and created self signed a rootCAcert
using: (on www.xyz.com)
openssl req -new -x509 -keyout ca/private/ca.key -out
ca/certs/ca.cert -config /opt/openssl/openssl.cnf
I then generated a CSR from my webserver (using it's admin utility)
(www.abcd.com)
I then FTP'd the CSR over to www.xyz.com from www.abcd.com (saved it as
ca/certs/server.csr)
openssl ca -out ca/certs/server.cert -config
/opt/openssl/openssl.cnf -infiles ca/certs/server.csr
Now I assumed that I had 2 things. a rootCA cert (ca.cert) and a webserver
ssl cert (server.cert)
I renamed these files as .cer
Then I launched my webserver admin console and added ca.cer as the
rootCAcert and server.cer as the cert for the server itself.
I then added a listen socket on the server listening on port 443. I also
enabled Client Authentication (for PDC authentication)
at this point even though i did not have a PDC i assumed that teh server
would simply deny access.
but the issue is that this method just didnt work.
Well, i may sound stipid (this is my first take at openssl). Usually i user
verisign certs and dont bother too much with the certs themselves. Well, For
this project of mine I cannot afford to buy certs from verisign !!! so here
comes openssl to my rescue...
hopefully I shall be rescued soon...
in the process.... i would also like to know how to issue user certs using
openssl !!!
My ca.cer file is as follows: (for www.xyz.com)
-----BEGIN CERTIFICATE-----
MIIEajCCA9OgAwIBAgIBADANBgkqhkiG9w0BAQQFADCB2jELMAkGA1UEBhMCVVMx
EzARBgNVBAgTCkNhbGlmb3JuaWExETAPBgNVBAcTCFNhbiBKb3NlMSUwIwYDVQQK
ExxNRyBTb2x1dGlvbnMgQ2xhc3MgMyBSb290IENBMT4wPAYDVQQLEzVTZWN1cml0
eSBJbmZyYXN0cnVjdHVyZSBEZXBsb3ltZW50IEVuZ2luZWVyaW5nIChTSURFKTEZ
MBcGA1UEAxMQd3d3LmxkYXBndXJ1LmNvbTEhMB8GCSqGSIb3DQEJARYSYWRtaW5A
bGRhcGd1cnUuY29tMB4XDTAzMDgyMjAxMzkwN1oXDTIzMDgxNzAxMzkwN1owgdox
CzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMREwDwYDVQQHEwhTYW4g
Sm9zZTElMCMGA1UEChMcTUcgU29sdXRpb25zIENsYXNzIDMgUm9vdCBDQTE+MDwG
A1UECxM1U2VjdXJpdHkgSW5mcmFzdHJ1Y3R1cmUgRGVwbG95bWVudCBFbmdpbmVl
cmluZyAoU0lERSkxGTAXBgNVBAMTEHd3dy5sZGFwZ3VydS5jb20xITAfBgkqhkiG
9w0BCQEWEmFkbWluQGxkYXBndXJ1LmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAw
gYkCgYEAm0GwdzvKpHB5w+zqRC0dPzJJklVgn1WCaIKMO1DMFOcsBZ5VsoBIasy8
n24NozDd6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NvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
9TuvXzoFuSDzkxSHQ3b+Cw5kDcSSwoISESrnJ6TeUwdRrXSV9YzN0Xj4JvQtavCH
mlTKE+xx5LQV/3G0ArzE5OB0bgaIwSGmJKdpucztpWslxtYDuwMDS/aG0sZfNbRe
AKFOVWtO9GfoN8Nz6U6TtgdYat+dTJWs/1O4BFC1j20CAwEAAaOCAWcwggFjMAkG
A1UdEwQCMAAwLAYJYIZIAYb4QgENBB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRp
ZmljYXRlMB0GA1UdDgQWBBToFUmY3keE7W3S15aq5CnyZY6ftzCCAQcGA1UdIwSB
/zCB/IAUW6lXMMVmNK9Vz6dT5nOpddcArROhgeCkgd0wgdoxCzAJBgNVBAYTAlVT
MRMwEQYDVQQIEwpDYWxpZm9ybmlhMREwDwYDVQQHEwhTYW4gSm9zZTElMCMGA1UE
ChMcTUcgU29sdXRpb25zIENsYXNzIDMgUm9vdCBDQTE+MDwGA1UECxM1U2VjdXJp
dHkgSW5mcmFzdHJ1Y3R1cmUgRGVwbG95bWVudCBFbmdpbmVlcmluZyAoU0lERSkx
GTAXBgNVBAMTEHd3dy5sZGFwZ3VydS5jb20xITAfBgkqhkiG9w0BCQEWEmFkbWlu
QGxkYXBndXJ1LmNvbYIBADANBgkqhkiG9w0BAQQFAAOBgQBTAA88qcCuBLzZVSZG
kMO6Y2hrpxWw/rAIvtyhOrWUTu+Wr3T4/WiURfXv13SYGi4taNoNhqp7mIBDFmjG
hG14y5gcr06pdNpHCIR+E6skJoy07so+HrAGhINETxWd9fBT23JZ85xoLxTuZzCj
GDbnpPBSARQTLh8tsLoEvAavTw==
-----END CERTIFICATE-----
HELP !!!
Rohan
----- Original Message -----
Sent: Thursday, August 21, 2003 4:37 PM
Subject: Re: Newbie question - Signing CSR's
Post by Dr. Stephen Henson
Post by Rohan Pinto
Certs presented are just fine...
Duplicate serial numbers is a problem if you use some (broken)
techniques
Post by Rohan Pinto
to
Post by Dr. Stephen Henson
create the certificates, which is why I suggested CA.pl.
Why don't you send the certificates to either me or the list to see if
there's
Post by Dr. Stephen Henson
anything obviously wrong?
Steve.
--
Dr Stephen N. Henson.
Core developer of the OpenSSL project: http://www.openssl.org/
Freelance consultant see: http://www.drh-consultancy.demon.co.uk/
______________________________________________________________________
OpenSSL Project http://www.openssl.org
______________________________________________________________________
OpenSSL Project http://www.openssl.org
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Rohan Pinto
2003-08-22 03:39:41 UTC
Permalink
i also tried generating a CSr from a third instance of a webserver

When I tried signing it using CA.pl and also openssl ca -out
ca/certs/server.cert -config /opt/openssl/openssl.cnf -infiles
ca/certs/server.csr

I get error messages saying that the CN, O, OU,L etc.. are different.

Emm... is openssl only for self siging ?

Cant i use it for sigining CSR generated by third party servers... ?

Rohan

----- Original Message -----
From: "Rohan Pinto" <rohan-***@public.gmane.org>
To: <openssl-users-MCmKBN63+***@public.gmane.org>
Sent: Thursday, August 21, 2003 7:52 PM
Subject: Re: Newbie question - Signing CSR's
Post by Rohan Pinto
super-quick question again.
god-bless
i can access my site over https but ONLY using netscape or mozilla NOT ie.
are the servercerts BROWSER specific ?
Rohan
----- Original Message -----
Sent: Thursday, August 21, 2003 7:36 PM
Subject: Re: Newbie question - Signing CSR's
Post by Rohan Pinto
*Pardon the lengthy email*
Well, the serial numbers are correct, I see one with the serialno 00 and
one
Post by Rohan Pinto
with the serialno 01.
I'm trying to do it all over again... and this time i'm typing notes
into
Post by Rohan Pinto
my
Post by Rohan Pinto
email as i'm doing it.
guess, I did not explain what I'm trying to do here. let me take a stab at
what i'm trying to achieve.. (this would enable you to tell me if it
sounds
Post by Rohan Pinto
like i'm smoking)
I have a SunONE WebServer 6.0 running on a certain subnet.
(www.abcd.com -
Post by Rohan Pinto
Post by Rohan Pinto
for this example)
The Webserver serves content over http.
I intend to protect this content via PDC authentication. To do so, I'd
need
Post by Rohan Pinto
2 things.
1. A Server Cert
2. A User Cert (on a smartcard) [assumption is that the user would be
prompted to insert his smartcard everytime he wishes to access the server.
i'd plug the usercert on the browser (custom app) and retain the public
key
Post by Rohan Pinto
on the card. the browser would have a pointer to the card for the piublic
key]
Both these certs would need to be issued by the same authority.
SO: I installed openSSL on a seperate box altogether. (www.xyz.com)
I wassumed that in order for the SSL cert to be trusted the webserver and
all client machines would neeed the rootCA cert as well.
So i followed the caminihoto guide and created self signed a rootCAcert
using: (on www.xyz.com)
openssl req -new -x509 -keyout ca/private/ca.key -out
ca/certs/ca.cert -config /opt/openssl/openssl.cnf
I then generated a CSR from my webserver (using it's admin utility)
(www.abcd.com)
I then FTP'd the CSR over to www.xyz.com from www.abcd.com (saved it as
ca/certs/server.csr)
openssl ca -out ca/certs/server.cert -config
/opt/openssl/openssl.cnf -infiles ca/certs/server.csr
Now I assumed that I had 2 things. a rootCA cert (ca.cert) and a webserver
ssl cert (server.cert)
I renamed these files as .cer
Then I launched my webserver admin console and added ca.cer as the
rootCAcert and server.cer as the cert for the server itself.
I then added a listen socket on the server listening on port 443. I also
enabled Client Authentication (for PDC authentication)
at this point even though i did not have a PDC i assumed that teh server
would simply deny access.
but the issue is that this method just didnt work.
Well, i may sound stipid (this is my first take at openssl). Usually i
user
Post by Rohan Pinto
verisign certs and dont bother too much with the certs themselves. Well,
For
Post by Rohan Pinto
this project of mine I cannot afford to buy certs from verisign !!! so
here
Post by Rohan Pinto
comes openssl to my rescue...
hopefully I shall be rescued soon...
in the process.... i would also like to know how to issue user certs using
openssl !!!
My ca.cer file is as follows: (for www.xyz.com)
-----BEGIN CERTIFICATE-----
MIIEajCCA9OgAwIBAgIBADANBgkqhkiG9w0BAQQFADCB2jELMAkGA1UEBhMCVVMx
EzARBgNVBAgTCkNhbGlmb3JuaWExETAPBgNVBAcTCFNhbiBKb3NlMSUwIwYDVQQK
ExxNRyBTb2x1d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oxCzAJBgNVBAYTAlVT
MRMwEQYDVQQIEwpDYWxpZm9ybmlhMREwDwYDVQQHEwhTYW4gSm9zZTElMCMGA1UE
ChMcTUcgU29sdXRpb25zIENsYXNzIDMgUm9vdCBDQTE+MDwGA1UECxM1U2VjdXJp
dHkgSW5mcmFzdHJ1Y3R1cmUgRGVwbG95bWVudCBFbmdpbmVlcmluZyAoU0lERSkx
GTAXBgNVBAMTEHd3dy5sZGFwZ3VydS5jb20xITAfBgkqhkiG9w0BCQEWEmFkbWlu
QGxkYXBndXJ1LmNvbYIBADANBgkqhkiG9w0BAQQFAAOBgQBTAA88qcCuBLzZVSZG
kMO6Y2hrpxWw/rAIvtyhOrWUTu+Wr3T4/WiURfXv13SYGi4taNoNhqp7mIBDFmjG
hG14y5gcr06pdNpHCIR+E6skJoy07so+HrAGhINETxWd9fBT23JZ85xoLxTuZzCj
GDbnpPBSARQTLh8tsLoEvAavTw==
-----END CERTIFICATE-----
HELP !!!
Rohan
----- Original Message -----
Sent: Thursday, August 21, 2003 4:37 PM
Subject: Re: Newbie question - Signing CSR's
Post by Dr. Stephen Henson
Post by Rohan Pinto
Certs presented are just fine...
Duplicate serial numbers is a problem if you use some (broken)
techniques
Post by Rohan Pinto
to
Post by Dr. Stephen Henson
create the certificates, which is why I suggested CA.pl.
Why don't you send the certificates to either me or the list to see if
there's
Post by Dr. Stephen Henson
anything obviously wrong?
Steve.
--
Dr Stephen N. Henson.
Core developer of the OpenSSL project: http://www.openssl.org/
Freelance consultant see: http://www.drh-consultancy.demon.co.uk/
______________________________________________________________________
OpenSSL Project http://www.openssl.org
______________________________________________________________________
OpenSSL Project http://www.openssl.org
______________________________________________________________________
OpenSSL Project http://www.openssl.org
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Dr. Stephen Henson
2003-08-22 14:03:04 UTC
Permalink
Post by Rohan Pinto
i also tried generating a CSr from a third instance of a webserver
When I tried signing it using CA.pl and also openssl ca -out
ca/certs/server.cert -config /opt/openssl/openssl.cnf -infiles
ca/certs/server.csr
I get error messages saying that the CN, O, OU,L etc.. are different.
Well CA.pl shouldn't give that error. If you use the ca command directly then
you should include -policy policy_anything on the command line.
Post by Rohan Pinto
Emm... is openssl only for self siging ?
No it isn't.
Post by Rohan Pinto
Cant i use it for sigining CSR generated by third party servers... ?
At this stage it isn't apparent what the problem is. I'd suggest starting
with a simple certificate: leave most of the fields empty and put something
minimal in the others.

Steve.
--
Dr Stephen N. Henson.
Core developer of the OpenSSL project: http://www.openssl.org/
Freelance consultant see: http://www.drh-consultancy.demon.co.uk/
Email: shenson-Pqzf/mBTa20vnmoEvQhlZgbYiX8G1TQY9dF7HbQ/***@public.gmane.org, PGP key: via homepage.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Charles B Cranston
2003-08-22 14:45:47 UTC
Permalink
Post by Rohan Pinto
i can access my site over https but ONLY using netscape or mozilla NOT ie.
are the servercerts BROWSER specific ?
Well, the sad answer to this question is yes. It turns out that
in the design of SSL the client does the verification, so each
client has its own little set of peccadillos. These are some of
the ones we found:

Netscape 4 will not tolerate an ExtendedKeyUsage extension.

IE REQUIRES the lifespan of the server certificate to properly
nest within the lifespan of the CA certificate that signed it.
This caused us to completely rebuild our CA on April 14. See:

http://cert.umd.edu/cadoc?inter

for all our travails.

If you just generate a one year root and then generate a
one year server certificate ten seconds later, the life
of the server cert does not nest in that of the root cert
and IE fails.

|------ Root ------|
|---- Server ------|

You need to explicitly make the lifetime of the root longer,
or the lifetime of the server shorter.

|------- Root ---------|
|---- Server --------|

Just how is IE rejecting the certificates? Do you get a
display with red X marks, if so, what does it say about
the problem? This could be a good clue as to what is going
wrong.

(Aside, is the root you installed marked to be trusted for
SSL access? There is an example of marking for this kind of
trust at http://cert.umd.edu/rinstall but the picture examples
are for Netscape, I haven't done any screen shots for IE).

You might look at what kind of extensions are included.

The documentation for the extensions is in a docs directory
of the OpenSSL source and it is something innocuous like
openssl.txt or something like that. Also, read the man page
on the openssl.cnf file format.

AND, MOST IMPORTANT, READ THE COMMENTS IN THE DISTRIBUTED
OPENSSL.CNF FILE! They are VERY informative.
--
Charles B (Ben) Cranston
mailto: zben-***@public.gmane.org
http://www.wam.umd.edu/~zben

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Dr. Stephen Henson
2003-08-22 17:08:21 UTC
Permalink
Post by Charles B Cranston
Post by Rohan Pinto
i can access my site over https but ONLY using netscape or mozilla NOT ie.
are the servercerts BROWSER specific ?
Well, the sad answer to this question is yes. It turns out that
in the design of SSL the client does the verification, so each
client has its own little set of peccadillos.
Indeed but if the OP means that you need a different server certificate for
each browser then the answer is no: the requirements aren't mutually
exclusive.
Post by Charles B Cranston
Netscape 4 will not tolerate an ExtendedKeyUsage extension.
Hmmm. What makes you think that? EKU is *required* to handle "step up" (aka
SGC, magic, 128 bit [yuck]) and Netscape 4 handled that.
Post by Charles B Cranston
You might look at what kind of extensions are included.
The documentation for the extensions is in a docs directory
of the OpenSSL source and it is something innocuous like
openssl.txt or something like that. Also, read the man page
on the openssl.cnf file format.
Its doc/openssl.txt and this is referenced in the FAQ.

It shouldn't be necessary to alter the default extensions for a simple SSL
server certificate.

Steve.
--
Dr Stephen N. Henson.
Core developer of the OpenSSL project: http://www.openssl.org/
Freelance consultant see: http://www.drh-consultancy.demon.co.uk/
Email: shenson-Pqzf/mBTa20vnmoEvQhlZgbYiX8G1TQY9dF7HbQ/***@public.gmane.org, PGP key: via homepage.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Charles B Cranston
2003-08-22 18:47:44 UTC
Permalink
Post by Dr. Stephen Henson
Post by Charles B Cranston
Well, the sad answer to this question is yes. It turns out that
in the design of SSL the client does the verification, so each
client has its own little set of peccadillos.
Indeed but if the OP means that you need a different server certificate for
each browser then the answer is no: the requirements aren't mutually
exclusive.
Agreed, we were able to eventually arrive at an architecture
that seems to work for all our usages, both client and server.
Post by Dr. Stephen Henson
Post by Charles B Cranston
Netscape 4 will not tolerate an ExtendedKeyUsage extension.
Hmmm. What makes you think that? EKU is *required* to handle "step up" (aka
SGC, magic, 128 bit [yuck]) and Netscape 4 handled that.
Hello Steve!

Based on a dialog that came up that said
"unknown critical extension" when I had a critical EKU extension
and that dialog not coming up when I made it a noncritical
extension or left it out entirely. I don't think this had
anything to do with stepup, but correct me if I'm missing
something.
Post by Dr. Stephen Henson
Post by Charles B Cranston
You might look at what kind of extensions are included.
The documentation for the extensions is in a docs directory
of the OpenSSL source and it is something innocuous like
openssl.txt or something like that. Also, read the man page
on the openssl.cnf file format.
Its doc/openssl.txt and this is referenced in the FAQ.
It's "man config" for the openssl.cnf file format.
My experience is that the comments in the distributed file
add greatly to the documentation so both should be read.
Post by Dr. Stephen Henson
It shouldn't be necessary to alter the default extensions for a simple SSL
server certificate.
Yes, I believe this to be the case, but note that software rot
might affect this. We have some Java client code that REQUIRES
a BasicConstraints extension, for example, and while I believe
the distributed cnf does put one in, in slight violation of
PKIX/RFC3380 (and this is well and truly disclosed and documented
in the commentary!) it may someday come to pass that some client
requires something above and beyond.

Wasn't there a case in the last two months on this list where
somebody was trying to generate a certificate for an HP printer
or printer server and it needed some specific certificate usage
extension bits???
Post by Dr. Stephen Henson
Dr Stephen N. Henson.
Core developer of the OpenSSL project: http://www.openssl.org/
Freelance consultant see: http://www.drh-consultancy.demon.co.uk/
--
Charles B (Ben) Cranston
mailto: zben-***@public.gmane.org
http://www.wam.umd.edu/~zben

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Dr. Stephen Henson
2003-08-22 19:35:26 UTC
Permalink
Post by Charles B Cranston
Post by Dr. Stephen Henson
Post by Charles B Cranston
Netscape 4 will not tolerate an ExtendedKeyUsage extension.
Hmmm. What makes you think that? EKU is *required* to handle "step up" (aka
SGC, magic, 128 bit [yuck]) and Netscape 4 handled that.
Hello Steve!
Based on a dialog that came up that said
"unknown critical extension" when I had a critical EKU extension
and that dialog not coming up when I made it a noncritical
extension or left it out entirely. I don't think this had
anything to do with stepup, but correct me if I'm missing
something.
Well not setting it to critical might have worked unless you specifically
wanted any client that didn't recognize the extension to reject it.

Setting anything to critical may cause problems for older clients because at
least one version of IE rejects anything that's critical even if it does
recognize it.
Post by Charles B Cranston
Post by Dr. Stephen Henson
It shouldn't be necessary to alter the default extensions for a simple SSL
server certificate.
Yes, I believe this to be the case, but note that software rot
might affect this. We have some Java client code that REQUIRES
a BasicConstraints extension, for example, and while I believe
the distributed cnf does put one in, in slight violation of
PKIX/RFC3380 (and this is well and truly disclosed and documented
in the commentary!) it may someday come to pass that some client
requires something above and beyond.
IIRC RFC2459 frowned upon basicConstraints (but didn't forbid it) in end user
certificates whereas RFC3280 now specifically allows it.

Steve.
--
Dr Stephen N. Henson.
Core developer of the OpenSSL project: http://www.openssl.org/
Freelance consultant see: http://www.drh-consultancy.demon.co.uk/
Email: shenson-Pqzf/mBTa20vnmoEvQhlZgbYiX8G1TQY9dF7HbQ/***@public.gmane.org, PGP key: via homepage.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Charles B Cranston
2003-08-22 19:54:30 UTC
Permalink
Continuation of a dialog between Dr. Stephen Henson
and Charles B Cranston:

B: These are some of the ones we found:
B: Netscape 4 will not tolerate an ExtendedKeyUsage extension.

S: Hmmm. What makes you think that? EKU is *required* to handle "step up"
S: (aka SGC, magic, 128 bit [yuck]) and Netscape 4 handled that.

B: Based on a dialog that came up that said
B: "unknown critical extension" when I had a critical EKU extension
B: and that dialog not coming up when I made it a noncritical
B: extension or left it out entirely. I don't think this had
B: anything to do with stepup, but correct me if I'm missing
B: something

S: Well not setting it to critical might have worked unless you specifically
S: wanted any client that didn't recognize the extension to reject it.
S: Setting anything to critical may cause problems for older clients
because at
S: least one version of IE rejects anything that's critical even if it does
S: recognize it.

B: Gee, Steve, I'm sorry, I didn't completely read (or comprehend
B: at least) your earlier remark. You are saying that NS calls it an
B: unknown critical extension even though it knows about it in the
B: context of stepup??? That's just broken. The standard clearly
B: states that if you don't know about an extension and it's critical
B: you fail. If it knows about it how can it be unknown? Yeah left
B: hand doesn't know what right hand is doing I guess. Thanks for the
B: additional data point. Guess we didn't test it as completely as we
B: thought we did. And if IE rejects anything that is critical even
B: if it does recognize it (absent the critical bit) then IMHO it is
B: broken too. Grump.


S: It shouldn't be necessary to alter the default extensions for a
simple SSL
S: server certificate.

B: Yes, I believe this to be the case, but note that software rot
B: might affect this. We have some Java client code that REQUIRES
B: a BasicConstraints extension, for example, and while I believe
B: the distributed cnf does put one in, in slight violation of
B: PKIX/RFC3380 (and this is well and truly disclosed and documented
B: in the commentary!) it may someday come to pass that some client
B: requires something above and beyond.

S: IIRC RFC2459 frowned upon basicConstraints (but didn't forbid it) in
end user
S: certificates whereas RFC3280 now specifically allows it.

B: Hmm, missed that change, alligators and swamps...
Post by Dr. Stephen Henson
Dr Stephen N. Henson.
Core developer of the OpenSSL project: http://www.openssl.org/
Freelance consultant see: http://www.drh-consultancy.demon.co.uk/
--
Charles B (Ben) Cranston
mailto: zben-***@public.gmane.org
http://www.wam.umd.edu/~zben

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Dr. Stephen Henson
2003-08-22 21:05:34 UTC
Permalink
Post by Charles B Cranston
Continuation of a dialog between Dr. Stephen Henson
B: Netscape 4 will not tolerate an ExtendedKeyUsage extension.
S: Hmmm. What makes you think that? EKU is *required* to handle "step up"
S: (aka SGC, magic, 128 bit [yuck]) and Netscape 4 handled that.
B: Based on a dialog that came up that said
B: "unknown critical extension" when I had a critical EKU extension
B: and that dialog not coming up when I made it a noncritical
B: extension or left it out entirely. I don't think this had
B: anything to do with stepup, but correct me if I'm missing
B: something
I've never seen that dialog on Netscape, though I've seen IE produce it.

What I'm saying is that stepup uses EKU (among other things) to identify its
certificates Netscape 4.[something] did support stepup so presumably it at
least partially parsed EKU. What version rejected critical EKU?
Post by Charles B Cranston
S: Well not setting it to critical might have worked unless you specifically
S: wanted any client that didn't recognize the extension to reject it.
S: Setting anything to critical may cause problems for older clients
because at
S: least one version of IE rejects anything that's critical even if it does
S: recognize it.
B: Gee, Steve, I'm sorry, I didn't completely read (or comprehend
B: at least) your earlier remark. You are saying that NS calls it an
B: unknown critical extension even though it knows about it in the
B: context of stepup??? That's just broken. The standard clearly
B: states that if you don't know about an extension and it's critical
B: you fail. If it knows about it how can it be unknown? Yeah left
B: hand doesn't know what right hand is doing I guess. Thanks for the
B: additional data point. Guess we didn't test it as completely as we
B: thought we did. And if IE rejects anything that is critical even
B: if it does recognize it (absent the critical bit) then IMHO it is
B: broken too. Grump.
Well its only an older version of IE that does that, the current stuff doesn't
though it has its own weirdness.

This will get much more fun when if and when things like nameConstraints
become more common. The latest IE already displays that but does something
strange and the standards are ambiguous too...

Steve.
--
Dr Stephen N. Henson.
Core developer of the OpenSSL project: http://www.openssl.org/
Freelance consultant see: http://www.drh-consultancy.demon.co.uk/
Email: shenson-Pqzf/mBTa20vnmoEvQhlZgbYiX8G1TQY9dF7HbQ/***@public.gmane.org, PGP key: via homepage.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Charles B Cranston
2003-08-22 21:43:28 UTC
Permalink
Post by Dr. Stephen Henson
Based on a dialog that said "unknown critical extension"
I've never seen that dialog on Netscape, though I've seen IE produce it.
What I'm saying is that stepup uses EKU (among other things) to identify its
certificates Netscape 4.[something] did support stepup so presumably it at
least partially parsed EKU. What version rejected critical EKU?
Well, I'm wondering if I remember this wrong. It was definitely IE
that required the dates to nest, but it MIGHT have been IE that said
this dialog as well. I remember my initial development setup was
Netscape 4.72 on a Macintosh and an Apache 1.x server running on my
(Debian) Linux machine, and I did discover this problem fairly late
in the process, so it COULD be that I discovered it while testing
with IE (I believe it was 5).

The problem was that this Win 98 system is the one I cross boot with
Debian, so I couldn't use it as a client until the PKI was migrated to
a Solaris box, and that happened relatively late in the process.

We have jealousy problems here with "machine counts", so I can only
have two machines on my desk. So I do a lot of testing with the
machines at home and with laptops that are not in the face of the
jealous ones...

Guess I'm getting old. My SO is a college professor, and she was so
worried about her tendancy to forget her train of thought in the middle
of class that she got an MRI this week. I just chalk it up to our
getting old.
Post by Dr. Stephen Henson
Setting anything to critical may cause problems for older clients
because at least one version of IE rejects anything that's critical
even if it does recognize it.
... if IE rejects anything that is critical even if it does recognize it
(absent the critical bit) then IMHO it is broken too. Grump.
Well its only an older version of IE that does that, the current stuff
doesn't though it has its own weirdness.
Now I wonder if I misread you again. You are saying

"if it does recognize it"

does that mean
1) it allows it (possibly by not knowing about it at all) or
2) it actually recognizes it and does something different

In case 1, yes, it seems OK to reject something critical that you
don't know about, while 2, seems to me if you do something different
when it is present you shouldn't give a tinkers dam about the critical
bit. That's what the definition of the critical bit IS, and IMHO
software that recognizes the extension to the point of assigning it
semantic meaning should NOT reject it just for being critical,
and software that does so is broken. Grump.
Post by Dr. Stephen Henson
This will get much more fun when if and when things like nameConstraints
become more common. The latest IE already displays that but does something
strange and the standards are ambiguous too...
Well, let this be a warning to EVERYBODY OUT THERE that you need
to consider the possibility that some of your clients may be broken
and not doing the documented right thing (and being on a Dean's desk
where you haven't a chance in the world of getting it thrown out :-)
and be sure to test if you do use any of the new groovy features...
--
Charles B (Ben) Cranston
mailto: zben-***@public.gmane.org
http://www.wam.umd.edu/~zben

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Dr. Stephen Henson
2003-08-22 23:11:47 UTC
Permalink
Post by Charles B Cranston
Post by Dr. Stephen Henson
Based on a dialog that said "unknown critical extension"
I've never seen that dialog on Netscape, though I've seen IE produce it.
What I'm saying is that stepup uses EKU (among other things) to identify its
certificates Netscape 4.[something] did support stepup so presumably it at
least partially parsed EKU. What version rejected critical EKU?
Well, I'm wondering if I remember this wrong. It was definitely IE
that required the dates to nest, but it MIGHT have been IE that said
this dialog as well. I remember my initial development setup was
Netscape 4.72 on a Macintosh and an Apache 1.x server running on my
(Debian) Linux machine, and I did discover this problem fairly late
in the process, so it COULD be that I discovered it while testing
with IE (I believe it was 5).
Yes its IE with that validity nesting thing. I've had a note about that in my
PKCS#12 FAQ almost from the start.

I'm not saying Netscape didn't have a "unrecognized critical extension dialog"
its just that I've never seen it.
Post by Charles B Cranston
Post by Dr. Stephen Henson
Setting anything to critical may cause problems for older clients
because at least one version of IE rejects anything that's critical
even if it does recognize it.
... if IE rejects anything that is critical even if it does recognize it
(absent the critical bit) then IMHO it is broken too. Grump.
Well its only an older version of IE that does that, the current stuff
doesn't though it has its own weirdness.
Now I wonder if I misread you again. You are saying
"if it does recognize it"
does that mean
1) it allows it (possibly by not knowing about it at all) or
2) it actually recognizes it and does something different
In case 1, yes, it seems OK to reject something critical that you
don't know about, while 2, seems to me if you do something different
when it is present you shouldn't give a tinkers dam about the critical
bit. That's what the definition of the critical bit IS, and IMHO
software that recognizes the extension to the point of assigning it
semantic meaning should NOT reject it just for being critical,
and software that does so is broken. Grump.
It was a bug in some older IE versions. I'm dredging up distant memory here
but in pseudo code what it should've done is:

if (critical && !recognized)
reject();

What I *think* it did instead was:

if (critical && recognized)
reject();

This behaviour stayed for quite a while and various CAs worked around it by
not making any extensions critical.
Post by Charles B Cranston
Post by Dr. Stephen Henson
This will get much more fun when if and when things like nameConstraints
become more common. The latest IE already displays that but does something
strange and the standards are ambiguous too...
Well, let this be a warning to EVERYBODY OUT THERE that you need
to consider the possibility that some of your clients may be broken
and not doing the documented right thing (and being on a Dean's desk
where you haven't a chance in the world of getting it thrown out :-)
and be sure to test if you do use any of the new groovy features...
There's also the possibility that there is no "documented right thing" or it is
ambiguous so that two clients can do contradictory things with an extension
and both be compliant because the standard doesn't define the correct
behaviour.

Steve.
--
Dr Stephen N. Henson.
Core developer of the OpenSSL project: http://www.openssl.org/
Freelance consultant see: http://www.drh-consultancy.demon.co.uk/
Email: shenson-Pqzf/mBTa20vnmoEvQhlZgbYiX8G1TQY9dF7HbQ/***@public.gmane.org, PGP key: via homepage.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Dagfinn Aarvaag
2003-08-22 07:11:14 UTC
Permalink
Hi,

I am trying to use SSL to do "AES symmetric encryption as defined by NIST"
for OMA

(OMA encryption):
"AES symmetric encryption as defined by NIST"
128 bit keys
Cipher block chaining mode
128 bits initialization vector prefixing the ciphertext
Padding according to RFC 2630.


The code below can encrypt and decrypt (what was encrypted with encrypt),
but when
sent to my mobile handset, the handset is not able to decrypt
There can be other errors of course, but I wonder if I am using the openssl
correctly to achieve the specified AES encryption.

Any comments?

Regards Dagfinn Aarvaag
dagfinn.aarvaag-***@public.gmane.org


#include "openssl/aes.h"
#include "openssl/err.h"

// -----------------------------------------------------------------------
// The code for CBC Ciphertext Stealing is based on Brian Gladman's example
// code for AES NIST, available in public domain. The code is modified on a
// few points to make it faster and more robust and in order to integrate
// it with the basic AES engine taken from OpenSSL. The code for basic CBC
// is a simplified derivative from the Ciphertext Stealing methods and were
// implemented because the openSSL code on this part seemed to be wrong.
// The class and its code integrates with OpenSSL in a nice and easy way.
// -----------------------------------------------------------------------


/** See documentation in Aes.h */
void Aes::cbc_encrypt(uint8* clearTxt, uint8* cipherTxt, int32 &size, const
uint8* cek)
{
// Generate a pseudo-random initialisation vector. It does not have
// to be higly unique as it is only used to generate spread in the
// resulting stream and to provide resistance to certain attacks.
// Initialisation vector goes into first 128 bit of output buffer.
rand((char*)cipherTxt, AES_BLOCK_SIZE);

// Create/ set the encryption key chain
AES_KEY aesKey, *key = &aesKey;
if (AES_set_encrypt_key(cek, 16*8, key) != 0) {
debug(" *** Aes::cbc_cs_encrypt, failed setting encryption key\n");
size = 0;
return;
}
unsigned char pad = AES_BLOCK_SIZE - (size % AES_BLOCK_SIZE);

// If size of buffer is less than or equal to block size
int32 i = 0;
if (size <= AES_BLOCK_SIZE) {

// Pad the data to be encrypted
for (i=size; i<AES_BLOCK_SIZE; i++)
clearTxt[i] = pad;

// xor the file bytes with the IV bytes
for(i=0; i<AES_BLOCK_SIZE; i++)
clearTxt[i + AES_BLOCK_SIZE] ^= cipherTxt[i];

// encrypt the AES_BLOCK_SIZE bytes of the buffer
AES_encrypt(clearTxt, &cipherTxt[AES_BLOCK_SIZE], key);
}

// Else, size is larger than block-size and we need to do CNC chaining
else {
for (int32 cLen=0; cLen<size;) {

// Do CBC chaining prior to encryption. First chaining
// is of course based on initialisation vector
for (i=0; i<AES_BLOCK_SIZE; i++)
clearTxt[cLen+i] ^= cipherTxt[cLen+i];

// Encrypt the AES_BLOCK_SIZE bytes of the buffer
AES_encrypt(&clearTxt[cLen], &cipherTxt[cLen+AES_BLOCK_SIZE], key);
cLen += AES_BLOCK_SIZE;

// If there is only one more block left, zero pad it if necessary
if ((size-cLen) < AES_BLOCK_SIZE) {
for (i=size-cLen; i<AES_BLOCK_SIZE; i++)
clearTxt[cLen+i] = pad;
}
}
}

// Mark that size has increased with block-size to accomodate IV
size += AES_BLOCK_SIZE;
}


/** See documentation in Aes.h */
// Comment: Padding is not removed ?
void Aes::cbc_decrypt(uint8* clearTxt, uint8* cipherTxt, int32 &size, const
uint8* cek)
{
// Create/ set the decryption key chain
AES_KEY aesKey, *key = &aesKey;
if (AES_set_decrypt_key(cek, 16*8, key) != 0) {
debug(" *** Aes::cbc_cs_decrypt, failed setting decryption key\n");
return;
}

// If size of buffer is less than or equal to block size
int32 i = 0;
size -= AES_BLOCK_SIZE;
if (size <= AES_BLOCK_SIZE) {

// Decrypt part following initialisation vector
AES_decrypt(&cipherTxt[AES_BLOCK_SIZE], clearTxt, key);

// xor the file bytes with the IV bytes
for (i=0; i<AES_BLOCK_SIZE; i++)
clearTxt[i] ^= cipherTxt[i];
}

// Else, size is larger than block-size and we need to do CBC chaining
else {
for (int32 cLen=0; cLen<size;) {

// Decrypt the next block in the chain
AES_decrypt(&cipherTxt[AES_BLOCK_SIZE+cLen], &clearTxt[cLen], key);

// CBC unchain the previous ciphertext block
for (i=0; i<AES_BLOCK_SIZE; i++)
clearTxt[i+cLen] ^= cipherTxt[i+cLen];

cLen += AES_BLOCK_SIZE;
}
}
}

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Charles B Cranston
2003-08-22 20:27:22 UTC
Permalink
Well, I took dumps of the two certificates (and CSR) that Rohan
provided, and the dates overlap, which might be the IE specific
problem.

At first it looked like the subject DNs were exactly the same
between the two certificates, but upon closer examination the
subject DN for the server certificate lacks the Email=xx tag.
It is a little confusing but I don't know if it is really a
problem for the software (which is harder to confuse!)

=====

ROOT cert:

Certificate:
Data:
Version: 3 (0x2)
Serial Number: 0 (0x0)
Signature Algorithm: md5WithRSAEncryption
Issuer:
C=US, ST=California, L=San Jose,
O=MG Solutions Class 3 Root CA,
OU=Security Infrastructure Deployment Engineering (SIDE),
CN=www.ldapguru.com/Email=admin-0WJmuAoU0vFWk0Htik3J/***@public.gmane.org
=========================================
Validity
Not Before: Aug 22 01:39:07 2003 GMT
Not After : Aug 17 01:39:07 2023 GMT
========================
Subject:
C=US, ST=California, L=San Jose,
O=MG Solutions Class 3 Root CA,
OU=Security Infrastructure Deployment Engineering (SIDE),
CN=www.ldapguru.com/Email=admin-0WJmuAoU0vFWk0Htik3J/***@public.gmane.org
=========================================
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public Key: (1024 bit)
Modulus (1024 bit):
00:9b:41:b0:77:3b:ca:a4:70:79:c3:ec:ea:44:2d:

=====

SERVER cert:

Certificate:
Data:
Version: 3 (0x2)
Serial Number: 2 (0x2)
Signature Algorithm: md5WithRSAEncryption
Issuer:
C=US, ST=California, L=San Jose,
O=MG Solutions Class 3 Root CA,
OU=Security Infrastructure Deployment Engineering (SIDE),
CN=www.ldapguru.com/Email=admin-0WJmuAoU0vFWk0Htik3J/***@public.gmane.org
=========================================
Validity
Not Before: Aug 22 02:07:24 2003 GMT
Not After : Aug 17 02:07:24 2023 GMT
======================== this confuses IE!
Subject:
C=US, ST=California,
O=MG Solutions Class 3 Root CA,
OU=Security Infrastructure Deployment Engineering (SIDE),
CN=www.ldapguru.com
================ no EMail here!
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public Key: (1024 bit)
Modulus (1024 bit):
00:f5:3b:af:5f:3a:05:b9:20:f3:93:14:87:43:76:
=====

Hope this helps.
--
Charles B (Ben) Cranston
mailto: zben-***@public.gmane.org
http://www.wam.umd.edu/~zben

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Dr. Stephen Henson
2003-08-23 16:56:18 UTC
Permalink
Post by Rohan Pinto
I have a SunONE WebServer 6.0 running on a certain subnet. (www.abcd.com -
for this example)
The Webserver serves content over http.
I intend to protect this content via PDC authentication. To do so, I'd need
2 things.
1. A Server Cert
2. A User Cert (on a smartcard) [assumption is that the user would be
prompted to insert his smartcard everytime he wishes to access the server.
i'd plug the usercert on the browser (custom app) and retain the public key
on the card. the browser would have a pointer to the card for the piublic
key]
I think you mean retain the private key on the card: the public key will be in
the user cert anyway...

You'll also need a PKCS#11 module to do the private key SSL/TLS operations on
the smart card (for Mozilla/Netscape) or a CSP (for MSIE).
Post by Rohan Pinto
Then I launched my webserver admin console and added ca.cer as the
rootCAcert and server.cer as the cert for the server itself.
I then added a listen socket on the server listening on port 443. I also
enabled Client Authentication (for PDC authentication)
at this point even though i did not have a PDC i assumed that teh server
would simply deny access.
but the issue is that this method just didnt work.
It could be that the browser is giving an uninformative error message. First
try it without enabling client authentication on the server.

If you can connect OK then the server cert is fine.

Then try enabling client auth. If it stops working use s_client to check the
list of CAs the server presents to see if the required client auth CA is
present. If not then that's the problem: you need to add your client CA to the
list of CAs the server sends out with client auth...

Steve.
--
Dr Stephen N. Henson.
Core developer of the OpenSSL project: http://www.openssl.org/
Freelance consultant see: http://www.drh-consultancy.demon.co.uk/
Email: shenson-Pqzf/mBTa20vnmoEvQhlZgbYiX8G1TQY9dF7HbQ/***@public.gmane.org, PGP key: via homepage.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Charles B Cranston
2003-08-22 14:30:24 UTC
Permalink
Post by Rohan Pinto
Post by Charles B Cranston
openssl s_client -connect www.abcd.com:443 -showcerts
Certs presented are just fine...
If this is really the case, the problem seems to be in your
client?
--
Charles B (Ben) Cranston
mailto: zben-***@public.gmane.org
http://www.wam.umd.edu/~zben

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Charles B Cranston
2003-08-19 19:50:17 UTC
Permalink
Sometimes a picture is worth a thousand words:

The "Standard Model" of Certificate generation:

On the server machine: Generate CSR operation


+-------------+ +-----------------------------+
| Private Key | | Certificate Signing Request |
+------+------+ | |
v | +------------+ |
| | Public Key | |
| +------------+ |
| |
| "Distinguished Name" |
| |
Note: hash is signed | +------------+ |
by private key above | | Hash | |
| +------------+ |
+--------------+--------------+
|
| Sent to CA for signing
v
+-----------------------------+
CA can use public key | Certificate |
from CSR to check | |
signature on hash to | +------------+ |
prevent alteration of | | Public Key | |
CSR by adversary | +------------+ |
| |
| "Issuer Distinguished Name" |
| |
| "Subject DistinguishedName" |
| |
Note: hash is signed | +------------+ |
by private key of root | | Hash | |
| +------------+ |
+--------------+--------------+
|
| Returned to server
v

In secure site operation:

Server presents certificate to client

Client uses public key of root (obtained from preconfigured root
certificate) to check hash to ensure certificate has not been forged.

Client rolls a random number and encrypts it with the public key from
the server certificate, then returns it to the server.

Server decrypts this with server private key and both sides use it
as a symmetric key for conventional (e.g., DES) cryptography.

Eavesdropper does not have access to private key so cannot decrypt.
Man-in-the-middle attacker does not have access to private key so
cannot decrypt.
--
Charles B (Ben) Cranston
mailto: zben-***@public.gmane.org
http://www.wam.umd.edu/~zben

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Rohan Pinto
2003-08-20 21:15:54 UTC
Permalink
So...

if the CASr has been generated
and the CSR has been sent to the CA (running openssl)
whats the command (in openssl) to sign this CSR ??
anything on the lines of..

./openssl XXXX-some parameters-XXXX request.CSR XXXX-some parameters-XXXX
signedCSR.cer ??

Rohan
----- Original Message -----
From: "Charles B Cranston" <zben-***@public.gmane.org>
To: <openssl-users-MCmKBN63+***@public.gmane.org>
Sent: Tuesday, August 19, 2003 12:50 PM
Subject: Re: Newbie question - Signing CSR's (picture enclosed)
Post by Charles B Cranston
On the server machine: Generate CSR operation
+-------------+ +-----------------------------+
| Private Key | | Certificate Signing Request |
+------+------+ | |
v | +------------+ |
| | Public Key | |
| +------------+ |
| |
| "Distinguished Name" |
| |
Note: hash is signed | +------------+ |
by private key above | | Hash | |
| +------------+ |
+--------------+--------------+
|
| Sent to CA for signing
v
+-----------------------------+
CA can use public key | Certificate |
from CSR to check | |
signature on hash to | +------------+ |
prevent alteration of | | Public Key | |
CSR by adversary | +------------+ |
| |
| "Issuer Distinguished Name" |
| |
| "Subject DistinguishedName" |
| |
Note: hash is signed | +------------+ |
by private key of root | | Hash | |
| +------------+ |
+--------------+--------------+
|
| Returned to server
v
Server presents certificate to client
Client uses public key of root (obtained from preconfigured root
certificate) to check hash to ensure certificate has not been forged.
Client rolls a random number and encrypts it with the public key from
the server certificate, then returns it to the server.
Server decrypts this with server private key and both sides use it
as a symmetric key for conventional (e.g., DES) cryptography.
Eavesdropper does not have access to private key so cannot decrypt.
Man-in-the-middle attacker does not have access to private key so
cannot decrypt.
--
Charles B (Ben) Cranston
http://www.wam.umd.edu/~zben
______________________________________________________________________
OpenSSL Project http://www.openssl.org
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Dr. Stephen Henson
2003-08-20 21:31:10 UTC
Permalink
Post by Rohan Pinto
So...
if the CASr has been generated
and the CSR has been sent to the CA (running openssl)
whats the command (in openssl) to sign this CSR ??
anything on the lines of..
./openssl XXXX-some parameters-XXXX request.CSR XXXX-some parameters-XXXX
signedCSR.cer ??
As I mentioned in the other message you first have to create a root CA and its
directory structure. The command:

CA.pl -newca

will do that (there are other ways but CA.pl is the easiest).

Then when you have the CSR rename it to "newreq.pem" and do:

CA.pl -sign

and the certificate will be in newcert.pem

Steve.
--
Dr Stephen N. Henson.
Core developer of the OpenSSL project: http://www.openssl.org/
Freelance consultant see: http://www.drh-consultancy.demon.co.uk/
Email: shenson-Pqzf/mBTa20vnmoEvQhlZgbYiX8G1TQY9dF7HbQ/***@public.gmane.org, PGP key: via homepage.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Dr. Stephen Henson
2003-08-18 16:54:28 UTC
Permalink
Post by Sevcik Berndt
I am using the following script to create my certificate.
openssl req -new -keyout newreq.pem -out newreq.pem -passin
pass:1whatever -passout pass:whatever -days 365
openssl ca -policy policy_anything -out newcert.pem -passin
pass:whatever -key whatever -extensions xpclient_ext -extfile
xpextensions -infiles newreq.pem
openssl pkcs12 -export -in newcert.pem -inkey newreq.pem -out $1.p12
-clcerts -passin pass:whatever -passout pass:whatever
openssl x509 -inform PEM -outform DER -in $1.pem -out $1.der
rm -rf newcert newreq.pem
When I execute this command I am asked for an challenge password. But I
provided at the commands themselv a -passin pass and -passout pass. Is
this the same or are this different passwords? It seems to me that the
challenge password I am asked to enter during creation is not used for
the certificate.
Its just an attribute that's included in the request. Some CAs might make use
of it for example as some means of revoking a certificate later. OpenSSLs
internal 'ca' command ignores it as does 'x509'.
Post by Sevcik Berndt
When I import the .p12 file into Windows I am asked for a password I am
asked for a Secret. Is this the challenge password?
No it's whatever password you used when you created the PKCS#12 file (the
"export password").

Steve.
--
Dr Stephen N. Henson.
Core developer of the OpenSSL project: http://www.openssl.org/
Freelance consultant see: http://www.drh-consultancy.demon.co.uk/
Email: shenson-Pqzf/mBTa20vnmoEvQhlZgbYiX8G1TQY9dF7HbQ/***@public.gmane.org, PGP key: via homepage.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Continue reading on narkive:
Loading...