I'm trying to setup an SSL SVN server and when I try to checkout remotely I get the error Server certificate was missing commonName attribute in subject name

I did some googling and from what I can tell I need to add the IP address of the URL I'm accessing to openss.cnf with the commonName attribute like below. I did that but I still get the error.

commonName                      = xx.xxx.xx.xx
commonName_max                  = 64
link|improve this question

feedback

1 Answer

up vote 3 down vote accepted

It sounds like a CommonName mismatch with the SSL certificate. Does the CN in your SSL certificate match your server?

You can run the following to view the SSL certificate:

openssl x509 -noout -text -in ssl.crt

Edit

To generate a snake oil cert, first generate the key:

openssl genrsa -out host.key 1024

Now generate the certificate:

openssl req -new -key host.key -x509 -days 3650 -out host.crt

openssl will prompt you for the information:

Country Name (2 letter code) [AU]:
State or Province Name (full name) [Some-State]:
Locality Name (eg, city) []:
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (eg, YOUR name) []:
Email Address []:

Common Name is where you specify your server's hostname.

link|improve this answer
I don't see "CN" in there anywhere... perhaps that's the problem? It's not an official SSL, just something I generated on the server. – Webnet Jun 18 '10 at 15:45
Check out my edit, that may be the issue. – Warner Jun 18 '10 at 15:52
Can I just modify the certificate now to include a common name rather than re-generate it? – Webnet Jun 18 '10 at 16:25
That's not possible. – Warner Jun 18 '10 at 16:39
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.