Skip to content

micromdm scepclient

scepclient from the micromdm project is a widely used command-line SCEP client.

Enroll

scepclient -server-url https://ca.example.com:8443/scep \
    -challenge <token> -cn device1.example.com -dnsname device1.example.com \
    -private-key device.key -certificate device.pem \
    -key-encipherment-selector

-key-encipherment-selector makes it encrypt its request for the SCEP server's certificate only. Without it, it tries to encrypt for every certificate the server lists, which fails when the CA's own keys are ECDSA (the default).

scepclient uses the system's trust store to verify the server's HTTPS certificate: install root.crt there first (see Trust the CA).

Renew

Run the same command again, without -challenge: when -certificate exists, scepclient sends a RenewalReq signed with it. It keeps the same key, which BastionXP CA accepts (RFC 8894 allows it).

scepclient -server-url https://ca.example.com:8443/scep \
    -cn device1.example.com -dnsname device1.example.com \
    -private-key device.key -certificate device.pem \
    -key-encipherment-selector

Enrollment and renewal with scepclient have been tested against BastionXP CA. scepclient has no GetCert; use bxp scep getcert.