> From: [email protected] On Behalf Of Barbara
> Sent: Sunday, 28 November, 2010 13:47

> Anyway I'm trying to setup https on a server without success.
> So I've tried testing it with s_client.
> 
> $ openssl s_client -verify 1 -showcerts -connect 
> $MY_SERVERIP:$MY_SERVERPORT
> verify depth is 1
> CONNECTED(00000003)
> depth=1 /C=IT/O=$CA_O/OU=$CA_OU/CN=$CA_CN
> verify error:num=19:self signed certificate in certificate chain
> verify return:1
> depth=1 /C=IT/O=$CA_O/OU=$CA_OU/CN=$CA_CN
> verify return:1
> depth=0 /C=IT/ST=Italy/L=Milan/O=$MY_O/OU=$MY_OU/CN=$MY_SERVERIP
> verify return:1
> 16816:error:14094412:SSL routines:SSL3_READ_BYTES:sslv3 alert 
> bad certificate:
> s3_pkt.c:1086:SSL alert number 42
> 16816:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake 
> failure:s23_lib.c:
> 188:
> 
> I've tried searching, but I can't find what is the meaning of 
> that error.
> Is there something I can read where error codes are explained?
> 
You really have two errors. First your client (s_client) 
couldn't verify the server's cert because you didn't 
give it any truststore (-CAfile or -CApath). However, 
commandline s_client will continue without verifying
(even when you specify -verify!)

But what's stopping you is that the server is rejecting 
the *client* cert, presumably because you didn't send any.
If the server demands client authentication, you must give 
s_client -cert and -key (or -cert containing both) to do it.
If you don't intend the server to require client auth, 
you've done something wrong in setting up the server, 
and you'll have to either tell us what the server type is, 
or consult someone else who knows about that server type.

> Could it be caused by the fact that the O field 
> (organization) in the CA 
> certificate is different from mine?
> I've noticed that right now, while I was "masking" the real data :(

No, that's normal. For certs issued by a real CA (not inhouse, 
fake, or selfsigned) the CA is indeed a different Organization.

> Am I supposed to left ST and L fields empty as in the CA certificate?

Unlikely. It's up to the CA what name fields you are required 
(or allowed) to specify, and what values (if any) in them.
Since the CA issued the cert, it is happy with your DN.
As a general rule as long as DN fields honestly identify 
the entity (here your server) more rather than fewer is good.

Although ST is intended to be sub-national, so ST=Italy 
isn't perfectly standard, but it isn't misleading either.
Do you have anything like provinces there? I don't know of such, 
but I've never been to Italy, so my knowledge is limited.

> Sending a csr have a cost to my departement, and I've sent 3 
> csr yet, so I 
> would like to be sure about the reason before sending another one.
> Sending another request and failing again can cause my bad troubles :(
> Can anyone help me?
> 



______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [email protected]

Reply via email to