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 U2FsdGVkX1/tAL6zswySQrFihI4xd9SkPnpA2H2PM1E= 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.162 ms --- 10.215.168.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.162/0.162/0.162/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 - Dec 11 16:10:19 2025 GMT Dec 11 16:10:19 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: 2 (0x2) Signature Algorithm: sha256WithRSAEncryption Issuer: CN = Teldat-PKI, O = Teldat, L = Madrid, C = ES Validity Not Before: Dec 11 16:10:19 2025 GMT Not After : Dec 11 16:10:19 2026 GMT Subject: CN = MyUserCert Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: 00:b1:34:75:1f:51:7c:9f:31:20:e2:89:46:c2:3f: 8b:b6:53:51:ab:5b:e6:14:6a:27:b2:63:c6:85:f7: bc:d1:0e:cc:4a:74:4e:a3:b0:52:65:74:1e:f3:80: 07:07:49:9d:e1:a6:50:4d:31:dc:8d:b7:5f:0e:27: 8f:cd:7d:b8:35:f8:d2:ac:35:f5:6d:56:54:21:e5: 54:55:c5:03:d2:65:7e:ad:32:fe:22:ff:c6:9e:d6: 7f:b5:a5:bd:4f:4e:a1:d8:f0:22:c1:e4:c1:3e:72: 23:ab:45:00:8c:56:0b:b2:99:d8:be:b4:97:b9:d3: 24:51:72:92:e8:83:16:92:ae:60:47:5b:ea:1b:1b: 9f:8d:ed:67:95:82:4c:04:6f:f5:9a:aa:cd:59:07: 0a:db:33:37:71:55:d9:f5:2a:94:b8:b1:ae:86:13: 84:11:f5:8c:07:cc:dd:8d:11:53:bc:1b:9a:e0:0d: fe:64:99:7c:d6:e9:7b:77:9c:ed:72:4e:f7:7b:cf: ee:d9:73:7b:5c:df:64:63:28:1b:08:ec:be:5c:a6: 2b:36:75:7e:e0:3f:19:51:23:33:6e:27:26:25:46: a2:85:e6:0d:51:cb:30:56:2f:e5:ea:06:d9:c0:74: 90:1d:46:2a:91:a4:8a:a8:a1:57:79:af:eb:40:f6: 81:67 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Key Usage: critical Digital Signature X509v3 Extended Key Usage: TLS Web Client Authentication X509v3 Subject Key Identifier: DB:DC:68:AD:21:77:CF:3A:B1:D7:91:38:24:76:B2:09:7F:F7:89:19 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: 12:7c:87:35:b2:4d:76:de:ab:39:63:03:ab:9c:d3:43:40:db: e1:92:17:3c:c4:35:09:89:a4:95:51:6e:f1:8d:31:fc:f9:60: b4:39:30:9d:14:4c:ae:57:01:96:bb:47:66:81:46:a1:b1:e7: 56:52:7f:4f:a4:c8:6a:d1:5d:60:3e:dc:d6:d2:fe:c9:d9:6a: eb:d0:4a:02:0d:d2:f0:54:04:90:ba:29:0e:59:50:04:17:6a: eb:cc:54:47:a0:da:f9:eb:bf:5f:bc:d9:d1:0f:9d:72:b6:90: 5a:48:02:7f:97:6b:69:57:5a:fa:e5:89:40:6f:94:66:e2:94: f5:f3:f7:9a:05:78:5e:2f:9b:ec:1e:96:f6:32:5f:a2:cd:14: 8c:04:3a:3c:cc:05:47:d7:bb:03:4d:6b:2a:8b:2c:cb:5d:a2: 7e:e8:aa:fe:ac:d5:6e:53:4a:5a:6b:16:1f:f8:3e:10:d1:5e: 03:37:91:f4:79:7e:35:7a:66:43:a3:4c:d5:0e:c5:31:35:ac: e7:38:d3:77:c1:61:eb:dd:ac:11:47:f5:90:e0:b8:f8:2c:7e: 69:ec:1e:43:fe:f3:c6:c0:81:3c:a2:cd:18:3f:5a:ee:80:77: 5c:c1:06:2a:59:60:3a:cf:8b:dd:51:dc:1e:0a:4f:88:6d:33: 58:ab:8a:d9
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 U2FsdGVkX19T3TuN+v8BcX1g1LsI/V+is+4qKDM3JmI4ngpVaIUE4O+HJIEsF3G2Rc7O067q+zBlDGczKZK8iQ== 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.153 ms --- 10.215.168.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.153/0.153/0.153/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.601 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.601/0.601/0.601/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 - Dec 11 15:42:58 2025 GMT Dec 11 19:42:58 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:01:23:37:8e:72:33:94:bb:b8:7d:3d:00:00:00:01:23:37 Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: Dec 11 15:42:58 2025 GMT Not After : Dec 11 19:42:58 2025 GMT Subject: CN = MyUserCert Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: 00:ce:b3:49:3f:8f:b3:3f:20:f1:b9:0f:87:d2:be: c9:1f:85:36:42:e4:64:2b:af:dc:4f:cc:d5:6a:9f: dc:3d:01:99:8c:92:6c:18:34:f4:a3:f3:14:62:db: b5:95:cb:0e:32:e2:08:d6:72:81:52:23:c1:73:91: e8:4e:3f:07:73:52:d1:44:9d:be:6f:02:75:e2:ce: 5d:b0:a9:3a:d9:52:91:2a:80:74:fb:36:10:b7:a7: 43:0e:03:9f:17:ee:69:d0:00:9f:9f:39:3d:69:1c: 1d:d8:79:2b:4c:21:cd:43:39:db:3e:16:9e:90:14: ca:f2:a8:e2:c4:3a:e5:d1:c0:f1:f8:04:73:e4:7d: 46:a9:20:75:9f:80:d8:8a:ca:69:1c:71:38:ce:e9: 3d:fe:dc:1f:07:ec:ce:02:bf:00:30:59:ba:22:aa: cf:1f:1b:a2:c5:32:ca:c7:48:5d:a6:42:fb:97:c5: 3e:32:a3:21:f9:96:e8:b2:8f:99:0b:18:d8:5b:9b: 55:22:b7:4a:d2:03:7e:37:ec:ff:ae:74:ff:98:ca: 4e:30:a9:a9:3f:09:d2:7b:f4:75:be:cd:23:0e:94: 55:a6:d8:c7:82:1e:cc:19:56:ee:83:c3:aa:2c:0f: bf:bd:f5:99:f0:65:c8:2b:2d:67:3e:a7:26:3f:65: eb:a9 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: 56:53:D6:BA:BC:A2:75:96:1B:43:88:0D:32:90:31:0A:FB:06:B6:89 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: 91:49:56:44:21:9a:50:c4:2e:78:96:28:9b:a8:75:5f:83:36: 02:44:46:07:81:09:fb:3c:75:50:91:b3:50:99:d4:12:96:49: 7d:e8:7f:b8:fd:19:4b:7f:3a:d2:60:21:91:d9:ca:01:ec:e9: 8c:0c:2d:1c:9a:2b:7c:21:a7:16:93:2e:94:73:76:47:da:f4: e2:d5:a0:bc:82:cd:f1:eb:ac:85:6c:12:4d:4e:24:d8:72:56: 30:f9:09:f8:36:62:88:b5:13:19:7a:6e:b0:56:80:1b:2d:aa: 42:9f:94:79:a2:e2:6a:b9:11:54:eb:a8:14:9b:65:bb:e3:c8: c1:34:37:5b:50:f1:48:34:16:b7:55:22:5b:69:81:ef:e0:73: d7:d6:79:e0:08:d8:47:ad:c5:57:93:88:5b:0c:d9:52:9b:92: 7b:b5:06:2e:b6:18:9b:57:5b:d2:65:56:73:5a:2e:68:7e:2b: 46:c5:1f:e5:49:86:a1:60:9c:55:a3:27:27:ac:9d:ae:cc:af: 60:e8:4e:ea:33:bb:31:b9:ed:41:5e:82:01:da:cc:19:fb:ee: ee:fa:7f:4a:14:9d:34:79:32:ce:fc:41:52:53:6f:1c:bb:c0: 16:ca:a4:07:76:93:85:ae:1a:b7:4f:1d:b7:5d:4b:2e:4c:67: 8d:62:98:91