Certificates
This page provides useful shell commands and instructions to create and manipulate certificates with ProSBC.
Installing a custom private key and local certificate on ProSBC
See WEB Portal configuration documentation
Use ProSBC (or Linux) shell to manipulate certificates
You can use ProSBC's shell (or most Linux hosts' shell as long as OpenSSL is installed) to create and view private keys, certificates and CSRs (certificate signing requests).
Create new private key
openssl genrsa -aes256 -out MY_PRIVATE_KEY.pem 2048You will be prompted to enter a pass phrase: Generating RSA private key, 2048 bit long modulus .....................+++ ..............................+++ e is 65537 (0x10001) Enter pass phrase for MY_PRIVATE_KEY.pem: Verifying - Enter pass phrase for MY_PRIVATE_KEY.pem:
Resulting file: -rw-r--r-- 1 root root 1704 Mar 14 09:15 MY_PRIVATE_KEY.pem
Create a self-signed certificate from a private key
openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout MY_PRIVATE_KEY.pem -out MY_CERTIFICATE.crtYou will be prompted to answer questions regarding the certificate: Generating a 2048 bit RSA private key .........................................................+++ ........................................................................................................................................................................................+++ writing new private key to 'MY_PRIVATE_KEY.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.Resulting files: -rw-r--r-- 1 root root 1415 Mar 14 09:15 MY_CERTIFICATE.crt -rw-r--r-- 1 root root 1751 Mar 14 09:14 MY_PRIVATE_KEY.pem
Create a CSR (certificate signing request) from a private key
You will be prompted to answer questions regarding the certificate: 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.
Resulting files: -rw-r--r-- 1 root root 1127 Mar 14 09:20 MY_CSR.csr
View the contents of the certificate
Resulting output: Certificate: Data: Version: 3 (0x2) Serial Number: f3:fc:c5:72:ea:a9:50:a6 Signature Algorithm: sha256WithRSAEncryption Issuer: C=CA, ST=Quebec, L=Boucherville, O=TelcoBridges, CN=MySBC/emailAddress=support@telcobridges.com Validity Not Before: Mar 14 13:15:53 2019 GMT Not After : Mar 13 13:15:53 2020 GMT Subject: C=CA, ST=Quebec, L=Boucherville, O=TelcoBridges, CN=MySBC/emailAddress=support@telcobridges.com Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: 00:dc:38:85:9f:75:ce🇨🇫7c:3b:60:20:11:d1:47: 00:39:6e:10:5c:3b:72:6e:26:09:70:7a:df:14:b3: f4:60:fb:0d:73:69:a9:4c:4f:a0:34:12:83:1a:9b: ce:f0:61:59:bd:f1:fb:a3:cb:84:be:a5:3b:86:e5: e0:66:82:53:fd:69:c3:f1:cf:85:73:2d:30:a9:a5: 82:4e:e2:0f:20🇩🇪88:9d:7a:42:d3:19:7b:09:08: 68:75:c4:36:46:23:f2:c6:05:49:e6:79:06:ce:f8: 9f:66:11🇦🇩e3:41:6c:f5:cb:df:3a:a4:77:a3:b3: 9b:55:f4:fc:5a:5a:c1🇦🇪c5:5d:0b🇩🇪b1:1a:bc: 3d:02:b9:0c:5d:d8:57:33:66:b2:a8:c0:c2:74:16: 20:32:63:0f:8b:8f:aa:f4:aa:bc:8a:12:1b:54:e1: 87:c7:10:79:ea:1d:f3:e2:4b:b3:b5:70:d5🇪🇨27: 24:d3:f2:37:20:7e:f7:2c:69:21:63:50:4a:fe:a2: 98:4f:bc:c8:4b:3c:74:68:95:8e:0a:0b:42:39:d3: cb:88:1d:55:c1:e1:61:f3:b0:64:42:6f:ec:c5:6f: 8f:f8:1c:a8:d9:5b:fc:d7:54:91:3b:0a:c4:1a:82: d1:96:11🇨🇦16:b8:44:f0:48:3a:1e:e4:78:d0:14: f5:1d Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: 9C:DA:43:3C:BC:E6:B1:8B:E7:B4:1C:AB:39:14:66:72:F5:C2:D6:25 X509v3 Authority Key Identifier: keyid:9C:DA:43:3C:BC:E6:B1:8B:E7:B4:1C:AB:39:14:66:72:F5:C2:D6:25
View the signing request of a certificate (CSR)
Resulting output: verify OK Certificate Request: Data: Version: 0 (0x0) Subject: C=CA, ST=Quebec, L=Boucherville, O=TelcoBridges, CN=MySBC/emailAddress=support@telcobridges.com Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: 00:dc:38:85:9f:75:ce🇨🇫7c:3b:60:20:11:d1:47: 00:39:6e:10:5c:3b:72:6e:26:09:70:7a:df:14:b3: f4:60:fb:0d:73:69:a9:4c:4f:a0:34:12:83:1a:9b: ce:f0:61:59:bd:f1:fb:a3:cb:84:be:a5:3b:86:e5: e0:66:82:53:fd:69:c3:f1:cf:85:73:2d:30:a9:a5: 82:4e:e2:0f:20🇩🇪88:9d:7a:42:d3:19:7b:09:08: 68:75:c4:36:46:23:f2:c6:05:49:e6:79:06:ce:f8: 9f:66:11🇦🇩e3:41:6c:f5:cb:df:3a:a4:77:a3:b3: 9b:55:f4:fc:5a:5a:c1🇦🇪c5:5d:0b🇩🇪b1:1a:bc: 3d:02:b9:0c:5d:d8:57:33:66:b2:a8:c0:c2:74:16: 20:32:63:0f:8b:8f:aa:f4:aa:bc:8a:12:1b:54:e1: 87:c7:10:79:ea:1d:f3:e2:4b:b3:b5:70:d5🇪🇨27: 24:d3:f2:37:20:7e:f7:2c:69:21:63:50:4a:fe:a2: 98:4f:bc:c8:4b:3c:74:68:95:8e:0a:0b:42:39:d3: cb:88:1d:55:c1:e1:61:f3:b0:64:42:6f:ec:c5:6f: 8f:f8:1c:a8:d9:5b:fc:d7:54:91:3b:0a:c4:1a:82: d1:96:11🇨🇦16:b8:44:f0:48:3a:1e:e4:78:d0:14: f5:1d Exponent: 65537 (0x10001) Attributes: challengePassword :my_password unstructuredName :TelcoBridges Signature Algorithm: sha256WithRSAEncryption 85:98:17:25:45:42:f6:44:f0:51:ca:42:32:92:e6:0e:a6:9d: 59:73:1c:82:c6:9b:c1:b7:17:00:77:f3:42:52:86:d6:08:a8: 30:99:02:41:c6:c2:22:b2:98:b9:f7:83:b9:b0:ab:5b:59:95: 9c:32:3b:9b:15:1c:4c:90:d1🇧🇧cf:fb:85:c4:5d:df:df:9e: 18:1b:f8:5b:b5:68:60:0f:d8:c6:5d:29:0c:54:b3:63:88:0c: 05:59:34🇦🇩c0:11:5b:e9:fb:e8:8c:c1:b5:5f:83:60:78:05: b7:7e:66:d7:1a:59:5a:2e:b3:9c:c2:38:68:29:bf:44:51:da: c9:2b:c3:f1:47:3c:d4:ce:4a:b2:8f:7d:6a:72:46:13:a8:97: 18:7e:bf:b0:33:14:ee:61:ed:94:c6:c0:19:92:14:2d:a0:8c: b1:a2:c1:61:40:62:90:7c:64:09:52🇪🇨b6:fd:cb:fe:56:3f: 6e🇩🇪e3:38:93🇪🇪e4:26:33:59:6c:3f:4f:36:87🇩🇪96:4d: c4🇧🇩ce:35:b2:79:16:38:f5:84:c8:ce:4a:27:11:6b:4b:0d: 9b:9f:dd:63:87🇨🇦23:12:8c:64:3b:c7:f0:46:e8🇧🇩e0:e7: 35:9d:b9:fb:aa:60:e2:48:8f:9b:6b:fb:69:2f:a5:7c:94:5a: 70:4d:a6:d1
Check that a certificate and a CSR match the private key
All 3 commands should display the same MD5 hash: (stdin)= 41c46eddc15580673fe4adb8f5255634
Last updated
Was this helpful?

