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