Replies: 3 comments
|
OK. I think a simple fix would be to check for an absolute path, then - if not found - a relative path. I think I even have code to do that in |
0 replies
|
|
0 replies
|
I removed the check for the existence of keystore_path |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi,
in JGroups 5.3.10.Final, TLS#init() has this check (line 123ff):
However, this check fails for relative paths. If I just store my keystore under src/main/resources/keystore.jks and I set keystore_path to "keystore.jks", the check will fail.
The code in
SslContextFactory.java#loadKeyStore()handles the file loading correctly, but it does not fail if the key store is not found at all, it just creates a new key store then.Since the file existence check only works for
keystore_path, which is obsolete anyway, I'm not sure what the expected behavior is, so I did not create a PR.My suggestion:
SslContextFactory.java#loadKeyStore()to throw an exception if the InputStream forKeyStore#load()is null and remove the file check fromTLS#init()- this might break existing implementations though, maybe you want to have the key store optional for some other use casesTLS#init()to mimic the file handling ofSslContextFactory#loadKeyStore()- this should then validate the fieldtruststore_pathand notkeystore_pathAll reactions