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