Hi all.

I am trying - so far completely unsucessfully - to get Apache with the
mod_ssl stuff going. The first step seemed to be to arrange a suitable
certificate (self-signed). Following the instructions in the mod_ssl
manual, I created a certificate for myself, and wanted to sign it. To this
end I tried to use sign.sh.

The first time  I got an error message, which I stupidly allowed out of my
xterm scroll buffer :-(. The message said something about "failing at 0
depth".

I have no doubt I can replicate this problem eventually, but now I have a
different problem. When I try to run sign.sh again, it tells me that there is
already a certificate and creates a zero-length server.crt. The error message
is below (some lines will have been wrapped by my mailer). I think the "unable
to load certificate file" bit is probably because of the zero length
server.crt...

The certificate details seem to be in the certificate database - how do I
delete them from there so I can have another go? Second question, why did I
get that message about "depth 0" in the first place?

I'm using openssl version "OpenSSL 0.9.4 09 Aug 1999". For what it's worth
(since I haven't got to this stage yet) I will be using mod_ssl version
2.3.11-1.3.6. The Apache version is that distributed with SuSe 6.0
("Apache/1.3.3 (Unix) S.u.S.E./6.0"). I guess I'll be building and installing
the later version of Apache, but like I say, I haven't got that far yet...

The amount to learn about all this has got me in the "overwhelmed" state at
present, so my apologies if these are stupid questions, be gentle with me :-)

Yours hopefully, K.

Here is the cript I used to do the above-mentioned steps, cut and pasted
straight from the mod_ssl manual (except the last one):

   openssl genrsa -des3 -out server.key 1024
   openssl req -new -key server.key -out server.csr 
   openssl genrsa -des3 -out ca.key 1024
   openssl req -new -x509 -days 365 -key ca.key -out ca.crt 
   /opt/mod_ssl-2.3.11-1.3.6/pkg.contrib/sign.sh server.csr

Here is the output:

1112 semi-random bytes loaded
Generating RSA private key, 1024 bit long modulus
.....+++++
.+++++
e is 65537 (0x10001)
Enter PEM pass phrase:
Verifying password - Enter PEM pass phrase:
Using configuration from /usr/local/ssl/openssl.cnf
Enter PEM pass phrase:
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) [AU]:CH
State or Province Name (full name) [Some-State]:Zuerich
Locality Name (eg, city) []:Zuerich
Organization Name (eg, company) [Internet Widgits Pty Ltd]:ETHZ
Organizational Unit Name (eg, section) []:KOMID
Common Name (eg, YOUR name) []:Karl Auer
Email Address []:[EMAIL PROTECTED]                       
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
1112 semi-random bytes loaded
Generating RSA private key, 1024 bit long modulus
.+++++
...+++++
e is 65537 (0x10001)
Enter PEM pass phrase:
Verifying password - Enter PEM pass phrase:
Using configuration from /usr/local/ssl/openssl.cnf
Enter PEM pass phrase:
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) [AU]:CH
State or Province Name (full name) [Some-State]:Zuerich
Locality Name (eg, city) []:Zuerich
Organization Name (eg, company) [Internet Widgits Pty Ltd]:ETHZ
Organizational Unit Name (eg, section) []:KOMID
Common Name (eg, YOUR name) []:Karl Auer
Email Address []:[EMAIL PROTECTED]
CA signing: server.csr -> server.crt:
Using configuration from ca.config
Enter PEM pass phrase:
Check that the request matches the signature
Signature ok
The Subjects Distinguished Name is as follows
countryName           :PRINTABLE:'CH'
stateOrProvinceName   :PRINTABLE:'Zuerich'
localityName          :PRINTABLE:'Zuerich'
organizationName      :PRINTABLE:'ETHZ'
organizationalUnitName:PRINTABLE:'KOMID'
commonName            :PRINTABLE:'Karl Auer'
emailAddress          :IA5STRING:'[EMAIL PROTECTED]'
ERROR:There is already a certificate for
/C=CH/ST=Zuerich/L=Zuerich/O=ETHZ/OU=KOMID/CN=Karl
[EMAIL PROTECTED]
The matching entry has the following details
Type      :Valid
Expires on    :000812112315Z
Serial Number :01
File name     :unknown
Subject Name  :/C=CH/ST=Zuerich/L=Zuerich/O=ETHZ/OU=KOMID/CN=Karl
[EMAIL PROTECTED]
CA verifying: server.crt <-> CA cert
server.crt: unable to load certificate file
6719:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:610:

---
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer ([EMAIL PROTECTED])              Geschaeft/work     +41-1-6327531
Kommunikation, ETHZ RZ                          Privat/home     +41-1-4517941
Clausiusstrasse 59                                      Fax     +41-1-6321225
CH-8092 ZUERICH Switzerland
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [EMAIL PROTECTED]
Automated List Manager                            [EMAIL PROTECTED]

Reply via email to