Skip to content

Throw if SSLParameters contains settings that are not supported by Re… - #6439

Closed
normanmaurer wants to merge 1 commit into
4.1from
throw_unsupported_params
Closed

normanmaurer wants to merge 1 commit into
4.1from
throw_unsupported_params

Conversation

@normanmaurer

Copy link
Copy Markdown
Member

…ferenceCountedOpenSslEngine

Motivation:

We not support all SSLParameters settings so we should better throw if a user try to use them.

Modifications:

  • Check for unsupported parameters
  • Add unit test

Result:

Less surprising behavior.

@normanmaurer

Copy link
Copy Markdown
Member Author

@nmittler you may want to do the same in conscrypt

@normanmaurer normanmaurer added this to the 4.0.45.Final milestone Feb 23, 2017

@trustin trustin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a few nits

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about append a dot(.) since this is a sentence?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about joining with the previous line?

…ferenceCountedOpenSslEngine

Motivation:

We not support all SSLParameters settings so we should better throw if a user try to use them.

Modifications:

- Check for unsupported parameters
- Add unit test

Result:

Less surprising behavior.
@normanmaurer
normanmaurer force-pushed the throw_unsupported_params branch from aa900de to d5d0424 Compare February 23, 2017 09:34
if (version >= 8) {
Collection<SNIMatcher> matchers = sslParameters.getSNIMatchers();
if (matchers != null && !matchers.isEmpty()) {
throw new IllegalArgumentException("SNIMatchers are not supported.");

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Scottmitch FYI we can easily support SNIMatchers tho with a few changes in netty-tcnative. But I would like to fix this after this is pulled in as this needs more testing etc.

@normanmaurer normanmaurer self-assigned this Feb 23, 2017
@normanmaurer

Copy link
Copy Markdown
Member Author

Cherry-picked into 4.1 (325cc84) and 4.0 (127f6e9)

@normanmaurer
normanmaurer deleted the throw_unsupported_params branch February 23, 2017 19:02
@nmittler

Copy link
Copy Markdown
Member

@normanmaurer added it to the list in google/conscrypt#31. Thanks!

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.

4 participants