| | |
| | | import java.io.InputStream; |
| | | import java.io.PrintWriter; |
| | | import java.io.RandomAccessFile; |
| | | import java.security.GeneralSecurityException; |
| | | import java.util.*; |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | |
| | | import javax.naming.ldap.InitialLdapContext; |
| | | import javax.naming.ldap.LdapName; |
| | | import javax.net.ssl.HostnameVerifier; |
| | | import javax.net.ssl.SSLHandshakeException; |
| | | import javax.net.ssl.TrustManager; |
| | | |
| | | import org.opends.admin.ads.util.ConnectionUtils; |
| | |
| | | */ |
| | | public static boolean isCertificateException(Throwable t) |
| | | { |
| | | boolean returnValue = false; |
| | | |
| | | while (!returnValue && (t != null)) |
| | | { |
| | | returnValue = (t instanceof SSLHandshakeException) || |
| | | (t instanceof GeneralSecurityException); |
| | | t = t.getCause(); |
| | | } |
| | | |
| | | return returnValue; |
| | | return ConnectionUtils.isCertificateException(t); |
| | | } |
| | | |
| | | /** |