Key file:
1 2 3 4 5 6 7 |
$ openssl genrsa -des3 -out key.withpass 2048 Generating RSA private key, 2048 bit long modulus ..............+++ .........+++ e is 65537 (0x10001) Enter pass phrase for key.withpass: Verifying - Enter pass phrase for key.withpass: |
Passphrase verwijderen:
1 2 3 4 |
$ openssl rsa -in key.withpass -out key Enter pass phrase for key: writing RSA key $ rm key.withpass |
Request:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
$ openssl req -new -key key -out csr 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]: CC State or Province Name (full name) [Some-State]: State Locality Name (eg, city) []: City Organization Name (eg, company) [Internet Widgits Pty Ltd]: Organization Organizational Unit Name (eg, section) []: Common Name (eg, YOUR name) []: hostname.example.com Email Address []: Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []: |
Optioneel, self-signed certificate:
1 |
openssl x509 -req -days 365 -in csr -signkey key -out crt |