Search in sources :

Example 1 with SdsTrustManagerFactory

use of io.grpc.xds.internal.sds.trust.SdsTrustManagerFactory in project grpc-java by grpc.

the class CertProviderServerSslContextProvider method getSslContextBuilder.

@Override
protected final SslContextBuilder getSslContextBuilder(CertificateValidationContext certificateValidationContextdationContext) throws CertStoreException, CertificateException, IOException {
    SslContextBuilder sslContextBuilder = SslContextBuilder.forServer(savedKey, savedCertChain);
    setClientAuthValues(sslContextBuilder, isMtls() ? new SdsTrustManagerFactory(savedTrustedRoots.toArray(new X509Certificate[0]), certificateValidationContextdationContext) : null);
    sslContextBuilder = GrpcSslContexts.configure(sslContextBuilder);
    return sslContextBuilder;
}
Also used : SdsTrustManagerFactory(io.grpc.xds.internal.sds.trust.SdsTrustManagerFactory) SslContextBuilder(io.netty.handler.ssl.SslContextBuilder) X509Certificate(java.security.cert.X509Certificate)

Aggregations

SdsTrustManagerFactory (io.grpc.xds.internal.sds.trust.SdsTrustManagerFactory)1 SslContextBuilder (io.netty.handler.ssl.SslContextBuilder)1 X509Certificate (java.security.cert.X509Certificate)1