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_r258095744
##########
File path:
gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/DefaultKeystoreService.java
##########
@@ -307,22 +283,15 @@ public Key getSigningKey(String alias, char[]
passphrase) throws KeystoreService
@Override
public Key getSigningKey(String keystoreName, String alias, char[]
passphrase) throws KeystoreServiceException {
- Key key = null;
readLock.lock();
try {
- KeyStore ks = getSigningKeystore(keystoreName);
- 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:
Do we need nested try blocks here?
----------------------------------------------------------------
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