You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by el...@apache.org on 2018/06/28 15:22:21 UTC
[trafficcontrol] branch master updated: Fix for TC Issue 2478 - log
the bad cert import and keep moving
This is an automated email from the ASF dual-hosted git repository.
elsloo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
The following commit(s) were added to refs/heads/master by this push:
new 87343a1 Fix for TC Issue 2478 - log the bad cert import and keep moving
87343a1 is described below
commit 87343a1e412a86771d398ed0d0e12c0a309a7955
Author: Dewayne Richardson <de...@apache.org>
AuthorDate: Wed Jun 27 15:56:07 2018 -0600
Fix for TC Issue 2478 - log the bad cert import and keep moving
---
.../traffic_router/secure/CertificateRegistry.java | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/traffic_router/connector/src/main/java/com/comcast/cdn/traffic_control/traffic_router/secure/CertificateRegistry.java b/traffic_router/connector/src/main/java/com/comcast/cdn/traffic_control/traffic_router/secure/CertificateRegistry.java
index 298d28a..2ad671f 100644
--- a/traffic_router/connector/src/main/java/com/comcast/cdn/traffic_control/traffic_router/secure/CertificateRegistry.java
+++ b/traffic_router/connector/src/main/java/com/comcast/cdn/traffic_control/traffic_router/secure/CertificateRegistry.java
@@ -53,10 +53,14 @@ public class CertificateRegistry {
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;