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