I used secure enclave to encrypt my private key as a generic password as suggested by eskimo in https://developer.apple.com/forums/thread/682480?login=true&r_s_legacy=true
But if I don't save the private key also as a key to keychain, when I use the public key for network connection certification I receive an error from inside borring ssl and the network request fails: [boringssl] boringssl_private_key_sign(84) SecKeyCreateSignature failed: -50 [boringssl] boringssl_session_handshake_incomplete(90) [C17.1.1.1:2][0x11f2262d0] SSL library error [boringssl] boringssl_session_handshake_error_print(41) [C17.1.1.1:2][0x11f2262d0] Error: 4795274440:error:1000011f:SSL routines:OPENSSL_internal:PRIVATE_KEY_OPERATION_FAILED:/Library/Caches/com.apple.xbs/Sources/boringssl/boringssl-351.100.8.0.1/ssl/ssl_privkey.cc:220: [boringssl] nw_protocol_boringssl_handshake_negotiate_proceed(767) [C17.1.1.1:2][0x11f2262d0] handshake failed at state 12288: not completed [boringssl] boringssl_private_key_sign(84) SecKeyCreateSignature failed: -50 [boringssl] boringssl_session_handshake_incomplete(90) [C17.2.1.1:2][0x11f5259b0] SSL library error [boringssl] boringssl_session_handshake_error_print(41) [C17.2.1.1:2][0x11f5259b0] Error: 4795274440:error:1000011f:SSL routines:OPENSSL_internal:PRIVATE_KEY_OPERATION_FAILED:/Library/Caches/com.apple.xbs/Sources/boringssl/boringssl-351.100.8.0.1/ssl/ssl_privkey.cc:220: [boringssl] nw_protocol_boringssl_handshake_negotiate_proceed(767) [C17.2.1.1:2][0x11f5259b0] handshake failed at state 12288: not completed Connection 17: received failure notification Connection 17: failed to connect 3:-9858, reason -1 Connection 17: encountered error(3:-9858) [boringssl] boringssl_private_key_sign(84) SecKeyCreateSignature failed: -50 [boringssl] boringssl_session_handshake_incomplete(90) [C18.1.1.1:2][0x11dd87390] SSL library error [boringssl] boringssl_session_handshake_error_print(41) [C18.1.1.1:2][0x11dd87390] Error: 4795274440:error:1000011f:SSL routines:OPENSSL_internal:PRIVATE_KEY_OPERATION_FAILED:/Library/Caches/com.apple.xbs/Sources/boringssl/boringssl-351.100.8.0.1/ssl/ssl_privkey.cc:220: [boringssl] nw_protocol_boringssl_handshake_negotiate_proceed(767) [C18.1.1.1:2][0x11dd87390] handshake failed at state 12288: not completed
Any idea why this happens? Why does boring ssl need my private key to be persistent in the keychain?