Scep
These scenarios show how to configure the SCEP protocol to retrieve certificates from a PKI server.
Test SCEP Protocol With Linux PKI
Description
In this scenario, the SCEP protocol is used to retrieve digital certificates (X509) from a Linux PKI server.
Scenario
Step 1: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address 10.215.168.64/24 set protocols static route 192.168.212.0/22 next-hop 10.215.168.1 set system certificate scep csr CSR cgi-path /scep set system certificate scep csr CSR cipher aes set system certificate scep csr CSR digest sha256 set system certificate scep csr CSR distinguished-names CN=MyUserCert set system certificate scep csr CSR encrypted-password U2FsdGVkX18SJxvys2V/DFsYNlMRXb/DqTRlvjbgVI0= set system certificate scep csr CSR port 8080 set system certificate scep csr CSR url 'http://10.215.168.1' set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Ping IP address 10.215.168.1
from DUT0
:
admin@DUT0$ ping 10.215.168.1 count 1 size 56 timeout 1Show output
PING 10.215.168.1 (10.215.168.1) 56(84) bytes of data. 64 bytes from 10.215.168.1: icmp_seq=1 ttl=64 time=0.122 ms --- 10.215.168.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.122/0.122/0.122/0.000 ms
Step 3: Run command pki scep show CSR
at DUT0
and check if output matches the following regular expressions:
ca\s+Valid usercert\s+ValidShow output
------------------------------------------------------------------------------------------------- Certificate Status Usage NotBefore NotAfter ------------------------------------------------------------------------------------------------- ca Valid Encipherment & Signature Apr 16 09:19:39 2025 GMT Apr 11 09:19:39 2045 GMT usercert Valid - May 13 15:27:41 2025 GMT May 13 15:27:41 2026 GMT
Step 4: Run command pki show certificate running://auth/certificates/scep/CSR/ca/ca.der
at DUT0
and check if output contains the following tokens:
Subject: CN = Teldat-PKI, O = Teldat, L = Madrid, C = ESShow output
Certificate: Data: Version: 3 (0x2) Serial Number: 7c:28:60:8a:6f:42:5d:c8:44:f0:10:0d:61:e5:ca:40:11:bc:ea:f2 Signature Algorithm: sha256WithRSAEncryption Issuer: CN = Teldat-PKI, O = Teldat, L = Madrid, C = ES Validity Not Before: Apr 16 09:19:39 2025 GMT Not After : Apr 11 09:19:39 2045 GMT Subject: CN = Teldat-PKI, O = Teldat, L = Madrid, C = ES Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: 00:de:b7:3b:d9:9b:e3:d3:57:9b:b0:33:67:c0:40: 4f:45:84:ea:c2:35:a6:08:3b:3a:fd:6d:fa:d7:2b: 3d:7f:1c:a1:92:15:08:8b:5c:02:ec:6a:66:46:c5: 6f:7f:9b:9d:c3:86:e1:97:47:9b:5e:ea:96:5b:bf: 68:35:96:4f:6e:64:c6:7d:f6:da:6b:f9:bf:98:b1: 32:63:ae:f4:5b:2f:cd:6d:d7:ef:db:01:12:b0:a4: 54:95:6e:e8:84:4a:0a:f1:13:83:13:a1:7a:1d:f4: 06:3f:e3:53:5d:9f:68:a1:a0:5c:51:05:ba:8c:da: 00:11:64:4b:e8:37:c3:70:43:9c:16:dd:46:fb:34: e4:3c:ae:a4:9a:a1:da:cf:a1:f5:93:13:a6:0e:68: 51:31:f7:26:63:a3:8b:47:c3:94:e4:34:d2:b0:36: cf:22:e5:81:dd:a4:01:e8:79:08:37:ad:7a:b9:da: 24:37:cc:53:f4:51:f8:b5:67:09:15:63:52:60:7f: b0:e2:f0:38:cd:3c:13:42:81:5f:e2:dd:e2:c5:37: f3:ef:05:8c:85:2f:2a:0a:f4:94:2f:70:56:7f:7d: a9:f6:ca:69:0b:a7:40:e1:fa:bc:f0:f4:01:7a:76: 55:f4:2a:57:43:8b:f1:87:58:f2:f4:db:23:26:33: f8:4f Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: D3:97:2E:56:37:6A:89:77:01:D4:E3:42:0D:EC:E7:10:79:9C:E8:7C X509v3 Authority Key Identifier: keyid:D3:97:2E:56:37:6A:89:77:01:D4:E3:42:0D:EC:E7:10:79:9C:E8:7C DirName:/CN=Teldat-PKI/O=Teldat/L=Madrid/C=ES serial:7C:28:60:8A:6F:42:5D:C8:44:F0:10:0D:61:E5:CA:40:11:BC:EA:F2 X509v3 Basic Constraints: critical CA:TRUE, pathlen:0 X509v3 Key Usage: critical Digital Signature, Key Encipherment, Certificate Sign, CRL Sign Signature Algorithm: sha256WithRSAEncryption Signature Value: 5e:0d:47:96:a2:24:38:fa:62:5b:0c:c2:4e:59:23:79:40:1b: 88:d1:63:11:0b:ce:bc:63:46:cd:70:33:52:75:4b:85:c1:39: be:3c:ce:7c:66:53:63:b4:39:07:ec:ef:52:fe:fa:dc:c1:fb: e4:51:61:28:58:4f:90:71:83:50:7d:62:a9:16:fa:45:89:08: 5f:39:43:6a:b1:bb:ad:4e:6f:50:bc:07:4f:1c:5b:07:df:63: ec:44:20:48:b6:97:00:e2:9d:8e:42:9e:96:5f:71:7a:43:96: de:fd:66:6b:45:85:5d:e4:dc:bf:e9:34:64:4f:3a:7b:33:a0: 54:80:3b:9a:5b:1f:3f:3f:1c:09:a3:8e:d8:b6:2a:ba:b2:07: 87:fa:0f:a5:69:41:06:b1:14:6f:09:4f:bb:88:60:87:70:83: 31:73:ed:2a:03:ca:3c:19:0a:b2:24:61:c6:ce:09:97:ac:6e: da:cb:47:88:c5:f5:a7:74:d2:96:e0:cc:c3:b6:b7:f6:64:9f: ad:1c:7f:36:fd:39:7c:57:54:a5:e9:8a:82:90:4d:cd:74:99: 27:4d:f6:62:a6:96:c5:6e:d3:02:ec:c1:4d:5f:46:b6:82:75: 12:61:d7:a3:d6:70:f6:35:9d:9c:30:06:84:af:b2:cb:a5:a0: 5e:d3:1d:6c
Step 5: Run command pki show certificate running://auth/certificates/scep/CSR/user/cert
at DUT0
and check if output contains the following tokens:
Subject: CN = MyUserCertShow output
Certificate: Data: Version: 3 (0x2) Serial Number: 8 (0x8) Signature Algorithm: sha256WithRSAEncryption Issuer: CN = Teldat-PKI, O = Teldat, L = Madrid, C = ES Validity Not Before: May 13 15:27:41 2025 GMT Not After : May 13 15:27:41 2026 GMT Subject: CN = MyUserCert Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: 00:cc:f7:53:5c:ba:f8:5f:31:83:81:27:75:81:a7: a1:fe:bf:64:fe:ea:85:7a:22:ca:59:c0:b0:26:c3: c9:23:0f:b6:fd:7b:c1:51:5f:04:94:f5:f1:16:89: 54:bd:75:94:da:26:c7:7c:3a:3b:fc:8a:b0:18:47: ed:e8:b4:89:34:8b:f0:24:9a:c9:96:c2:54:56:63: df:cb:29:8c:e4:80:8f:f9:46:c9:af:ab:7f:85:f7: 39:20:10:2b:b7:f5:0f:15:77:0d:67:4d:57:82:84: cc:97:39:8d:a6:2c:ae:70:58:82:38:85:b0:4e:56: 71:0c:6a:fc:fa:7f:fe:94:42:f8:17:3f:52:52:b6: 7a:e3:cb:5e:f3:e8:aa:32:50:f1:77:68:9f:e6:92: 8a:b6:dd:8f:a3:26:d1:69:b0:ad:c1:de:93:05:ca: 89:2d:33:ff:f3:1c:99:99:48:c6:4d:51:f5:ad:f5: 9d:fd:e8:82:fb:a1:ab:8f:f3:6c:28:93:05:29:2f: 0b:b3:83:a4:ca:0b:08:ab:eb:c0:39:7b:53:32:ea: 71:9c:82:a7:ff:95:ea:c0:66:f2:42:33:b0:73:88: 1b:6e:d6:41:65:ff:59:0c:5f:f7:f0:60:6b:cd:21: 88:71:0b:34:a5:c4:bd:0b:05:b3:85:25:cc:cc:6c: 6e:77 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Key Usage: critical Digital Signature X509v3 Extended Key Usage: TLS Web Client Authentication X509v3 Subject Key Identifier: A8:26:39:98:01:15:7E:CC:82:E1:6E:0C:03:8A:B5:04:00:6E:7A:81 X509v3 Authority Key Identifier: D3:97:2E:56:37:6A:89:77:01:D4:E3:42:0D:EC:E7:10:79:9C:E8:7C Signature Algorithm: sha256WithRSAEncryption Signature Value: a9:00:42:3f:90:cf:c5:a5:b3:01:85:c9:bb:a6:11:f3:5c:5a: b1:44:20:da:c2:26:b8:f9:e8:1a:0f:29:70:8c:cb:f6:6d:3c: 60:5d:6c:0d:8a:59:7b:c2:84:22:b9:92:d3:01:fd:b3:03:f9: 24:e5:d1:54:87:ec:22:5c:85:29:2f:12:2a:18:bc:36:e7:a9: b4:1c:50:c1:83:ec:8a:eb:f5:34:67:cd:bc:f7:80:ea:12:8b: d8:cf:37:9c:a8:07:cd:5e:52:b3:48:a9:53:87:47:a3:ae:ee: 1a:65:8a:cc:6c:9c:dd:a7:c0:4d:18:6b:8d:2f:f6:c9:c5:20: d0:32:2f:03:ab:38:5d:b1:ff:b9:97:17:71:8c:81:c3:15:fc: f5:69:26:e0:8f:87:70:2e:4b:4e:16:ef:ca:cc:32:63:31:4d: b6:01:9d:87:56:0d:e9:7a:e5:e3:0f:34:73:47:ed:c8:80:6c: b6:92:26:7f:74:5c:93:1a:3e:c6:c1:79:8d:b2:7b:12:98:9c: 04:0b:3f:71:49:dd:c5:1f:0f:4b:4d:cd:97:f7:ed:97:80:51: ee:87:db:de:a5:95:85:e8:5d:4f:e6:23:28:8d:38:a3:2b:de: b5:d0:b3:bc:9b:1d:82:9c:17:f2:c2:70:43:07:cc:1f:d0:e5: 7f:36:e7:8f
Test SCEP Protocol With Windows Server PKI
Description
In this scenario, the SCEP protocol is used to retrieve digital certificates (X509) from a Windows PKI server.
Scenario
Step 1: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address 10.215.168.64/24 set protocols static route 192.168.212.0/22 next-hop 10.215.168.1 set system certificate scep csr CSR cgi-path CertSrv/mscep/mscep.dll/pkiclient.exe set system certificate scep csr CSR distinguished-names CN=MyUserCert set system certificate scep csr CSR encrypted-password U2FsdGVkX18PzB6YWrieXcCRheL8cBNt5XUv/VQO8gyEkyExwEA2UywjNzBj6QmVWB8ix2hBaZqA3GusDPGbEg== set system certificate scep csr CSR url 'http://192.168.213.25/' set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Ping IP address 10.215.168.1
from DUT0
:
admin@DUT0$ ping 10.215.168.1 count 1 size 56 timeout 1Show output
PING 10.215.168.1 (10.215.168.1) 56(84) bytes of data. 64 bytes from 10.215.168.1: icmp_seq=1 ttl=64 time=0.140 ms --- 10.215.168.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.140/0.140/0.140/0.000 ms
Step 3: Ping IP address 192.168.213.25
from DUT0
:
admin@DUT0$ ping 192.168.213.25 count 1 size 56 timeout 1Show output
PING 192.168.213.25 (192.168.213.25) 56(84) bytes of data. 64 bytes from 192.168.213.25: icmp_seq=1 ttl=126 time=0.512 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.512/0.512/0.512/0.000 ms
Step 4: Run command pki scep show CSR
at DUT0
and check if output matches the following regular expressions:
ca\s+Valid usercert\s+ValidShow output
------------------------------------------------------------------------------------- Certificate Status Usage NotBefore NotAfter ------------------------------------------------------------------------------------- ca Valid Signature Dec 14 10:00:35 2023 GMT Dec 14 10:10:34 2053 GMT ra Valid Encipherment Dec 21 09:33:45 2023 GMT Dec 20 09:33:45 2025 GMT ra-2 Valid Signature Dec 21 09:33:43 2023 GMT Dec 20 09:33:43 2025 GMT usercert Valid - May 13 15:06:28 2025 GMT May 13 19:06:28 2025 GMT
Step 5: Run command pki show certificate running://auth/certificates/scep/CSR/ca/ca.der
at DUT0
and check if output contains the following tokens:
Subject: DC = com, DC = scep, CN = scep-TELDATPKI-CAShow output
Certificate: Data: Version: 3 (0x2) Serial Number: 1a:ea:6d:57:94:fe:a5:9c:42:14:81:ca:79:1b:75:d7 Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: Dec 14 10:00:35 2023 GMT Not After : Dec 14 10:10:34 2053 GMT Subject: DC = com, DC = scep, CN = scep-TELDATPKI-CA Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: 00:bf:c5:be:9a:32:e2:a5:42:6c:b8:42:b5:7b:21: e5:71:b0:79:46:b1:41:bd:25:c3:40:e1:33:8e:1a: 3b:12:ca:26:1e:f3:c9:44:d6:b5:9a:03:cb:14:f5: 82:6f:a8:7e:47:bc:e7:e0:b3:1f:c6:ff:84:54:2b: fd:b6:0d:e1:4f:c3:b7:6a:0f:98:99:c2:8a:b6:b8: 9d:f3:5d:36:f3:af:48:0f:7d:cd:5a:6c:a8:10:0c: 02:b2:0c:af:b3:d8:c3:b4:de:0e:b8:15:6d:4a:f0: 4e:67:7d:c2:3a:dd:03:f7:3d:80:69:63:2c:f9:97: fa:d3:4d:80:13:dd:24:ac:54:ad:f7:cc:25:94:41: fd:2d:e8:2a:8e:a8:91:96:89:d2:9f:0c:17:03:99: 11:f5:ce:2c:db:78:b7:09:75:d1:96:af:58:82:58: 62:86:63:01:16:68:fc:06:db:92:d0:c5:6d:9d:6d: fd:5d:13:b0:2b:37:2f:9c:ae:3b:e3:34:d6:42:7b: 12:01:93:da:ea:b4:c8:ba:9f:57:35:4f:6a:a1:95: c2:5f:40:9d:6b:c1:72:ec:91:9b:72:cc:6a:b8:9e: dc:08:f0:53:09:4f:d4:09:75:28:99:56:f5:66:be: 7d:ca:59:0e:9b:50:4d:be:98:04:20:4d:98:e6:5f: 58:c5 Exponent: 65537 (0x10001) X509v3 extensions: 1.3.6.1.4.1.311.20.2: ...C.A X509v3 Key Usage: critical Digital Signature, Certificate Sign, CRL Sign X509v3 Basic Constraints: critical CA:TRUE X509v3 Subject Key Identifier: AF:CF:34:AD:5B:BC:15:CF:9E:0B:FB:4A:ED:09:79:E0:01:68:5D:B8 1.3.6.1.4.1.311.21.1: ... Signature Algorithm: sha256WithRSAEncryption Signature Value: 6c:44:b8:33:b1:75:08:00:07:7f:2b:a4:80:f2:6a:ff:94:4c: ee:85:cc:61:db:49:59:19:cc:01:2f:c5:45:4b:d2:8d:dc:77: 54:7d:3c:34:75:28:c9:16:28:94:15:51:3d:e6:f7:dc:9b:d8: cd:63:bb:d3:ec:fc:ae:32:7e:cd:be:50:c2:9f:f7:91:de:9e: bb:44:d3:24:09:4d:dd:5f:67:ad:58:ad:7e:cc:9e:9f:8f:c8: 48:f5:d9:03:9a:a3:df:cd:e5:8a:e0:03:9e:36:f9:ba:fd:ff: 0b:a0:15:8c:66:9f:49:bc:e8:94:3e:61:7d:78:ff:48:66:d1: 13:54:1d:41:61:63:28:ba:d9:f8:6a:c4:df:48:16:d2:69:39: c0:38:ea:54:84:e0:40:17:d9:2c:43:58:be:e4:a1:5d:e2:6c: e9:23:55:b7:6e:61:8f:4e:72:4f:c2:d5:c4:7a:74:f5:8e:b3: 0e:2c:bc:5d:7d:ba:f8:ae:3b:f0:d6:b0:2e:1f:3f:fd:2d:77: 7d:52:bf:f7:07:ba:9d:64:60:57:1d:68:34:bb:cb:44:ac:dd: 55:c2:40:a1:98:84:b7:74:50:a4:50:95:0e:12:59:96:b9:af: bc:b3:09:e6:67:39:26:7e:b0:41:07:90:57:72:40:2a:11:7a: 2e:ac:be:b8
Step 6: Run command pki show certificate running://auth/certificates/scep/CSR/user/cert
at DUT0
and check if output contains the following tokens:
Subject: CN = MyUserCertShow output
Certificate: Data: Version: 3 (0x2) Serial Number: 1c:00:00:da:11:77:d3:c9:10:9a:5b:f5:70:00:00:00:00:da:11 Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: May 13 15:06:28 2025 GMT Not After : May 13 19:06:28 2025 GMT Subject: CN = MyUserCert Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: 00:89:e1:a6:58:43:9c:91:8a:25:56:6f:c7:a1:81: a9:22:d9:2d:9e:b6:bf:ab:2c:a0:5e:9b:61:00:10: 0f:ff:68:dc:55:79:f0:23:a2:b3:96:28:6c:9a:63: 3a:9c:cc:aa:8e:e5:8a:78:ef:92:dd:be:b2:3c:c3: d1:e2:b1:a4:40:e3:ea:84:b1:b7:7b:c6:fd:51:0a: 1d:c1:13:86:a5:79:51:22:b5:f1:37:4e:f7:a8:ed: 80:3c:67:50:06:5e:ea:41:54:e2:2b:ac:9f:75:97: a5:75:26:db:21:61:6e:b6:09:a0:f4:bc:65:be:07: bb:ff:a7:05:37:2e:04:91:d1:88:fb:ad:7d:ad:9b: 9f:20:6c:45:0f:76:01:c3:0c:cc:6c:2e:ac:43:ec: 0a:85:2e:c3:a1:1e:81:56:ed:8d:4e:7a:8d:48:3e: 51:06:c0:d6:49:d4:f2:b0:d0:1f:67:b6:e1:b8:49: f4:6c:0a:d3:6f:20:d0:09:2a:c2:db:74:09:3c:72: 8d:62:7a:44:bd:1b:6f:ee:9a:fc:9a:a7:5d:2c:56: a4:26:b2:49:cf:41:ea:ce:4e:b1:8e:c9:4e:13:70: c6:e1:36:1c:6b:c1:04:8d:04:88:33:b5:39:30:95: c0:52:db:d4:74:56:71:48:95:c7:19:9f:22:13:5d: 38:9b Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: EC:3A:90:0E:BD:51:90:F2:CA:B7:7E:07:D5:52:D1:AE:40:DB:02:5A X509v3 Authority Key Identifier: AF:CF:34:AD:5B:BC:15:CF:9E:0B:FB:4A:ED:09:79:E0:01:68:5D:B8 X509v3 CRL Distribution Points: Full Name: URI:http://192.168.213.25/CertEnroll/scep-TELDATPKI-CA.crl Authority Information Access: CA Issuers - URI:ldap:///CN=scep-TELDATPKI-CA,CN=AIA,CN=Public%20Key%20Services,CN=Services,CN=Configuration,DC=scep,DC=com?cACertificate?base?objectClass=certificationAuthority X509v3 Key Usage: critical Digital Signature, Key Encipherment, Data Encipherment 1.3.6.1.4.1.311.21.7: 0..&+.....7.....3......./...(...f<...[...]..d.. X509v3 Extended Key Usage: 1.3.6.1.4.1.311.20.1, Microsoft Encrypted File System, Code Signing, Any Extended Key Usage, TLS Web Server Authentication, Signing KDC Response, TLS Web Client Authentication, 1.3.6.1.4.1.311.21.5, 1.3.6.1.4.1.311.20.2.1, 1.3.6.1.5.5.8.2.2 1.3.6.1.4.1.311.21.10: 0y0...+.....7..0.. +.....7 ..0 ..+.......0...U.%.0 ..+.......0...+......0 ..+.......0...+.....7..0.. +.....7...0 ..+....... S/MIME Capabilities: 050...*.H.. ......0...*.H.. ......0...+....0 ..*.H.. .. Signature Algorithm: sha256WithRSAEncryption Signature Value: 36:5f:c3:bb:0e:86:db:33:42:3f:b1:a2:43:06:83:0d:c8:61: cf:f8:d3:67:ed:d7:e5:02:a4:39:7c:5b:e6:28:35:30:c4:6f: e9:25:08:26:a2:50:e7:00:83:df:1a:ad:98:cd:09:e2:45:4f: ec:95:ed:b4:60:06:0f:c3:4d:84:f7:c3:34:02:80:c8:29:86: af:c5:e5:9f:ba:69:f7:b5:f6:b3:84:72:06:ac:cc:77:78:db: c3:91:9d:3d:37:0e:c0:45:19:1f:d9:51:09:0d:9d:b5:5f:5c: 0a:c7:ca:68:b7:52:51:c3:ba:5f:9e:44:22:9f:91:b2:82:7f: dd:ea:80:22:35:ed:2e:ff:b1:7b:1c:b5:e7:3b:0b:f7:a9:b3: aa:38:a1:9d:04:23:04:18:c5:12:36:78:70:d0:1e:82:33:c4: 84:d2:5b:66:7a:bb:3d:c6:44:28:36:12:e3:9f:66:d4:f3:94: 66:e3:ae:d3:4b:09:72:a9:ff:9f:bd:00:35:5e:e7:74:25:fb: 72:91:74:05:94:e1:2f:67:05:31:ff:40:f0:40:d5:eb:06:eb: 03:6d:cf:e5:fe:99:9a:5c:55:d4:33:72:b1:f2:6f:6c:b8:80: fb:34:1e:53:03:e8:48:e0:b1:08:35:00:9e:d2:3b:e3:4c:54: df:e7:17:57