nativescript-http icon indicating copy to clipboard operation
nativescript-http copied to clipboard

is there support to select/send a client certificate(for authentication PKCS12) during the TLS handshake?

Open spololacasa opened this issue 4 years ago • 6 comments

my api request requires a client certificate (pkcs12). Can I send/select during the request?

spololacasa avatar Apr 06 '21 07:04 spololacasa

It seems to be possible in OkHttp and NSURLSession.

It's quite complicated though. I'll accept PR's for it

jerbob92 avatar Apr 06 '21 07:04 jerbob92

Can you tell me how to do it? I would be very gratefull.

spololacasa avatar Apr 06 '21 08:04 spololacasa

Can you tell me how to do it? I would be very gratefull.

I linked two pieces of code how to implement it in native code, meaning it would technically be possible to implement it into this plugin, but it's not currently supported. The Android (OkHttp) code should be implemented here and here. The iOS (NSURLSession) code here

jerbob92 avatar Apr 06 '21 09:04 jerbob92

Thank you for answering so quickly. I am going to try to implement it, but I don't know if I will succeed as I have never developed native code.

spololacasa avatar Apr 06 '21 09:04 spololacasa

Hello, I am overwhelmed. I've been trying for three weeks but I can't find it. Could you help me how to do it.

spololacasa avatar Apr 27 '21 08:04 spololacasa

Hello, I am overwhelmed. I've been trying for three weeks but I can't find it. Could you help me how to do it.

Can you tell me how far you came in your approach? Any repo on Github that I can take a look at? It's quite some work to implement, and I'm not really interested in it so I'm probably not going to build it myself.

jerbob92 avatar Apr 28 '21 08:04 jerbob92