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