Class ApnsService.SSLTrustManager

  • All Implemented Interfaces:
    javax.net.ssl.TrustManager, javax.net.ssl.X509TrustManager
    Enclosing class:
    ApnsService

    public static class ApnsService.SSLTrustManager
    extends java.lang.Object
    implements javax.net.ssl.X509TrustManager
    • Constructor Detail

      • SSLTrustManager

        public SSLTrustManager​(javax.net.ssl.TrustManager[] trustManagers)
    • Method Detail

      • checkClientTrusted

        public void checkClientTrusted​(java.security.cert.X509Certificate[] chain,
                                       java.lang.String authType)
                                throws java.security.cert.CertificateException
        Specified by:
        checkClientTrusted in interface javax.net.ssl.X509TrustManager
        Throws:
        java.security.cert.CertificateException
      • checkServerTrusted

        public void checkServerTrusted​(java.security.cert.X509Certificate[] chain,
                                       java.lang.String authType)
                                throws java.security.cert.CertificateException
        Specified by:
        checkServerTrusted in interface javax.net.ssl.X509TrustManager
        Throws:
        java.security.cert.CertificateException
      • getAcceptedIssuers

        public java.security.cert.X509Certificate[] getAcceptedIssuers()
        Specified by:
        getAcceptedIssuers in interface javax.net.ssl.X509TrustManager
      • checkCertificateChainFingerprint

        protected boolean checkCertificateChainFingerprint​(java.security.cert.X509Certificate[] chain)
      • checkCerificateFingerprint

        protected boolean checkCerificateFingerprint​(java.security.cert.X509Certificate certificate)
                                              throws java.security.NoSuchAlgorithmException,
                                                     java.security.cert.CertificateEncodingException
        Throws:
        java.security.NoSuchAlgorithmException
        java.security.cert.CertificateEncodingException
      • hexDecode

        public static byte[] hexDecode​(java.lang.String hex)
      • sha256

        public static byte[] sha256​(byte[] data)
                             throws java.security.NoSuchAlgorithmException
        Throws:
        java.security.NoSuchAlgorithmException