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 |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
I removed the check for the existence of keystore_path |
Beta Was this translation helpful? Give feedback.
-
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_path
and notkeystore_path
Beta Was this translation helpful? Give feedback.
All reactions