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

Spring boot does not allow for Absolute paths for server.ssl.key-store when using tomcat 7 #5377

Closed
lsamayoa opened this issue Mar 9, 2016 · 5 comments
Labels
status: invalid An issue that we don't feel is valid

Comments

@lsamayoa
Copy link

lsamayoa commented Mar 9, 2016

Spring boot does not allow to use absolute paths for ssl certificates because the AbstractEndpoint.setKeyStoreFile inside tomcat does a relative path adjustment and since we never send the raw path, it will always do the adjustment (we send the url of the file so it will always begin with the protocol, file: in my case because of this line).
This is because of this specific line, where we turn the filepath given into a url Bug Line.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 9, 2016
@lsamayoa lsamayoa changed the title Spring boot does not allow for Absolute paths for server.ssl.key-store when using tomcat Spring boot does not allow for Absolute paths for server.ssl.key-store when using tomcat 7 Mar 9, 2016
@lsamayoa
Copy link
Author

lsamayoa commented Mar 9, 2016

This is only true for Tomcat 7.

@wilkinsona
Copy link
Member

What version of Tomcat 7 are you using? I believe you may need 7.0.66 or later.

@wilkinsona wilkinsona added status: waiting-for-feedback We need additional information before we can continue and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 9, 2016
@lsamayoa
Copy link
Author

lsamayoa commented Mar 9, 2016

You are correct. I was using version 7.0.55.
Version 7.0.65 still have that relative path check.
Version 7.0.66 of tomcat does not contain that line.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Mar 9, 2016
@wilkinsona wilkinsona added status: invalid An issue that we don't feel is valid and removed status: feedback-provided Feedback has been provided labels Mar 10, 2016
@rvijaykumar
Copy link

Could anyone suggest, am getting the similar issue with Tomcat.

SEVERE: Failed to load keystore type JKS with path /tmp/tomcat.5161001577291191019.9091/file:/tmp/tmp.Qjqu0t4Sof/key.p12 due to /tmp/tomcat.5161001577291191019.9091/file:/tmp/tmp.Qjqu0t4Sof/key.p12 (No such file or directory)

The boot strap script set a temp location for the key.p12 file at /tmp/tmp.Qjqu0t4Sof/key.p12. But for some reason tomcat is looking here /tmp/tomcat.5161001577291191019.9091/file:/tmp/tmp.Qjqu0t4Sof/key.p12

Am using <tomcat.version>8.0.33</tomcat.version> with Spring boot 1.3.5

It fails only during Resource lookup. If i use the FileInputStream it works fine.

@snicoll
Copy link
Member

snicoll commented Jan 2, 2018

@rvijaykumar this issue is closed and we don't use the tracker for questions. Please ask them on StackOverflow or join us on Gitter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

5 participants