Yair Zaslavsky has uploaded a new change for review. Change subject: core: Store only single certificate ......................................................................
core: Store only single certificate Change-Id: Ic9bd8cd7f913cf23eca839452b6e113f749966f7 Signed-off-by: Yair Zaslavsky <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/provider/ImportProviderCertificateChainCommand.java 1 file changed, 3 insertions(+), 8 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/17/33717/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/provider/ImportProviderCertificateChainCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/provider/ImportProviderCertificateChainCommand.java index 80a99b1..d664999 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/provider/ImportProviderCertificateChainCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/provider/ImportProviderCertificateChainCommand.java @@ -65,15 +65,10 @@ } try { - // In case there is only one certificate, we insert it. - // Otherwise, we need to insert the entire chain except the end certificate (the end certificate here is the first one) - int firstCertificateIndex = chain.size() == 1 ? 0 : 1; - for (int certIndex = firstCertificateIndex; certIndex < chain.size(); ++certIndex) { - Certificate certificate = chain.get(certIndex); - String alias = Guid.newGuid().toString(); - ks.setCertificateEntry(alias, certificate); - } + Certificate certificate = chain.get(chain.size() - 1); + String alias = Guid.newGuid().toString(); + ks.setCertificateEntry(alias, certificate); ExternalTrustStoreInitializer.setTrustStore(ks); setSucceeded(true); } catch (Throwable e) { -- To view, visit http://gerrit.ovirt.org/33717 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic9bd8cd7f913cf23eca839452b6e113f749966f7 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yair Zaslavsky <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
