I've registered on startssl.com and so retrivied 4 files for my domain:
- ssl.key - the private key file
- ssl.crt - the certificate file
- ca.pem - Root CA
- sub.class1.server.ca.pem - Class 1 Intermediate Server CA certificate
to remove password i did:
openssl rsa -in ssl.key -out ssl.key.nopwd
Then, I set up my nginx config:
server {
listen 443 ssl;
ssl on;
ssl_certificate /etc/nginx/ssl/ssl.crt;
ssl_certificate_key /etc/nginx/ssl/ssl.key.nopwd;
keepalive_timeout 70;
fastcgi_param SSL_VERIFIED $ssl_client_verify;
fastcgi_param SSL_CLIENT_SERIAL $ssl_client_serial;
fastcgi_param SSL_CLIENT_CERT $ssl_client_cert;
fastcgi_param SSL_DN $ssl_client_s_dn;
server_name ***;
root /var/www/***;
}
After nginx restarted I can successfully enter to my site via https. But now I want to secure my site and give access to it only with certificate, installed in a client browser. As I understand I must setup it in nginx config:
ssl_client_certificate etc/nginx/ssl/[WHAT_SHOULD_BE_HERE?]
ssl_verify_client on;
But what file should I point to? How can I generate a client certificate from the server one?