Open vricosti opened 1 month ago
Ok I found the fix and basically it implies to save the cert and the private key inside a keystore, I forked it.
Ok I found the fix and basically it implies to save the cert and the private key inside a keystore, I forked it.
you mean the private key of client or server?
Ok I found the fix and basically it implies to save the cert and the private key inside a keystore, I forked it.
you mean the private key of client or server?
private key of client In my branch I have also allowed the possibility to load key/cert/ca as a string: https://github.com/Rapsssito/react-native-tcp-socket/compare/master...vricosti:react-native-tcp-socket:dev/more-node-tls-compliant
Now I will try to implement getCertificate and getPeerCertificate, on android it should be easy but no idea about ios.
Hi,
I am trying to port a library androidtv-remote that was originally designed to run in a node environment to be able to run inside a react-native app. For the ssl part it was using node:tls and it works fine with it.
The android device I am connecting to is using a self signed certificate and the app is using a self signed certificate too.
Here is the server ssl characteristics:
The application I am using is available here: https://github.com/vricosti/TestAndroidTVRemoteApp
At the beginning a self signed certificate is generated inside packages/androidtv-remote/src/certificate/CertificateGenerator.js
this.cert object holds 2 fields, key and cert holding private key and certificate in pem
and then this certificate was used to start the tls connection:
I have the following error:
if use
rejectUnauthorized: true
So in both case it fails...
I tried to add the server certificate and pass it but same error:
and I even check that inside the android code it receives the passed certificate...
thanks in advance