Package tigase.push.apns
Class ApnsService.SSLTrustManager
- java.lang.Object
-
- tigase.push.apns.ApnsService.SSLTrustManager
-
- All Implemented Interfaces:
TrustManager,X509TrustManager
- Enclosing class:
- ApnsService
public static class ApnsService.SSLTrustManager extends Object implements X509TrustManager
-
-
Constructor Summary
Constructors Constructor Description SSLTrustManager(TrustManager[] trustManagers)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancheckCerificateFingerprint(X509Certificate certificate)protected booleancheckCertificateChainFingerprint(X509Certificate[] chain)voidcheckClientTrusted(X509Certificate[] chain, String authType)voidcheckServerTrusted(X509Certificate[] chain, String authType)X509Certificate[]getAcceptedIssuers()static byte[]hexDecode(String hex)static byte[]sha256(byte[] data)
-
-
-
Constructor Detail
-
SSLTrustManager
public SSLTrustManager(TrustManager[] trustManagers)
-
-
Method Detail
-
checkClientTrusted
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException
- Specified by:
checkClientTrustedin interfaceX509TrustManager- Throws:
CertificateException
-
checkServerTrusted
public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException
- Specified by:
checkServerTrustedin interfaceX509TrustManager- Throws:
CertificateException
-
getAcceptedIssuers
public X509Certificate[] getAcceptedIssuers()
- Specified by:
getAcceptedIssuersin interfaceX509TrustManager
-
checkCertificateChainFingerprint
protected boolean checkCertificateChainFingerprint(X509Certificate[] chain)
-
checkCerificateFingerprint
protected boolean checkCerificateFingerprint(X509Certificate certificate) throws NoSuchAlgorithmException, CertificateEncodingException
-
hexDecode
public static byte[] hexDecode(String hex)
-
sha256
public static byte[] sha256(byte[] data) throws NoSuchAlgorithmException- Throws:
NoSuchAlgorithmException
-
-