You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by rhtyd <gi...@git.apache.org> on 2016/09/28 09:44:45 UTC

[GitHub] cloudstack pull request #1511: [master] bountycastle changes

Github user rhtyd commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1511#discussion_r80878187
  
    --- Diff: server/src/org/apache/cloudstack/network/lb/CertServiceImpl.java ---
    @@ -111,37 +116,37 @@ public CertServiceImpl() {
         @DB
         @Override
         @ActionEvent(eventType = EventTypes.EVENT_LB_CERT_UPLOAD, eventDescription = "Uploading a certificate to cloudstack", async = false)
    -    public SslCertResponse uploadSslCert(UploadSslCertCmd certCmd) {
    +    public SslCertResponse uploadSslCert(final UploadSslCertCmd certCmd) {
             try {
    -            String cert = certCmd.getCert();
    -            String key = certCmd.getKey();
    -            String password = certCmd.getPassword();
    -            String chain = certCmd.getChain();
    +            final String cert = certCmd.getCert();
    +            final String key = certCmd.getKey();
    +            final String password = certCmd.getPassword();
    +            final String chain = certCmd.getChain();
     
                 validate(cert, key, password, chain);
                 s_logger.debug("Certificate Validation succeeded");
     
    -            String fingerPrint = generateFingerPrint(parseCertificate(cert));
    +            final String fingerPrint = generateFingerPrint(parseCertificate(cert));
     
    -            CallContext ctx = CallContext.current();
    -            Account caller = ctx.getCallingAccount();
    +            final CallContext ctx = CallContext.current();
    +            final Account caller = ctx.getCallingAccount();
     
                 Account owner = null;
    -            if ((certCmd.getAccountName() != null && certCmd.getDomainId() != null) || certCmd.getProjectId() != null) {
    +            if (certCmd.getAccountName() != null && certCmd.getDomainId() != null || certCmd.getProjectId() != null) {
                     owner = _accountMgr.finalizeOwner(caller, certCmd.getAccountName(), certCmd.getDomainId(), certCmd.getProjectId());
                 } else {
                     owner = caller;
                 }
     
    -            Long accountId = owner.getId();
    -            Long domainId = owner.getDomainId();
    +            final Long accountId = owner.getId();
    +            final Long domainId = owner.getDomainId();
     
    -            SslCertVO certVO = new SslCertVO(cert, key, password, chain, accountId, domainId, fingerPrint);
    +            final SslCertVO certVO = new SslCertVO(cert, key, password, chain, accountId, domainId, fingerPrint);
                 _sslCertDao.persist(certVO);
     
                 return createCertResponse(certVO, null);
     
    -        } catch (Exception e) {
    +        } catch (final Exception e) {
    --- End diff --
    
    I'm not sure, the PR changes are around fixing CloudStack to work with the newer bountycastle dependency and not codebase wide issuse.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---