Why is my secure client connection working on android but not on ios?

Viewed 141

I am currently working on a secure client connection in flutter by using grpc and a pinned self-signed certificate. When I build and deploy the app to android, it works fine. I can make a secure connection between multiple phones and send/receive data. But when I build and deploy to ios, the app installs, I can start the app, but when I try to make a connection I get the following error:

Catch gRPC Error (code: 14, codeName: UNAVAILABLE, message: Error connecting: HandshakeException: Handshake error in client (OS Error: CERTIFICATE_VERIFY_FAILED: application verification failure(handshake.cc:354)), details: null, rawResponse: null)

Here's a small snippet of the code.

  _channel = grpc.ClientChannel(ipAddress,
                port: 8443,
                options: const grpc.ChannelOptions(
                    credentials: grpc.ChannelCredentials.secure(
                        certificates: certificate, authority: <my-authority>)

I have seen many variations of the CERTIFICATE_VERIFY_FAILED, but none with "application verification failure" and I can't find anything comparable on sites/fora.

Please help. Thanks in advance

0 Answers
Related