< prev index next >

src/java.base/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 23,44 **** * questions. */ package sun.security.ssl; - import java.util.*; import java.io.*; import java.security.*; import java.security.cert.*; import javax.net.ssl.*; - - import sun.security.validator.Validator; import sun.security.validator.TrustStoreUtil; abstract class TrustManagerFactoryImpl extends TrustManagerFactorySpi { - private static final Debug debug = Debug.getInstance("ssl"); private X509TrustManager trustManager = null; private boolean isInitialized = false; TrustManagerFactoryImpl() { // empty --- 23,42 ---- * questions. */ package sun.security.ssl; import java.io.*; import java.security.*; import java.security.cert.*; + import java.util.*; import javax.net.ssl.*; import sun.security.validator.TrustStoreUtil; + import sun.security.validator.Validator; abstract class TrustManagerFactoryImpl extends TrustManagerFactorySpi { private X509TrustManager trustManager = null; private boolean isInitialized = false; TrustManagerFactoryImpl() { // empty
*** 49,78 **** if (ks == null) { try { trustManager = getInstance(TrustStoreManager.getTrustedCerts()); } catch (SecurityException se) { // eat security exceptions but report other throwables ! if (debug != null && Debug.isOn("trustmanager")) { ! System.out.println( ! "SunX509: skip default keystore: " + se); } } catch (Error err) { ! if (debug != null && Debug.isOn("trustmanager")) { ! System.out.println( ! "SunX509: skip default keystore: " + err); } throw err; } catch (RuntimeException re) { ! if (debug != null && Debug.isOn("trustmanager")) { ! System.out.println( ! "SunX509: skip default keystore: " + re); } throw re; } catch (Exception e) { ! if (debug != null && Debug.isOn("trustmanager")) { ! System.out.println( ! "SunX509: skip default keystore: " + e); } throw new KeyStoreException( "problem accessing trust store", e); } } else { --- 47,76 ---- if (ks == null) { try { trustManager = getInstance(TrustStoreManager.getTrustedCerts()); } catch (SecurityException se) { // eat security exceptions but report other throwables ! if (SSLLogger.isOn && SSLLogger.isOn("trustmanager")) { ! SSLLogger.fine( ! "SunX509: skip default keystore", se); } } catch (Error err) { ! if (SSLLogger.isOn && SSLLogger.isOn("trustmanager")) { ! SSLLogger.fine( ! "SunX509: skip default keystore", err); } throw err; } catch (RuntimeException re) { ! if (SSLLogger.isOn && SSLLogger.isOn("trustmanager")) { ! SSLLogger.fine( ! "SunX509: skip default keystor", re); } throw re; } catch (Exception e) { ! if (SSLLogger.isOn && SSLLogger.isOn("trustmanager")) { ! SSLLogger.fine( ! "SunX509: skip default keystore", e); } throw new KeyStoreException( "problem accessing trust store", e); } } else {
< prev index next >