Alon Bar-Lev has posted comments on this change. Change subject: engine: Import single certificate ......................................................................
Patch Set 2: (4 comments) looks good, just minor comments. http://gerrit.ovirt.org/#/c/35485/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetProviderCertificateQuery.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetProviderCertificateQuery.java: Line 28: ProviderProxy proxy = ProviderProxyFactory.getInstance().create(provider); Line 29: List<? extends Certificate> chain = proxy.getCertificateChain(); Line 30: if (!chain.isEmpty()) { Line 31: try { Line 32: getQueryReturnValue().setReturnValue(new Base64().encodeToString(chain.get(chain.size() - 1) can we have here a class instead of single string, so I will be able to later add more strings? Line 33: .getEncoded())); Line 34: } catch (CertificateEncodingException e) { Line 35: getQueryReturnValue().setSucceeded(false); Line 36: log.error("Error in encoding certificate. Error is {} " + e.getMessage()); http://gerrit.ovirt.org/#/c/35485/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/provider/ExternalTrustStoreInitializer.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/provider/ExternalTrustStoreInitializer.java: Line 49: throw new RuntimeException(e); Line 50: } Line 51: } Line 52: Line 53: @Deprecated I do not understand how it can be depreciated if we should not use it. Line 54: public static void addCertificateChain(List<? extends Certificate> chain) throws CertificateEncodingException, Line 55: KeyStoreException { Line 56: KeyStore ks = getTrustStore(); Line 57: Certificate certificate = chain.get(chain.size() - 1); http://gerrit.ovirt.org/#/c/35485/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/provider/ImportProviderCetificateCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/provider/ImportProviderCetificateCommand.java: Line 69: // Currently it requires what's required for adding a new Provider Line 70: // Need to revisit that when designing the permission scheme for providers Line 71: return Collections.singletonList(new PermissionSubject(Guid.SYSTEM, Line 72: VdcObjectType.System, Line 73: ActionGroup.CREATE_STORAGE_POOL)); storage? Line 74: } Line 75: Line 76: private void saveCertificateToTrustStore(final Certificate cert) { Line 77: if (cert != null) { Line 99: private void handleException(Throwable e) { Line 100: throw new VdcBLLException(VdcBllErrors.PROVIDER_IMPORT_CERTIFICATE_CHAIN_ERROR, e.getMessage()); Line 101: } Line 102: Line 103: private static final Logger log = LoggerFactory.getLogger(ImportProviderCetificateCommand.class); on top please -- To view, visit http://gerrit.ovirt.org/35485 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic9adb21ded6e6d9fb09fc68331872c1cd88f88a9 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches