Forum Moderators: phranque

Message Too Old, No Replies

set up of ssl certificate gives error

https "page can not be displayed"

         

jamie

1:01 pm on Jun 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



hi,

after setting up 2 certs on dev server for test purposes (both of which worked fine) i have received my first proper .crt today

the .csr and .crt files are in the correct location and i have set up the httpd.conf identically to the one i have on my dev server, but everytime i try to access the https page, it gives error "page can not be displayed" or "the connection was refused when attempting to contact ..." (depending on browser)

here is an excert from ssl_engine_log:

Init: Reinitializing OpenSSL library
Init: Seeding PRNG with 136 bytes of entropy
Init: Configuring temporary RSA private keys (512/1024 bits)
Init: Configuring temporary DH parameters (512/1024 bits)
Init: Initializing (virtual) servers for SSL

that appears to be ok. i get no other errors in any other logs.

i have set up a virtual host with

<IfDefine HAVE_SSL>
<VirtualHost: 12.12.12.12:443>
...
SSLCertificateFile ....
SSLCertificateKeyFile ...
...
</VirtualHost>
</IfDefine>

and restarted: apachectl stop && apachectly startssl. hmmmm.

might it have something to do with the <IfDefine HAVE_SSL> containers, which surround the virtual host? if i leave them out, httpd won't start and i get openssl errors in the ssl_engine_log. but having them doesn't seem to work either. am very confused ;)

much appreciate any help!

jamie

1:17 pm on Jun 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



it definitely has something to do with the <IfDefine HAVE_SSL> container. when i remove these from around the <VirtualHost> container i get following error in ssl_engine_log

Init: Initializing OpenSSL library
Init: Loading certificate & private key of SSL-aware server www.mydomain.com:443
Init: Unable to read server certificate from file /etc/ssl/mydomain-public.crt (OpenSSL library error follows)
[error] OpenSSL: error:0D09F007:asn1 encoding routines:d2i_X509:expecting an asn1 sequence

does anyone understand this?

thanks :)

jamie

1:58 pm on Jun 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



fixed it. i copied the .crt wrongly out of my email programme doh! :)

(jdmorgan, sorry for the additional posts, but the edit button was no longer available)