PDA

View Full Version : cert, common name = localhost


TheRudy
20th June 2006, 23:14
Right, i recreated cert using following lines:
cd /etc/postfix/ssl/
openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024
chmod 600 smtpd.key
openssl req -new -key smtpd.key -out smtpd.csr
openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out smtpd.crt
openssl rsa -in smtpd.key -out smtpd.key.unencrypted
mv -f smtpd.key.unencrypted smtpd.key
openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem -days 3650

As common name i put mail.domain.tpl, twice since i was asked twice during the whole process. Result = instead of mail.domain.tpl i get 'localhost' as common name.

I tried 3 times, tried using non http address, just text. I restarted postfix, sassl... and inetd everytime and still nothing, common name = localhost no matter what i do. All other 'fields' were also filled each time.

Which means, i'm doing something wrong in this. The question is what?

adamluz
21st June 2006, 00:35
Just a guess here but you should try to reinstall. It will only upgrade the cert's. There you can put in the host under common name and it should set it up correctly.

falko
21st June 2006, 03:05
What exactly did you put in when you created the cert?

TheRudy
21st June 2006, 14:02
What exactly did you put in when you created the cert?
What do you mean? You mean what text i entered when it asks me for common name and other info when doing certificate? Nothing special. Just company info and as COMMON NAME i tried everything. From full http to mail.domain.tpl (main domain) but not once i entered 'localhost'. No special chars, no dots, no nothing. Just letters.

falko
22nd June 2006, 15:44
You mean what text i entered when it asks me for common name and other info when doing certificate?Yes. What exactly did you type in?