Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362626 - IllegalStateException thrown when SslContextFactory preconfigured with SSLContext
Summary: IllegalStateException thrown when SslContextFactory preconfigured with SSLCon...
Status: RESOLVED FIXED
Alias: None
Product: Jetty
Classification: RT
Component: server (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 7.5.x   Edit
Assignee: Jan Bartel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-02 01:19 EDT by Matthew Long CLA
Modified: 2011-11-20 20:31 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Long CLA 2011-11-02 01:19:56 EDT
Build Identifier: 8.0.4.v20111024

I am attempting to set a preconfigured SSLContext on an SslContextFactory to be used when creating SslSelectChannelConnectors.
The doStart method of the SslContextFactory has no behaviour when the factory has had the SSLContext set. This is expected.
However when a created SslSelectChannelConnector (or SslSocketConnector) is started, the SslContextFactory#checkKeyStore method is invoked, which throws an IllegalStateException because the keystore, keystore input stream and keystore path are all null.
I think that either the checkKeyStore method should not be invoked if the SSLContext is not null or should exit early.

This can be worked around by using the SslContextFactory constructor with the keystore path provided but not pointing at a keystore.

Reproducible: Always

Steps to Reproduce:
1. Use the default constructor of the SslContextFactory
2. set a preconfigured SSLContext on the SslContextFactory
3. Construct an SslSelectChannelConnector with the SslContextFactory
4. Start the connector
Comment 1 Jan Bartel CLA 2011-11-20 20:31:21 EST
Fixed for jetty-7.6.0