Repository navigation
Releases: misiektoja/certrally
Release list
v0.4.1
This release fixes how scep nextca reports a server without a next CA certificate.
Bug fixes
scep nextcareports no next CA certificate when the server answers GetNextCACert with404 Not Foundand GetCACert works at the same address. Servers built on go-pki-scep answer that way until a CA key rollover is prepared. The command exits with status 0 and--jsonshows an emptycertificateslist. Before, it exited with status 2 and suggested checking the path and the CA name. With--ca-certcertrally sends GetCACert after the 404, so a wrong path or CA name still exits with status 2.
v0.4.0
This release adds SCEP (RFC 8894) under certrally scep: enrollment, renewal, pending requests, CA certificates, queries and a SCEP test CA. inspect checks the signatures of SCEP messages. Names show domainComponent attributes as DC.
SCEP
scep enrollandscep renewrequest and renew certificates with PKCSReq and RenewalReq for RSA or ECDSA keys. The challenge password comes from--challenge,--challenge-fileorCERTRALLY_CHALLENGEand a server with several CAs needs--ca. certrally picks the digest, cipher and HTTP method from the server capabilities.--hashand--cipherchoose others, down to SHA-1, MD5 and DES for old CAs.--hashalso sets the digest of the PKCS#10 request that certrally creates. A CA without an RSA RA or CA certificate to encrypt requests for is reported before the request is sent.--allow-desaccepts answers that a server encrypts with single DES.scep renew --pkcsreqrenews through a PKCSReq signed with the current certificate, which servers that follow the drafts before RFC 8894 expect. When a server answers a RenewalReq withbadCertId, certrally suggests this flag.scep pollcollects a certificate that the CA keeps pending, for example until an operator approves it.scep enrollandscep renewpoll on their own within--timeoutand save a request that is still pending in a state file forscep poll.--poll-laterstops at the first PENDING answer.scep cacert,scep chainandscep nextcaget the CA and RA certificates, the chain up to the root and the next CA certificate.--fingerprintchecks a SHA-256 or SHA-1 fingerprint and--outsaves the checked certificates for--ca-cert.scep caps,scep getcertandscep getcrllist the server capabilities and get a certificate by its serial number or a CRL.- CertReps sent with an HTTP error status, such as PENDING with 202 or FAILURE with 400, are read like any other answer. When a server refuses an enrollment with an HTTP error, certrally shows the text of its error page without HTML markup and suggests checking the challenge password,
--subjectand--ca. - HTTP 503 answers are sent again up to
--busy-retriestimes, afterRetry-Afteror--busy-wait.--proxyalso takes a SOCKS5 proxy for SCEP. certrally scep mockruns a SCEP test CA on127.0.0.1:8090. Its flags add an RA certificate, a next CA certificate, pending requests, busy answers and the capabilities of an old CA.- SCEP answers are checked against RFC 8894, such as a GetCACaps list with a NUL byte or a CertRep without senderNonce.
--json,--capture,inspectandlintwork with the SCEP commands.inspectchecks SCEP signatures and, with--ca-cert, whether the signer chains to the CA. See SCEP details.
CMP, EST and SCEP
- Names show domainComponent attributes as
DCinstead of their dotted OID.--subjectacceptsDC=with an ASCII value and encodes it as an IA5String, as RFC 4519 requires.
v0.3.0
This release takes secrets on the command line and asks before it replaces existing output files. It fixes the fingerprint question of est cacerts --bootstrap.
CMP and EST
--secret,--password,--key-passwordand--token=TOKENgive the CMP shared secret, the EST password, the password of an encrypted key and the EST bearer token on the command line. Every command with the matching-fileflag takes them, includingpoll,inspect,mockandest mock. Other users of the machine can see these values in the process list, so the files, environment variables and prompt remain available. A bare--tokenstill selects the token sign-in, so a token needs the=form. The command that theenrollquestions print never shows these values.- certrally asks before it replaces an existing output file when it runs on a terminal. The default answer is no and the question comes before any request is sent. Without a terminal, and with
--json, an existing file still stops the command unless--forceis given.
Bug fixes
est cacerts --bootstrapasks on a terminal which certificate has the published fingerprint. Before, it did not recognise the terminal and always stopped with an error asking for--fingerprint.
v0.2.0
This release adds ML-KEM keys, keys that the CA generates, forwarding as a registration authority, collecting a waiting certificate in a later run and revocation by serial number. It also adds tools to test CAs, encrypted key files, DER output, proxies and EST bearer tokens. It fixes what est cacerts --bootstrap and --chain-out save.
CMP
- ML-KEM-768 and ML-KEM-1024 keys.
keygenandenroll --key-typecreate them.enrollproves possession by decryption with--pop encrypted-cert(default) or--pop challenge. enroll --central-keygenasks the CA to generate the key pair (RFC 9483 section 4.1.6). certrally checks the signature of the key generation authority before it saves the key.enroll --ra-certand--ra-keyforward requests as a registration authority in signednestedmessages (RFC 9483 section 5.2.2.1).enroll --poll-laterandcertrally pollcollect a certificate that the CA keeps waiting, for example for an approval, in a later run. The--capturefile holds the transaction.enroll --implicit-confirmasks the CA to skip thecertConfexchange.enroll --key-usage,--ext-key-usageand--template-certask for key usages or copy the subject, subjectAltName and key usages of an existing certificate.revoke --serialand--issuerrevoke a certificate without its file.--invalidity-datesets the invalidity date of the CRL entry.--cert-req-id,--general-info,--hashand--iterationsset request fields and algorithms that some CA profiles need.- Trust on first response is reported. Without
--ca-certthe report lists each certificate trusted from the first response with its SHA-256 fingerprint. Over plain HTTP certrally also warns that nothing authenticated them.
EST
est --tokenand--token-filesign in with an HTTP bearer token (RFC 6750) instead of a password.
CMP and EST
--insecureskips the check of the TLS certificate of the server, for test servers. certrally warns and records the flag in the capture file.- Encrypted private keys.
--keyand--new-keyread encrypted PKCS#8 keys. The password comes from--key-password-file,CERTRALLY_KEY_PASSWORDor a prompt. --out-format derwrites the output files as DER instead of PEM, with several certificates as PKCS#7.--proxy URLconnects through an HTTP or HTTPS proxy. The EST commands now also followHTTPS_PROXY,HTTP_PROXYandNO_PROXY.certrally --helpnames the version of the build in its first line.
Testing and troubleshooting
enroll --faultandpoll --faultsend deliberately wrong messages, such as acertConfwith a wrong certHash or a reused nonce, to test how a CA copes. See faulty messages.certrally mockfault flags make the test CA keep requests waiting, reject them, grant implicit confirmation, enforce RFC 9483 strictly or accept deviations such as SHA-1. The test CA also refuses a latecertConf, accepts registration authorities and logs revocations. Its rejections carry only the reason in the statusString, without theserver: status rejectionprefix. See the CMP test CA.certrally est mock --token-filemakes the EST test CA also accept a bearer token.
Bug fixes
est cacerts --bootstrapsaves only the checked certificate and the certificates it issued. Before, every certificate of the response was saved once one matched, so the unchecked server could add a CA that--tls-ca-certtrusted later. It also refuses the sign-in flags, which sent the password or token to the unchecked server.--chain-outholds only CA certificates that signed the new certificate. Before, a certificate from the unprotected extraCerts entered the chain file when it copied the name and key identifier of the CA.- The RFC 9483 section 3.3 check verifies the protection certificate with the signature of the response. Before, a certificate that copied the name and key identifier of the CA passed the check.
v0.1.1
This release fixes the Homebrew install.
Bug fixes
brew install misiektoja/tap/certrallyinstalls working shell completions for bash, zsh, fish and PowerShell. With v0.1.0 macOS showed a "certrally Not Opened" dialog for each shell and no completions were installed. On Linux the completion files held the help text ofcertrally completion. Homebrew also no longer warns that the cask uses the deprecatedpostflightstanza.
v0.1.0
The first release of certrally, a command line client for certificate enrollment with CMP (RFC 9810, which replaces RFC 4210, with the RFC 9483 profile) and EST (RFC 7030). It shows every message of an exchange as a live diagram, explains failures in plain words and warns when a server breaks the protocol rules. Built-in test CAs let you try it without a real CA. Tested over CMP with EJBCA Community Edition 9.6.3, Nokia NCM 26.7, Insta Certifier 10.0.0 and the OpenSSL 4.0.3 mock server and over EST with the Cisco libest 3.2.0 example server, see tested servers.
CMP
certrally enrollrequests a certificate withir,cr,kurorp10cr, protected with a shared secret or a signature. It needs no trust setup or checks the CA you name with--ca-cert. On a terminal it can ask for each setting step by step.certrally revoke,cacertsandcmp genmrevoke certificates and get CA certificates, root CA updates, request templates and CRLs.certrally pingchecks that a server answers CMP.
EST
certrally estenrolls, renews and gets server-generated keys, CA certificates and CSR attributes. It signs in with a password, a TLS client certificate or TLS-SRP and waits when the server asks it to retry later.est cacerts --bootstrapsaves the first CA certificates after you confirm their fingerprint.
Keys
- ML-DSA and composite ML-DSA keys work alongside ECDSA, Ed25519 and RSA.
certrally keygencreates keys and PKCS#10 requests offline.
Testing and troubleshooting
certrally mockandcertrally est mockrun CMP and EST test CAs on your machine.- Profiles. By default certrally warns when a response breaks a rule of RFC 9483, RFC 9810 or RFC 7030 that some CAs do not follow.
--profile strictrejects such responses with exit status 6. See profiles. --capturerecords every message of a run.certrally inspectdecodes captures and message files and checks their signatures and MACs.certrally lintchecks recorded responses against the profile rules.--jsonprints the outcome as one JSON document, see JSON output. The exit status tells scripts why a request failed.
Installation
- Archives for Linux, macOS and Windows on amd64 and arm64 come with a
checksums.txtsigned by cosign, SBOMs and build provenance, see verify a download. brew install misiektoja/tap/certrallyinstalls certrally and its shell completions on macOS and Linux.ghcr.io/misiektoja/certrallyis a container image for linux/amd64 and linux/arm64.
Known limitations
- The macOS binaries are not notarized. A binary downloaded with a browser needs
xattr -d com.apple.quarantine certrallybefore its first run. The Homebrew cask removes the attribute. est serverkeygencannot decrypt a key the server encrypts.