text.skipToContent text.skipToNavigation

SSL Certificate Generating by OpenSSL

1.  System Requirement
Linux OS is needed and OpenSSL package need be installed.
2.  Generate SSL Certificate
Use tool openssl with following parameters to generate the certificate “sample.pem”:
# openssl req -new -x509 -days 3650 -newkey rsa:2048 -nodes -out sample.pem -keyout sample.pem

Descriptions for some key parameters are listed below:

- days          number of days a certificate generated by -x509 is valid for.
- newkey rsa:bits generate a new RSA key of 'bits' in size

For more helps, please check with “openssl req -h”.

When above tool runs, it provides some prompts to input some information of the certificate.  Please see the red words for the input.

Generating a 2048 bit RSA private key
....................................+++
..+++
writing new private key to 'sample.pem'
-----
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]:US
State or Province Name (full name) [Some-State]:CA
Locality Name (eg, city) []:Irvine
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Linksys, LLC
Organizational Unit Name (eg, section) []:LAPAC1750
Common Name (eg, YOUR name) []:LAPAC1750
Email Address []:

3.  Verify SSL Certificate
After the certificate is generated, can use following command to verify the information of the certificate
#openssl x509 -noout -text -in ./sample.pem

Certificate:
Data:
Version: 3 (0x2)
          Serial Number: f5:6f:98:05:90:10:3c:9c
          Signature Algorithm: sha1WithRSAEncryption
          Issuer: C=US, ST=CA, L=Irvine, O=Linksys, LLC, OU=LAPAC1750, CN=LAPAC1750
          Validity:
Not Before: Sep 14 07:08:24 2015 GMT
          Not After : Sep 11 07:08:24 2025 GMT
Subject: C=US, ST=CA, L=Irvine, O=Linksys, LLC, OU=LAPAC1750,
CN=LAPAC1750
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public Key: (2048 bit)
Modulus (2048 bit):
                    00:94:f3:de:00:51:57:f7:ce:29:53:b9:88:ee:e2:
                    bf:c3:33:26:b2:7a:9a:3f:d5:5a:46:28:be:29:e5:
                    9c:76:e1:67:f1:1b:d8:3f:b8:de:56:28:ed:38:39:
                    3b:5d:20:d9:53:db:07:60:46:30:64:39:f3:0d:c9:
                    39:66:fd:26:78:06:db:c9:ca:39:aa:c6:08:70:8b:
                    75:d8:c5:42:a0:7f:9a:fa:9b:a0:a6:7d:e1:d6:37:
                    0c:0c:b6:02:08:c2:1a:85:d3:4f:6c:63:73:ad:67:
                    ca:c3:ae:c7:f6:7b:9b:79:5f:d4:c3:9b:16:6b:20:
                    0f:69:f5:9c:08:c7:d3:55:e2:55:ec:78:92:4d:80:
                    87:f7:d4:44:f4:50:cb:1f:05:2c:5f:b9:5d:d4:df:
                    55:bf:28:f1:6b:c5:df:5b:35:e4:01:7d:9e:fd:2e:
                    3f:61:e2:5c:39:3e:58:81:54:24:88:66:d8:3b:70:
                    9c:f9:04:d1:37:d0:77:1d:24:9d:fd:81:01:1a:27:
                    b3:3b:76:07:2c:ad:b6:10:cf:9b:42:d7:f8:02:f6:
                    8d:5c:04:14:e5:ac:d7:85:2d:a1:64:29:68:dc:30:
                    50:85:cc:2d:3d:bf:15:67:03:dc:39:ed:f4:7a:82:
                    90:6e:2a:e0:e9:ae:65:b4:72:0e:48:27:ae:a0:85:
                    3b:b1
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Key Identifier: A3:D3:19:AC:70:FA:66:0E:CD:44:95:00:CE:6C:DE:F6:0A:46:52:1F
X509v3 Authority Key Identifier:
keyid:A3:D3:19:AC:70:FA:66:0E:CD:44:95:00:CE:6C:DE:F6:0A:46:52:1F
DirName:/C=US/ST=CA/L=Irvine/O=Linksys, LLC/OU=LAPAC1750/CN=LAPAC1750
serial:  F5:6F:98:05:90:10:3C:9C
X509v3 Basic Constraints:
CA:TRUE
Signature Algorithm: sha1WithRSAEncryption
90:cf:87:1c:5c:fc:86:4c:75:33:74:0b:e2:9e:cb:1f:96:18:
38:72:58:5e:c8:13:8b:41:92:8f:59:a4:6b:82:84:e7:b3:51:
ff:64:cd:19:30:3a:20:2a:8d:50:8d:29:65:c9:6c:e8:28:d0:
8e:a3:7e:4b:10:8b:01:10:4f:dd:c5:b0:b2:e6:ab:73:4b:57:
d2:da:da:12:23:13:b8:fe:8f:3f:e0:26:ce:ba:a5:b8:fc:e8:
4f:89:ab:a6:a6:bc:bc:55:c5:29:f6:5c:06:ca:a4:fe:db:2e:
0a:34:bd:6a:c8:ee:2a:27:2e:2d:85:cc:b8:ce:9c:92:82:02:
8f:27:37:b8:31:fb:25:c3:a5:e9:40:e0:60:9b:5d:9d:76:d2:
1d:2a:57:6c:dd:b3:e4:d2:54:11:2f:8e:40:1d:8d:95:e3:0f:
51:f2:17:9e:db:ea:13:cd:6b:2a:02:08:34:87:e0:17:e7:8d:
c7:dd:35:82:c9:22:55:a9:58:e8:b0:3e:0b:9d:68:06:bd:37:
52:c2:f7:01:9d:65:4a:08:52:bf:71:c0:ca:96:79:9d:cd:ee:
8d:6a:9a:23:b4:1c:00:ca:45:57:c4:2e:81:55:e7:54:6c:aa:
5e:b4:a1:10:63:53:43:7a:d6:0f:98:ab:8f:1e:f8:08:da:50:
bf:2a:1d:80

Was dit artikel nuttig?

Aanvullende vragen?

Opnieuw zoeken

CONTACT MET DE KLANTENSERVICE