You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Jonathan Gallimore (JIRA)" <ji...@apache.org> on 2018/01/10 13:09:00 UTC
[jira] [Commented] (TOMEE-2161) TomEE-embedded: Attribute
"keystoreFile" is not set correctly in Container startup
[ https://issues.apache.org/jira/browse/TOMEE-2161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16320200#comment-16320200 ]
Jonathan Gallimore commented on TOMEE-2161:
-------------------------------------------
Hi
Thanks for opening this ticket. I'm happy to make the change, or alternatively, did you want to have a go and attach a patch to this ticket? This will need a test adding for it, but probably doesn't require anything else to be changed.
Cheers
Jon
> 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
> Assignee: Jonathan Gallimore
>
> 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)