Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java Security Provider unsupported for SslProvider: OPENSSL #11219

Closed
laglangyue opened this issue May 17, 2024 · 1 comment
Closed

Java Security Provider unsupported for SslProvider: OPENSSL #11219

laglangyue opened this issue May 17, 2024 · 1 comment
Labels

Comments

@laglangyue
Copy link
Contributor

my machine is m2 apple

                builder.overrideAuthority(channelOptions.getAuthorityHost())
                        .sslContext(GrpcSslContexts.forClient()
                                .sslProvider(OPENSSL)
                                .trustManager(new ByteArrayInputStream(channelOptions.getCertChain()))
                                .build());

I get a excetpion

java.lang.IllegalArgumentException: Java Security Provider unsupported for SslProvider: OPENSSL
	at io.grpc.netty.shaded.io.netty.handler.ssl.SslContext.verifyNullSslContextProvider(SslContext.java:488)
	at io.grpc.netty.shaded.io.netty.handler.ssl.SslContext.newClientContextInternal(SslContext.java:826)
	at io.grpc.netty.shaded.io.netty.handler.ssl.SslContextBuilder.build(SslContextBuilder.java:576)

then I install openssl

OpenSSL 3.3.0 9 Apr 2024 (Library: OpenSSL 3.3.0 9 Apr 2024)

but I can't resolve the exception

@kannanjgithub
Copy link
Contributor

Is that the actual code producing the exception, because the Netty SslContext created by calling GrpcSslContexts.forClient() doesn't have a SslContextProvider set. Unless you do something like

GrpcSslContexts.forClient()
            .sslProvider(OPENSSL)
            .trustManager(new ByteArrayInputStream(channelOptions.getCertChain()))
            **.sslContextProvider(someJavaContextProvider)**
            .build()

you shouldn't be facing that exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants