Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for SSLEngine.setWant/NeedClientAuth() and choosing key alias chooseEngineClient/ServerAlias() #172

Merged
merged 2 commits into from
Feb 15, 2024

Conversation

cconlon
Copy link
Member

@cconlon cconlon commented Jan 30, 2024

This PR makes fixes around how a server-side SSLEngine handles client authentication, as well as how wolfJSSE calls X509KeyManager/X509ExtendedKeyManager objects to choose a private key alias to be used to load the client/server private key:

  • WolfSSLEngine setWantClientAuth(true) was previously too restrictive when setNeedClientAuth(false). This meant that when a server application requested client authentication, but instructed the JSSE layer to not to be a failure if the client did not send a certificate (ie with setWantClientAuth(true), we were requiring the client send a certificate and would error out. This PR loosens that requirement to match expected behavior with setWantClientAuth().
  • We recently added support for X509ExtendedKeyManager, which has two new methods for selecting the key alias to be used for loading the client/server private key (chooseEngineClientAlias(), chooseEngineServerAlias()). This PR finishes that support by calling the correct alias selector method where appropriate. Since some of these methods accept a Socket or SSLEngine as parameter, loading of the private key has been delayed from SSLContext creation later to when the SSLSocket or SSLEngine is created.

ZD 17248

@cconlon
Copy link
Member Author

cconlon commented Feb 14, 2024

Rebased on top of master, so new GitHub actions are run on this.

@JacobBarthelmeh JacobBarthelmeh merged commit ecd67a4 into wolfSSL:master Feb 15, 2024
36 checks passed
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.

2 participants