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 U2FsdGVkX18Q3qsTk5cUWuzAVfkZH5LTz/lRwuWrr9Y= 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 the 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.968 ms --- 10.215.168.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.968/0.968/0.968/0.000 ms
Step 3: Run the command pki scep show CSR on DUT0 and check whether the 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 3 10:47:09 2026 GMT Jun 3 10:47:09 2027 GMT
Step 4: Run the command pki show certificate running://auth/certificates/scep/CSR/ca/ca.der on DUT0 and check whether the 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 the command pki show certificate running://auth/certificates/scep/CSR/user/cert on DUT0 and check whether the 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 3 10:47:09 2026 GMT Not After : Jun 3 10:47:09 2027 GMT Subject: CN = MyUserCert Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: 00:ca:78:33:67:7e:5d:ee:35:d0:73:f0:97:ae:f5: ac:9b:b9:5d:6f:94:da:13:b7:69:3e:83:40:74:0e: 5f:56:9a:93:3d:11:1a:c4:1f:1b:ed:43:bc:0a:57: 78:02:35:43:f5:55:46:c3:cf:6d:75:4f:6e:b6:48: 56:c7:b3:af:3c:af:ce:b8:e1:19:a1:db:74:6b:47: 66:d2:21:af:88:cc:66:12:45:54:78:ad:6b:d7:94: c0:6e:02:2f:d7:3f:74:8a:a8:ad:29:29:22:2b:81: 3d:2b:ad:1c:5c:7b:3e:02:f8:d6:f2:9a:f2:3a:95: 0e:3e:e7:71:e4:74:94:b1:4b:2b:c8:f5:1a:71:c4: 4f:b6:1e:cb:23:60:a0:a4:e6:f0:aa:dd:08:e6:cf: 62:b3:af:56:d1:2c:f7:b2:ed:b9:42:a0:e0:1a:02: bb:d6:1b:bd:10:0a:3c:37:3e:ac:02:ea:ef:1c:2a: f8:b8:07:b1:79:60:0a:1b:b6:e7:df:ac:fc:cc:6d: f7:57:c3:6c:c6:ba:b9:dd:b2:d9:25:85:a3:ed:45: 72:9b:9b:00:9f:d3:76:ef:09:c9:4b:88:26:70:f1: 5e:47:1e:2e:75:c5:25:5b:fc:44:72:da:6e:c0:57: 1e:e2:78:d2:02:19:f6:13:aa:37:40:6f:12:51:f3: 7c:cf Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Key Usage: critical Digital Signature X509v3 Extended Key Usage: TLS Web Client Authentication X509v3 Subject Key Identifier: F3:2D:43:2C:50:1A:F3:A2:10:5C:6F:89:9C:5C:4B:8A:D1:F3:D1:14 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: 50:61:c5:03:31:cb:84:78:16:c9:15:a6:d8:6c:75:a6:ea:16: 10:c4:58:ea:0d:6d:ed:87:a5:9c:a0:0f:9c:8a:a2:80:a6:3c: 98:56:25:38:f2:c9:7e:be:ad:70:97:59:2c:6f:5d:b9:94:b1: 0b:a1:4c:90:f2:44:e2:cb:64:d4:84:f8:a5:75:97:ca:f1:18: 8c:25:99:0b:28:fa:03:8f:5d:69:b2:3d:89:62:87:00:59:32: 47:d9:76:db:7b:9e:ba:ee:06:31:98:84:79:11:fb:95:c1:96: 74:af:f4:ea:26:55:74:dd:dc:7d:82:e9:a2:dd:06:2b:db:9d: da:c5:2b:ea:02:a5:7c:3a:af:69:7b:74:11:bb:b6:d6:55:97: 13:48:1c:cf:7b:d9:79:b8:88:b2:d4:91:6d:6f:a9:56:21:f1: 34:ed:dc:11:e9:9a:63:d8:3c:a4:30:d6:9b:72:36:e0:dc:b6: a0:83:d5:8a:7b:35:7e:de:5a:55:dd:ec:eb:ed:84:0e:5a:27: 5e:ee:64:cc:25:3a:78:21:1d:9f:97:19:e0:16:72:e2:78:49: 73:f0:da:38:92:47:69:bd:7a:f5:12:d1:b7:4b:e8:9a:16:07: f5:7d:a8:0d:59:c8:f2:fa:40:ab:a4:0b:6d:50:9c:49:39:f5: 92:68:85:9a
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 U2FsdGVkX199Bf6gxNGj2PDaiVIBaGHa1OUrzIGlanSohKZXvNPYqO7A3RDmJ6QFlwPW45CdJUqO1zIxKnBXfw== 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 the 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.414 ms --- 10.215.168.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.414/0.414/0.414/0.000 ms
Step 3: Ping the 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.545 ms --- 192.168.213.25 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.545/0.545/0.545/0.000 ms
Step 4: Run the command pki scep show CSR on DUT0 and check whether the 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 3 10:15:29 2026 GMT Jun 3 10:25:29 2028 GMT
Step 5: Run the command pki show certificate running://auth/certificates/scep/CSR/ca/ca.der on DUT0 and check whether the 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 the command pki show certificate running://auth/certificates/scep/CSR/user/cert on DUT0 and check whether the output contains the following tokens:
Subject: CN = MyUserCertShow output
Certificate: Data: Version: 3 (0x2) Serial Number: 11:00:00:1e:64:e8:3f:92:c8:b2:dd:a2:fd:00:00:00:00:1e:64 Signature Algorithm: sha256WithRSAEncryption Issuer: DC = com, DC = scep, CN = scep-TELDATPKI-CA Validity Not Before: Jun 3 10:15:29 2026 GMT Not After : Jun 3 10:25:29 2028 GMT Subject: CN = MyUserCert Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: 00:b1:db:e6:bc:d6:d3:a8:1c:f1:b8:2c:39:e3:3b: d6:f6:b7:32:5f:0b:a1:13:5e:09:e3:89:eb:34:9b: 89:c4:70:02:40:0c:e3:5f:c8:8b:ec:25:00:79:58: bd:6a:5b:31:4a:71:67:88:05:f6:6a:74:a5:df:da: 53:80:01:32:75:ec:0a:46:e5:a2:3d:ed:28:89:39: 61:16:7a:b3:fd:9d:16:9d:f2:cc:80:5a:d4:e4:a4: f9:30:9a:fa:fd:20:64:86:28:05:f0:77:a2:56:9d: db:76:48:73:f9:e1:47:f6:97:3d:89:8f:37:c0:fe: ed:39:2d:de:82:73:36:bb:ae:a4:9a:f2:18:c4:a7: c7:c1:53:ff:7f:e2:8e:35:cc:d2:14:ce:65:12:6b: 3b:8b:2a:dc:34:e6:ef:b9:54:be:ed:d6:14:dc:36: 21:f2:3c:dd:ac:f7:f7:19:a0:17:44:10:68:bc:a1: 96:03:85:0f:eb:7c:f5:dd:cc:70:86:1c:4f:75:33: a3:4c:95:93:7d:be:05:db:0f:e1:64:12:44:ab:80: ec:33:24:a1:ea:a4:34:c9:31:fa:73:ce:18:2c:fe: 6d:ce:3e:5a:84:bb:d7:b6:a1:47:7b:fe:a8:dd:b0: f6:9e:5a:1b:3e:df:63:c8:2e:f9:af:c9:3c:e6:d6: cd:dd Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: 14:7E:96:A5:8B:CA:58:81:18:29:8E:FE:92:F3:AE:1A:DF:80:D8:63 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: b8:48:f9:f9:d7:cf:54:ba:df:ad:50:37:9d:e2:ca:49:8f:ea: 9c:f2:4c:27:10:ee:ea:0b:a6:e2:63:16:55:48:40:42:1c:5c: 49:dc:22:3e:75:56:26:f6:8a:27:2b:6e:c1:f2:4e:01:37:ff: 1d:d7:28:95:01:3f:cc:9a:db:7c:c2:8d:0c:ba:14:e6:7f:a5: c6:e2:8a:75:cf:ec:cd:70:74:92:82:fb:68:fa:6e:01:21:1f: 56:ad:ff:2b:c2:f9:93:c6:e2:77:02:48:af:91:0f:53:cf:97: 26:79:48:2f:da:c5:bf:f2:eb:14:76:a8:e1:30:2d:41:bc:a7: 78:b5:38:2a:5f:f3:eb:8c:1b:5a:7d:3b:27:6f:64:04:9d:35: a4:d2:6a:60:e8:9d:95:1f:8c:d4:0d:03:75:71:ce:42:1b:e2: eb:e4:3d:cb:a2:e5:d4:12:49:bc:b7:f0:91:5e:84:fc:be:e7: 40:8f:96:36:b4:dd:20:5d:23:ba:1d:55:08:29:3f:39:c6:a6: 91:fb:6f:a5:cb:99:3f:bc:c9:4e:9e:24:49:58:1e:e9:22:e2: 7b:c9:ab:80:01:2f:42:1b:79:f3:47:bb:13:8f:88:38:e8:b1: ce:c7:9e:5a:bb:ce:e2:e8:06:2d:e5:1a:98:9e:af:c1:47:69: 94:5c:4f:d0