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