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