class X509TrustManagerWrapper implements X509TrustManager {

    @Override
    public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
        try {
            trustManager.checkServerTrusted(chain, authType);
        } catch (RuntimeException e) {
            throw new CertificateException("Unexpected error", e);
        }
    }

    public  X509TrustManagerWrapper(final X509TrustManager trustManager);

}