@Test public void testReadingInternalCertificateWorksAsExpected() throws Exception { X509Certificate certificate = trustProvider.readCertificate(GatewaySSLContextProvider.INTERMEDIATE_CA); String expectedSerialNo = "1372807406"; assertNotNull(certificate); assertEquals(expectedSerialNo, certificate.getSerialNumber().toString()); }
X509Certificate readCertificate(String cert) throws CertificateException { byte[] bytes = cert.getBytes(); InputStream is = new ByteArrayInputStream(bytes); return (X509Certificate) CertificateFactory.getInstance("X.509").generateCertificate(is); }
GatewaySSLContextProvider { X509Certificate readCertificate(String cert) throws CertificateException { byte[] bytes = cert.getBytes(); InputStream is = new ByteArrayInputStream(bytes); return (X509Certificate) CertificateFactory.getInstance("X.509").generateCertificate(is); } }
GatewaySSLContextProvider { X509Certificate readCertificate(String cert) throws CertificateException { byte[] bytes = cert.getBytes(); InputStream is = new ByteArrayInputStream(bytes); return (X509Certificate) CertificateFactory.getInstance("X.509").generateCertificate(is); } GatewaySSLContextProvider(); }
GatewaySSLContextProvider { X509Certificate readCertificate(String cert) throws CertificateException { byte[] bytes = cert.getBytes(); InputStream is = new ByteArrayInputStream(bytes); return (X509Certificate) CertificateFactory.getInstance("X.509").generateCertificate(is); } GatewaySSLContextProvider();  }
GatewaySSLContextProvider { X509Certificate readCertificate(String cert) throws CertificateException { byte[] bytes = cert.getBytes(); InputStream is = new ByteArrayInputStream(bytes); return (X509Certificate) CertificateFactory.getInstance("X.509").generateCertificate(is); } GatewaySSLContextProvider();   }