1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| $ mkdir /etc/cert $ cd /etc/cert
$ openssl genrsa -out fnzoo.com.key 1024
$ openssl req -new -key fnzoo.com.key -out fnzoo.com.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]:CN State or Province Name (full name) [Some-State]:Beijing Locality Name (eg, city) []:Beijing Organization Name (eg, company) [Internet Widgits Pty Ltd]:fnzoo.com Organizational Unit Name (eg, section) []:IT Common Name (e.g. server FQDN or YOUR name) []:hehe.fnzoo.com Email Address []:
Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []:
$ openssl x509 -req -days 3650 -in fnzoo.com.csr -signkey fnzoo.com.key -out fnzoo.com.crt
$ openssl x509 -in fnzoo.com.crt -pubkey -noout | openssl rsa -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64
writing RSA key RsO0x8J5EdQMJChV5H+tKaTcOuRjdkv3VazWCYZId2U=
|