if ( _chain != null )
validateChain(chain, cert);
}
public SslCertResponse createCertResponse(SslCertVO cert, List<LoadBalancerCertMapVO> lbCertMap) {
SslCertResponse response = new SslCertResponse();
Account account = _accountDao.findByIdIncludingRemoved(cert.getAccountId());
response.setObjectName("sslcert");
response.setId(cert.getUuid());
response.setCertificate(cert.getCertificate());
response.setPrivatekey(cert.getKey());
response.setFingerprint(cert.getFingerPrint());
response.setAccountName(account.getAccountName());
if ( cert.getChain() != null)
response.setCertchain(cert.getChain());
if ( lbCertMap != null && !lbCertMap.isEmpty()){
List<String> lbIds = new ArrayList<String>();
for ( LoadBalancerCertMapVO mapVO : lbCertMap ) {
LoadBalancer lb = _entityMgr.findById(LoadBalancerVO.class, mapVO.getLbId());
lbIds.add(lb.getUuid());
}
response.setLbIds(lbIds);
}
return response;
}