smolnar82 commented on code in PR #981:
URL: https://github.com/apache/knox/pull/981#discussion_r1923923518
##########
gateway-service-metadata/src/main/java/org/apache/knox/gateway/service/metadata/KnoxMetadataResource.java:
##########
@@ -169,32 +164,31 @@ private Response
generateFailureFileDownloadResponse(Status status, String error
return responseBuilder.build();
}
- private Certificate getPublicCertificate(GatewayServices gatewayServices,
GatewayConfig config) {
+ private Certificate[] getPublicCertificates() {
try {
- final KeystoreService keystoreService =
gatewayServices.getService(ServiceType.KEYSTORE_SERVICE);
- return
keystoreService.getKeystoreForGateway().getCertificate(config.getIdentityKeyAlias());
- } catch (KeyStoreException | KeystoreServiceException e) {
+ return
X509CertificateUtil.fetchPublicCertsFromServer(request.getRequestURL().toString(),
true, null);
Review Comment:
@pzampino - I didn't find this utility method
(`X509CertificateUtil.fetchPublicCertsFromServer`) on the master branch. I
assume this was accidentally left out of the commit.
I recall I implemented something similar in KnoxShell
[here](https://github.com/apache/knox/blob/master/gateway-shell/src/main/java/org/apache/knox/gateway/shell/KnoxSh.java#L208-L231).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]