smolnar82 commented on a change in pull request #56: KNOX-1756 - Knox Gateway
TLS Keystore and Alias Should be Configurable
URL: https://github.com/apache/knox/pull/56#discussion_r258814865
##########
File path:
gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/DefaultKeystoreService.java
##########
@@ -300,6 +310,27 @@ public Key getKeyForGateway(String alias, char[]
passphrase) throws KeystoreServ
}
}
+ @Override
+ public Key getKeyForGateway(char[] passphrase) throws
KeystoreServiceException {
+ return getKeyForGateway(config.getIdentityKeyAlias(), passphrase);
+ }
+
+ @Override
+ public Certificate getCertificateForGateway() throws
KeystoreServiceException, KeyStoreException {
+ Certificate cert = null;
+ readLock.lock();
Review comment:
Just a minor note: `getKeystoreForGateway` already applies read lock; do we
need to lock here? I mean the only critical step here is to fetch the `ks`
instance which is already guarded by the `readLock`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services