cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-9632) Upgrade bountycastle to 1.55+
Date Wed, 30 Nov 2016 22:37:59 GMT

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-9632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15710052#comment-15710052
] 

ASF GitHub Bot commented on CLOUDSTACK-9632:
--------------------------------------------

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

    https://github.com/apache/cloudstack/pull/1799#discussion_r90315376
  
    --- 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 --
    
    Why are we catching all checked and unchecked exceptions here?  Wrapping unchecked exceptions
in `CloudRuntimeException` seems to add a layer indirection without adding value.


> Upgrade bountycastle to 1.55+
> -----------------------------
>
>                 Key: CLOUDSTACK-9632
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9632
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>            Reporter: Rohit Yadav
>            Assignee: Rohit Yadav
>             Fix For: Future, 4.10.0.0
>
>
> Upgrade bountycastle library to latest versions.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message