Skip to content

[fix] select EC and EdDSA credentials with BC-JSSE (#383) - #391

Closed
kares wants to merge 4 commits into
masterfrom
ssl-buffer-eof
Closed

kares wants to merge 4 commits into
masterfrom
ssl-buffer-eof

Conversation

@kares

@kares kares commented Oct 23, 2026

Copy link
Copy Markdown
Member

Since 0.19 we prefer BC-JSSE, but our own key manager only matched a plain key type like EC. BC asks for ECDHE_ECDSA or EC/secp256r1 -> EC and Ed25519 servers failed every handshake once a TLS version was set (in FIPS mode we always failed).

Instead of teaching chooseAlias every spelling, this drops the custom key manager. Credentials instead go into a small in-memory KeyStore, and the provider's own PKIX key manager picks one.

Keys are passed through as they are - opaque (FIPS) keys are never re-encoded.

  • move test_credential.rb

kares added 2 commits October 23, 2026 13:59
defer TLS closure validation until decrypted plaintext is drained,
so framed responses can be consumed before a missing close_notify
def check_support(key_type, version)
sunjsse = jruby? && java.lang.System.getProperty('jruby.openssl.provider.ssl') == 'false'
java_version = self.class.java_version.last.to_i if jruby?
skip 'SunJSSE requires Java 11 for TLS 1.3' if sunjsse && version == 'TLSv1_3' && java_version < 11
skip 'SunJSSE requires Java 11 for TLS 1.3' if sunjsse && version == 'TLSv1_3' && java_version < 11
if key_type == 'ed25519'
omit_on_fips
skip 'SunJSSE requires Java 15 for Ed25519' if sunjsse && java_version < 15
@kares kares closed this Oct 24, 2026
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.

TLS server with an EC key fails on 0.19.x (chooseAlias doesn't match BCJSSE key types)

1 participant