Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
share|improve this question
add comment

1 Answer

up vote 6 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.

share|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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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