hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1650755 - /httpcomponents/httpclient-android/branches/4.3.5-android/src/main/java/org/apache/http/conn/ssl/SSLConnectionSocketFactory.java
Date Sat, 10 Jan 2015 15:37:09 GMT
Author: olegk
Date: Sat Jan 10 15:37:09 2015
New Revision: 1650755

URL: http://svn.apache.org/r1650755
Log:
Conciser debug logging of cert peer and issuer alternative names

Modified:
    httpcomponents/httpclient-android/branches/4.3.5-android/src/main/java/org/apache/http/conn/ssl/SSLConnectionSocketFactory.java

Modified: httpcomponents/httpclient-android/branches/4.3.5-android/src/main/java/org/apache/http/conn/ssl/SSLConnectionSocketFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient-android/branches/4.3.5-android/src/main/java/org/apache/http/conn/ssl/SSLConnectionSocketFactory.java?rev=1650755&r1=1650754&r2=1650755&view=diff
==============================================================================
--- httpcomponents/httpclient-android/branches/4.3.5-android/src/main/java/org/apache/http/conn/ssl/SSLConnectionSocketFactory.java
(original)
+++ httpcomponents/httpclient-android/branches/4.3.5-android/src/main/java/org/apache/http/conn/ssl/SSLConnectionSocketFactory.java
Sat Jan 10 15:37:09 2015
@@ -360,22 +360,26 @@ public class SSLConnectionSocketFactory
                     Log.d(TAG, " peer principal: " + peer.toString());
                     final Collection<List<?>> altNames1 = x509.getSubjectAlternativeNames();
                     if (altNames1 != null) {
+                        final List<String> altNames = new ArrayList<String>();
                         for (final List<?> aC : altNames1) {
                             if (!aC.isEmpty()) {
-                                Log.d(TAG, " peer alternative name: " + aC.get(1));
+                                altNames.add((String) aC.get(1));
                             }
                         }
+                        Log.d(TAG, " peer alternative names: " + altNames);
                     }
 
                     final X500Principal issuer = x509.getIssuerX500Principal();
                     Log.d(TAG, " issuer principal: " + issuer.toString());
                     final Collection<List<?>> altNames2 = x509.getIssuerAlternativeNames();
                     if (altNames2 != null) {
+                        final List<String> altNames = new ArrayList<String>();
                         for (final List<?> aC : altNames2) {
                             if (!aC.isEmpty()) {
-                                Log.d(TAG, " issuer alternative name: " + aC.get(1));
+                                altNames.add((String) aC.get(1));
                             }
                         }
+                        Log.d(TAG, " issuer alternative names: " + altNames);
                     }
                 } catch (Exception ignore) {
                 }



Mime
View raw message