You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Lars Fessen (JIRA)" <ji...@apache.org> on 2018/01/09 14:24:00 UTC
[jira] [Created] (TOMEE-2161) TomEE-embedded: Attribute
"keystoreFile" is not set correctly in Container startup
Lars Fessen created TOMEE-2161:
----------------------------------
Summary: TomEE-embedded: Attribute "keystoreFile" is not set correctly in Container startup
Key: TOMEE-2161
URL: https://issues.apache.org/jira/browse/TOMEE-2161
Project: TomEE
Issue Type: Bug
Affects Versions: 7.0.5
Reporter: Lars Fessen
When using the Tomee-embedded Container and trying to use HTTPs the "keystoreFile"-attribute is not set correctly. (We are using tomee-embedded 7.0.0 but the github master has still the same bug)
*How I use the container:*
{code:java}
Configuration cfg = new Configuration();
cfg.setSsl(true);
cfg.setKeystoreFile("my/path/to/keystore/keystore.p12");
cfg.setKeystoreType("PKCS12");
cfg.setKeystorePass("changeit");
cfg.setSslProtocol("TLS");
cfg.setKeyAlias("alias");
cfg.setSkipHttp(true);
cfg.setHttpsPort(config.getPort());
org.apache.tomee.embedded.Container container;
container = new Container();
container.setup(cfg);
container.start();
{code}
*Where is the bug in Tomee-embedded:*
https://github.com/apache/tomee/blob/master/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Container.java
Line: 632
{code:java}
if (configuration.getKeystoreFile() != null) {
httpsConnector.setAttribute("", configuration.getKeystoreFile());
}
{code}
*What is the solution (in my opinion):*
{code:java}
if (configuration.getKeystoreFile() != null) {
httpsConnector.setAttribute("keystoreFile", configuration.getKeystoreFile());
}
{code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)