protected static void configureAcceptedClientCertificates(
            final Security security,
            final SslContextBuilder sslContextBuilder) {

        if (security.getClientAuth() != ClientAuth.NONE) {
            sslContextBuilder.clientAuth(of(security.getClientAuth()));

            try {
                final Resource trustCertCollection = security.getTrustCertCollection();
                final Resource trustStore = security.getTrustStore();

                if (trustCertCollection != null) {
                    try (InputStream trustCertCollectionStream = trustCertCollection.getInputStream()) {
                        sslContextBuilder.trustManager(trustCertCollectionStream);
                    }

                } else if (trustStore != null) {
                    final TrustManagerFactory trustManagerFactory = KeyStoreUtils.loadTrustManagerFactory(
                            security.getTrustStoreFormat(), trustStore, security.getTrustStorePassword());
                    sslContextBuilder.trustManager(trustManagerFactory);

                } else {
                    // Use system default
                }
            } catch (final Exception e) {
                throw new IllegalArgumentException("Failed to create SSLContext (TrustStore)", e);
            }
        }
    }
Configures the client certificates accepted by the ssl context.

@param security The security configuration to use.
@param sslContextBuilder The ssl context builder to configure.
grpc-server-spring-boot-starter/src/main/java/net/devh/boot/grpc/server/serverfactory/NettyGrpcServerFactory.java