Skip to content

Commit

Permalink
Fix for TC Issue 2478 - log the bad cert import and keep moving
Browse files Browse the repository at this point in the history
  • Loading branch information
dewrich authored and elsloo committed Jun 28, 2018
1 parent 99d9bab commit 87343a1
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,14 @@ private static class CertificateRegistryHolder {
public void importCertificateDataList(final List<CertificateData> certificateDataList) {
final Map<String, HandshakeData> map = new HashMap<>();
for (final CertificateData certificateData : certificateDataList) {
final HandshakeData handshakeData = certificateDataConverter.toHandshakeData(certificateData);
final String alias = handshakeData.getHostname().replaceFirst("\\*\\.", "");
log.warn("Imported handshake data with alias " + alias);
map.put(alias, handshakeData);
try {
final HandshakeData handshakeData = certificateDataConverter.toHandshakeData(certificateData);
final String alias = handshakeData.getHostname().replaceFirst("\\*\\.", "");
log.warn("Imported handshake data with alias " + alias);
map.put(alias, handshakeData);
} catch (Exception e) {
log.error("Failed to import certificate data for delivery service: '" + certificateData.getDeliveryservice() + "', hostname: '" + certificateData.getHostname() + "'");
}
}

handshakeDataMap = map;
Expand Down

0 comments on commit 87343a1

Please sign in to comment.