risdenk commented on a change in pull request #54: [WIP] KNOX-1756 - Knox 
Gateway TLS Keystore and Alias Should be Configurable
URL: https://github.com/apache/knox/pull/54#discussion_r258097404
 
 

 ##########
 File path: 
gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/DefaultKeystoreService.java
 ##########
 @@ -278,22 +262,14 @@ public boolean isKeystoreForGatewayAvailable() throws 
KeystoreServiceException {
 
   @Override
   public Key getKeyForGateway(String alias, char[] passphrase) throws 
KeystoreServiceException {
-    Key key = null;
     readLock.lock();
     try {
-      KeyStore ks = getKeystoreForGateway();
-      if (passphrase == null) {
-        passphrase = masterService.getMasterSecret();
-        LOG.assumingKeyPassphraseIsMaster();
-      }
-      if (ks != null) {
-        try {
-          key = ks.getKey(alias, passphrase);
-        } catch (UnrecoverableKeyException | NoSuchAlgorithmException | 
KeyStoreException e) {
-          LOG.failedToGetKeyForGateway( alias, e );
-        }
+      try {
 
 Review comment:
   nested try/catch block not needed

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to