Search in sources :

Example 6 with X509TrustManagerResolver

use of com.vmware.photon.controller.model.security.ssl.X509TrustManagerResolver in project photon-model by vmware.

the class ResolveCertificateUtil method resolveTrusted.

@Test
public void resolveTrusted() {
    X509TrustManagerResolver resolver = CertificateUtil.resolveCertificate(URI.create("https://www.verisign.com/"), 5000);
    assertTrue(resolver.isCertsTrusted());
    assertNotNull(resolver.getCertificate());
    assertNull(resolver.getCertificateException());
}
Also used : X509TrustManagerResolver(com.vmware.photon.controller.model.security.ssl.X509TrustManagerResolver) Test(org.junit.Test)

Aggregations

X509TrustManagerResolver (com.vmware.photon.controller.model.security.ssl.X509TrustManagerResolver)6 InetSocketAddress (java.net.InetSocketAddress)3 Test (org.junit.Test)3 IOException (java.io.IOException)2 Proxy (java.net.Proxy)2 ResourceOperation (com.vmware.photon.controller.model.adapters.registry.operations.ResourceOperation)1 SslTrustCertificateState (com.vmware.photon.controller.model.security.service.SslTrustCertificateService.SslTrustCertificateState)1 LocalizableValidationException (com.vmware.xenon.common.LocalizableValidationException)1 Operation (com.vmware.xenon.common.Operation)1 Socket (java.net.Socket)1 URL (java.net.URL)1 KeyManagementException (java.security.KeyManagementException)1 NoSuchAlgorithmException (java.security.NoSuchAlgorithmException)1 ArrayList (java.util.ArrayList)1 ExecutionException (java.util.concurrent.ExecutionException)1 SNIHostName (javax.net.ssl.SNIHostName)1 SNIServerName (javax.net.ssl.SNIServerName)1 SSLContext (javax.net.ssl.SSLContext)1 SSLParameters (javax.net.ssl.SSLParameters)1 SSLSession (javax.net.ssl.SSLSession)1