Sandor Molnar created KNOX-1856:
-----------------------------------
Summary: Incorrect error message in case there is no
'gateway-identity' certificate in the configured keystore
Key: KNOX-1856
URL: https://issues.apache.org/jira/browse/KNOX-1856
Project: Apache Knox
Issue Type: Improvement
Affects Versions: 1.2.0
Reporter: Sandor Molnar
See the following {{if-else}} branch within
{{org.apache.knox.gateway.services.security.impl.JettySSLService.logAndValidateCertificate(GatewayConfig)}}
:
{code}
if (cert != null) {
if (cert instanceof X509Certificate) {
...
} else {
throw new ServiceLifecycleException("Public certificate for the gateway
cannot be found with the alias gateway-identity. Plase check the identity
certificate alias.");
}
} else {
throw new ServiceLifecycleException("Public certificate for the gateway
is not of the expected type of X509Certificate. Something is wrong with the
gateway keystore.");
}
{code}
As you can see the actions within the {{'else'}} branches are swapped:
- in case the {{cert}} is null we should indicate that it's not found
- in case the {{cert}} is not an {{X509Certificate}} we should say that
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)