Skip to content

feat: HTTPS support#91

Merged
thced merged 15 commits into
masterfrom
feat/https-support
May 21, 2026
Merged

feat: HTTPS support#91
thced merged 15 commits into
masterfrom
feat/https-support

Conversation

@thced

@thced thced commented May 21, 2026

Copy link
Copy Markdown
Contributor

No description provided.

thced added 15 commits May 21, 2026 09:20
Adds a 1024-bit RSA fixture and PemSslContextTest case that exercises
the minimum-strength guard, lifting new-code coverage on PR 91 above
the 80% Sonar gate. Splits the nested ternary in OpenApiServer.Builder
into a resolvePort() helper to clear the matching SonarLint finding.
Extracts the nested try in decodeCertificateChain into a helper,
chains the RSA InvalidKeySpecException as suppressed when the EC
fallback also fails, drops the unused PrivateKey parameter on
requireMinimumStrength, names the 2048/256-bit floors and the
8-byte signature probe as constants, and removes redundant
`throws Exception` declarations on tests that don't throw.
Reorders the strength check before the signature check so a sub-spec
EC key fails fast on bit count (192 < 256) instead of tripping the
matching-signature probe. Adds P-192 EC and DSA fixtures, plus tests
covering the weak EC throw, the "Unsupported TLS private key
algorithm" branch (DSA key with RSA cert), and the "Unsupported TLS
public key algorithm" branch (DSA cert with RSA key). Simplifies the
algorithm switch in verifyKeyMatchesCert now that decodePrivateKey
guarantees RSA or EC keys.

Lifts PemSslContext line coverage from ~77% to 86%. Remaining
uncovered lines are defensive GeneralSecurityException / IOException
catches around JDK crypto APIs that do not throw for valid inputs.
@sonarqubecloud

Copy link
Copy Markdown

@thced thced merged commit 932d7a4 into master May 21, 2026
5 checks passed
@thced thced deleted the feat/https-support branch May 21, 2026 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant