Repository navigation
Releases: misiektoja/go-pki-est
Release list
v1.4.1
estclient finds HSM key pairs that it missed before and takes crypto11 from its new module path.
Changed
estclientusesgithub.com/eclipse-keypont/crypto11v1.6.8 for HSM keys. The crypto11
project moved there. It replacesgithub.com/ThalesIgnite/crypto11v1.2.1, the last release
under the old path.
Fixed
estclientfinds HSM key pairs whose public key has another label or is stored only as a
certificate. It looks for a public key object with the samekey_idand then for a
certificate with that ID. Both cases failed withfailed to find key pairbefore. That error
now names the ID it searched for.
v1.4.0
The client connects through HTTP proxies and signs in with bearer tokens, which the server checks
with a new hook. The client refuses redirects and bounds response bodies. The server bounds its
CA certificate cache. estserver listens on localhost by default.
Added
- HTTP proxies.
Client.Proxychooses the proxy, likehttp.Transport.Proxy. When it is nil,
the client now usesHTTPS_PROXYandNO_PROXY. TLS-SRP and thetls-uniquevalue work
through the proxy. - Bearer tokens.
Client.BearerTokensendsAuthorization: Bearer <token>(RFC 6750).
Usernametakes precedence. The server checks the token withServerConfig.CheckBearerToken
in place ofCheckBasicAuth. Without that hook a token does not sign a client in.
PasswordRenewalalso accepts a bearer token that the hook accepted. - estclient
-proxyand-tokenset the proxy and bearer token. The configuration file takes
them asproxyandtoken.
Changed
estserverlistens onlocalhost:8443by default. It served its mock CA on every interface
before. Setlisten_addressin thetlssection to serve other hosts.CA.Reenrolldocumentation says that the server does not check revocation and that a CA
must match a login renewal to the signed-in identity, not to the CSR subject.
Fixed
- Server error messages are escaped. Control characters other than newline and tab appear as
escapes such as\x1b, so a malicious server cannot send terminal escape sequences through
estclient. - The client refuses redirects. It followed them and could resend its credentials in
cleartext to anhttpURL. A 3xx answer is now returned as an error. - Response bodies are bounded by
Client.MaxResponseBody, 1 MiB by default. A crafted
response could exhaust memory or crash the client. For the same reason keep a server's
MaxRequestBodybelow 4 MiB. - The CA certificate cache is bounded. A peer could grow server memory without limit by
naming many/cacertspath segments. A segment longer than 255 bytes now answers 414 and the
cache keeps at most 1024 segments. - A negative
RateLimitis refused.NewRouterreturns an error instead of serving without
a limit. estserverdrops slow and idle connections. A request must arrive within 60 seconds and an
idle connection closes after 120 seconds.estclientrefuses symbolic links as output files.-out,-keyoutand-separateout
followed them, so a planted link could send a private key to another file.
v1.3.1
The client sends the length of every request body, so it can enroll with servers that cannot
read a chunked body, such as the Cisco libest example server.
Fixed
- Request bodies carry a
Content-Length.Enroll,Reenroll,ServerKeyGenand
TPMEnrollsent their bodies withTransfer-Encoding: chunked. Servers without chunked
request support, such as the libest 3.2.0 example server, answered with HTTP 400 or closed the
connection.
v1.3.0
The client can sign in with TLS-SRP and gives the host more control: it can wrap the HTTP
transport, see each connection and accept an enrollment response that carries the CA chain. The
module now needs Go 1.27.3 and go-tls-srp v0.2.0.
Added
- TLS-SRP client.
Client.SRPUsernameandClient.SRPPasswordsign in with TLS-SRP
(RFC 7030 section 3.3.3) instead of checking a server certificate. The password authenticates
both sides, so the trust anchors and client certificates are not used. TLS-SRP runs over TLS
1.2, so thetls-uniquechallenge password works.Client.SRPMinGroupBitssets the smallest
SRP group the client accepts. The default is 2048 bits. Client.WrapTransportwraps the HTTP transport of each operation, for example to log or
record requests and responses.Client.OnConnectreceives each connection after its handshake, so the host can read the
TLS version and the server certificates. For TLS-SRP it receives a*srptls.Conn.Client.AllowCertificateChainaccepts an enrollment response that carries the CA chain next
to the issued certificate. The client returns the certificate that issued none of the others.
RFC 7030 section 4.2.3 allows only the issued certificate, so such a response is still refused
by default.
Changed
- Go 1.27.3 or newer is required. It fixes GO-2026-6809 in
crypto/x509, which the server
reaches when it verifies client certificates.
v1.2.0
The request size limit can be raised for CSRs of large post-quantum keys. The host can check the
client certificate of a renewal itself and choose whether the server sends HSTS. The server router
moves to chi v5. The client no longer panics on a truncated error response.
Added
ServerConfig.MaxRequestBodysets the request size limit in bytes. Larger requests get 413.
The default stays 64 KiB, which refuses CSRs of the largest SLH-DSA keys, such as
SLH-DSA-SHA2-256f at about 67 KB in base64.NewRouterrefuses a negative value.ServerConfig.VerifyClientCertificatechecks the TLS client certificate of a
/simplereenrollrequest in place of the built-in check against the/cacertscertificates.
It renews certificates thatcrypto/x509cannot verify, such as those an SLH-DSA or composite
ML-DSA CA signed. The TLS listener must then request the certificate without verifying it, for
example withtls.RequestClientCert. Without the hook, renewal behaves as before.ServerConfig.OmitStrictTransportSecurityleaves theStrict-Transport-Securityheader out
of responses, so the host can send its own value or none. By default the server still sends
max-age=31536000.
Changed
- chi v5. The server router uses
github.com/go-chi/chi/v5v5.5.0 instead of chi v4.1.2.
govulncheck flags v4 for an open-redirect advisory that has no v4 fix, although this module
never called the affected middleware. A 405 response now lists the supported methods in an
Allowheader. Proxy address headers work as before.True-Client-IPis ignored. estclient -versionandestserver -versionreport 1.2.0.
Fixed
- Truncated error responses. When the body of an error response ends early, client calls
return anest.Errorwith the HTTP status andRetry-Aftervalue instead of a bare read
error.CSRAttrsno longer panics in that case. estclientTPM handles. Apersistent_handleorstorage_handlethat does not fit in 32
bits is refused. It was truncated to a different handle before.estserverrequest headers must arrive within 30 seconds, as on the TLS-SRP port. A client
that never finishes its headers no longer holds a connection open.
v1.1.0
First release of go-pki-est, a separately maintained fork of globalsign/est v1.0.7 under a new
module path. Its version numbers continue from v1.0.7. It adds TLS-SRP logins, password renewal,
ML-DSA support and hooks for host authentication. It fixes client timeouts, password sign-in from
libest and Bouncy Castle and several server and command line defects.
Added
- ML-DSA keys and certificates work for enrollment, renewal and
/serverkeygen, in the
library and inestclient. Renewal with an ML-DSA client certificate needs TLS 1.3. - Password renewal. With
ServerConfig.PasswordRenewal,/simplereenrollaccepts a password
instead of a client certificate, for certificates that cannot be used in TLS, such as composite
ML-DSA. It is off by default and needsCheckBasicAuth. - TLS-SRP logins.
WithSRPUsernamepasses the username of a TLS-SRP connection to
CheckBasicAuthand the CA./simplereenrollaccepts such a request without a client
certificate. Theestserversettingtls_srpserves a second port from an OpenSSL srpvfile. - Host authentication.
CheckBasicAuthruns for every enrollment request, also without a
password, so a host can accept a client certificate instead. It can answer 403 or 429 with
Retry-After. ServerConfighooks.CheckCSRSignatureverifies algorithmscrypto/x509cannot.
Refusalsreports requests refused before they reach the CA.OmitTransferEncodingdrops the
Content-Transfer-Encodingheader.
Changed
- Module path is
github.com/misiektoja/go-pki-est. The package name staysest. Go 1.27.2
or newer is required. - Proxy address headers
X-Real-IPandX-Forwarded-Forare ignored unless
ServerConfig.TrustProxyHeadersor theestserversettingtrust_proxy_headersis true.
Enable it only behind a proxy that overwrites both headers. User-AgentandServerheaders name go-pki-est instead of GlobalSign.estclient serverkeygen -keyoutmakes an existing key file private to its owner on Unix
before writing.
Fixed
- Client timeouts cover the TLS handshake.
- Proof of possession over TLS 1.2. The
tls-uniquechallenge password matches RFC 7030
section 3.5. - libest and Bouncy Castle can sign in with a password. The 401 challenge is sent as
WWW-Authenticatewithout a body. - Server responses. A panic answers 500, a malformed request 400, an oversized body 413 and
reenrollment over plain HTTP 403. Base64 bodies may contain spaces and tabs, as RFC 8951
allows. - Reenrollment trust no longer falls back to the operating system's root store.
/serverkeygenreturns keys thatcrypto/x509cannot parse, such as ML-KEM. It ignores the
request's signature, as RFC 7030 section 4.4.1 asks.estclientandestserver.-flag=falseworks. TPM key paths resolve against the
configuration file.estserverexits when it cannot listen.