Page 1 of 1

Issues with openssl

PostPosted: 30. October 2005 07:24
by Frang
Using xampp I got my vbulletin site up and running great. But when I log onto it I get a message
The name of the security certificate is invalid or does not match the name of the site
clicking yes to proceed I get another message
This page contains both secure and nonesecure items. Do you wish to display the nonesecure items?


any ideas on what might be wrong?

PostPosted: 30. October 2005 09:23
by WorldDrknss
Most certificates do, but if you are using the one that game with XAMPP that is name server.crt you then should create your own following these steps:


--------------------------------------------------------------------------------

Create private key

openssl genrsa -des3 -out ca.key -rand $randomness_source 1024
chmod 400 ca.key

Note: If you really know what you're doing and don't want to use a password on the private key then remove the -des3 argument.

Setup the config file for the new CA

Create a new file called ca.conf and copy the following code into it

[ req ]
default_bits = 1024
default_keyfile = ca.key
distinguished_name = req_distinguished_name
x509_extensions = v3_ca
req_extensions = v3_req
string_mask = nombstr

[ req_distinguished_name ]
countryName = Country Name (2 letter code)
countryName_default = **
countryName_min = 2
countryName_max = 2
stateOrProvinceName = State or Province Name (full name)
stateOrProvinceName_default = ****
localityName = Locality Name (e.g., city)
localityName_default = ****
organizationName = Organization Name (e.g., company)
organizationName_default = ****
organizationalUnitName = Organizational Unit Name (e.g., section)
organizationalUnitName_default = Certification Services Division
commonName = My company's Root CA
commonName_default = ****
commonName_max = 64
emailAddress = E-mail address
emailAddress_default = ****
emailAddress_max = 40

[ v3_ca ]
basicConstraints = critical,CA:true
subjectKeyIdentifier = hash

[ v3_req ]
nsCertType = objsign,email,server


Replace the stars with information pertaining to your setup

Self sign the root certificate

openssl req -new -x509 -days 3650 -config ca.conf -key ca.key -out ca.crt
The root certificate will be valid for 10 years (-days 3650).
Install the resulting .crt file in browser
On Windows you can just click on the file and you will have the option to import the certificate.
Congratulations. You now have a certification authority certificate.

then edit ssl.conf in apache\conf\

https://www.thegamerslounge.game-host.org/news.php

PostPosted: 06. November 2005 09:34
by tristanlee85
I followed those steps completely. My xampp directory is C:\Program Files]\xampp . I created a file called ca.conf and saved it in C:\ca.conf. I executed the following command;

openssl req -new -x509 -days 3650 -config c:\ca.conf -key ca.key -out ca.crt

It asked me to re-enter the information that I changed in the CONF file. I double-clicked the ca.key file and installed it. Now, what else do I do?

PostPosted: 06. November 2005 09:43
by tristanlee85
I un-commented the:

Code: Select all
SSLCertificateChainFile C:/Program Files/xampp/apache/conf/ssl.crt/ca.crt


Code: Select all
SSLCACertificatePath C:/Program Files/xampp/apache/conf/ssl.crt


Code: Select all
SSLCACertificateFile C:/Program Files/xampp/apache/conf/ssl.crt/ca-bundle.crt


lines. With any of those un-commented, the service won't start. If I comment them and leave them as default, it starts.

PostPosted: 06. November 2005 11:57
by WorldDrknss
My ssl.conf, I added the following at the end if the ssl.conf file.
Code: Select all
NameVirtualHost *:443
<VirtualHost *:443>
    DocumentRoot C:/www/thegamerslounge
    ServerName secure.thegamerslounge.game-host.org
    ServerAlias www.secure.thegamerslounge.game-host.org
    SSLEngine on
    SSLCertificateFile "C:/xampp/xampp/apache/conf/ssl.crt/thegamerslounge.crt"
    SSLCertificateKeyFile "C:/xampp/xampp/apache/conf/ssl.key/thegamerslounge.key"
</VirtualHost>