Example usage for javax.net.ssl X509ExtendedTrustManager getAcceptedIssuers

List of usage examples for javax.net.ssl X509ExtendedTrustManager getAcceptedIssuers

Introduction

In this page you can find the example usage for javax.net.ssl X509ExtendedTrustManager getAcceptedIssuers.

Prototype

public X509Certificate[] getAcceptedIssuers();

Source Link

Document

Return an array of certificate authority certificates which are trusted for authenticating peers.

Usage

From source file:org.elasticsearch.xpack.core.ssl.SSLServiceTests.java

public void testEmptyTrustManager() throws Exception {
    Settings settings = Settings.builder().build();
    final SSLService sslService = new SSLService(settings, env);
    SSLConfiguration sslConfig = new SSLConfiguration(settings);
    X509ExtendedTrustManager trustManager = sslService.sslContextHolder(sslConfig).getEmptyTrustManager();
    assertThat(trustManager.getAcceptedIssuers(), emptyArray());
}