>From: [email protected] >Sent: 29/11/2010 4.46 > >> 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. >
Thanks Dave. You are correct. In fact I've configured the server for mutual authentication. So I've generated another key/cert and send it with -key and -cert. Then I've imported the cert in the server and it worked. >> 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. > That make sense. I was just confused because it wasn't working and the error message isn't clear. >> 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. Yes, we have regions and provinces. But here state=country=Italy. The translation for state (stato) has a political meaning, while country (paese) a geographical meaning. Maybe that ST field come from the fact that the USofA, like many other countries, is a confederation of STates. >Do you have anything like provinces there? Yes, we have 20 regions (Toscana, Lombardia, Lazio, Umbria, ...). And every region is divided into provinces. Anyway looking at some other certificates it seems that ST isn't used here. > I don't know of such, but I've never been to Italy, so my knowledge is limited. I hope you can have a holiday here and enjoy. Thanks again Barbara ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [email protected] Automated List Manager [email protected]
