OpenSSL

C:\Apache24\cert>openssl req -new -out server.csr
Generating a 2048 bit RSA private key
.............................+++
..........................................................+++
writing new private key to 'privkey.pem'
Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:CZ
State or Province Name (full name) [Some-State]:Czech Republic
Locality Name (eg, city) []:Jindrichuv Hradec
Organization Name (eg, company) [Internet Widgits Pty Ltd]:VPSoft
Organizational Unit Name (eg, section) []:IT
Common Name (e.g. server FQDN or YOUR name) []:localhost
Email Address []:Tato e-mailová adresa je chráněna před spamboty. Pro její zobrazení musíte mít povolen Javascript.
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
C:\Apache24\cert>openssl rsa -in privkey.pem -out server.key
Enter pass phrase for privkey.pem:
writing RSA key
C:\Apache24\cert>openssl x509 -in server.csr -out server.crt -req -signkey server.key -days 3650
Signature ok
subject=/C=CZ/ST=Czech Republic/L=Jindrichuv Hradec/O=VPSoft/OU=IT/CN=localhost/
emailAddress=Tato e-mailová adresa je chráněna před spamboty. Pro její zobrazení musíte mít povolen Javascript.
Getting Private key

 

Konfigurace Apache

### OpenSSL
LoadModule ssl_module modules/mod_ssl.so
Listen 443
<VirtualHost *:443>
ServerName localhost
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile "c:/Apache24/cert/server.crt"
SSLCertificateKeyFile "c:/Apache24/cert/server.key"
</VirtualHost>

 

 

Vlastimil Pošmura, 2019