Files
floci/src/main/java/io/github/hectorvent
Alex Banna a4356f25fb fix(tls): reuse the persisted self-signed certificate across restarts (#1799)
TlsConfigSource is a MicroProfile ConfigSource, so it runs before CDI
startup and before quarkus-security registers its runtime security
providers. BouncyCastle was therefore not yet registered when the source
checked whether the persisted certificate could be reused. isSelfSigned()
calls CertificateGenerator.parseCertificate(), which failed with
"no such provider: BC", so isSelfSigned() returned false and the
self-signed certificate was needlessly regenerated on every restart.

Register BouncyCastle at the top of the constructor (before any
certificate parsing) by hoisting the existing inline registration in
generateSelfSignedCert() into a shared ensureBouncyCastleRegistered()
helper. The reuse check now parses the existing certificate successfully
and keeps it across restarts.
2026-07-29 21:47:15 -05:00
..