input-output-hk / cardano-sl

Cryptographic currency implementing Ouroboros PoS protocol
Apache License 2.0
3.77k stars 630 forks source link

curl: (51) SSL: certificate subject name (Cardano SL Server Node) does not match target host name "my-ip" #4127

Open shabbir-bblab opened 5 years ago

shabbir-bblab commented 5 years ago

When i'm running cardano node by launching this script ./connect-to-mainnet, and then calling any api like ( https://myip:8090/api/v1/node-info with certificates) on any different ip than localhost, I'm getting this error. I'm also providing .cert and .pem certificate generated under state-wallet-mainnet when calling api but i think this certificate is only valid for localhost. more over tried to generate certificate for other host using stack --exec 509 tool but it's also not working and get same error. So, how can i generate a certificate for a different host other than local?

shabbir-bblab commented 5 years ago

Screenshot from 2019-04-09 17-32-47

onicrom commented 5 years ago

add -k to your curl command to ignore bad certs.