Curl Error Buffer: unable to set private key file: '/mnt/flash/system/rkeys/usr1/key0.der' type DER
Any reasons why setting the private key failing here! On Thu, Jun 20, 2019 at 10:08 AM Praveen Pvs <meetpraveen...@gmail.com> wrote: > Hi, > > I am experiencing error code 58 when i try to set the SSL certificate in > my code. > > Not sure if i am missing some options settings or problem with the SSL > certificate. Could you please let me know if i am doing something wrong? > > #define CA_CERT_FILE "ca-cert.pem" // Certification file > > #define SSL_OWN_CERT "/mnt/flash/system/rkeys/usr1/key0.crt" > #define SSL_OWN_KEY "/mnt/flash/system/rkeys/usr1/key0.der" > > std::string path; > path.assign("/mnt/flash/userdata/usr1/"); > std::string certName; > > certName.assign(path.c_str()); > certName.append(CA_CERT_FILE); > > curl_easy_setopt(curlHandle, CURLOPT_SSLCERTTYPE, "DER"); > curl_easy_setopt(curlHandle, CURLOPT_SSLCERT, SSL_OWN_CERT); > > curl_easy_setopt(curlHandle, CURLOPT_SSLKEYTYPE, "DER"); > curl_easy_setopt(curlHandle, CURLOPT_SSLKEY, SSL_OWN_KEY); > > curl_easy_setopt(curlHandle, CURLOPT_CAINFO,certName.c_str()); > curl_easy_setopt(curlHandle, CURLOPT_CAPATH, path.c_str()); > > When i do the Curl_easy_perform, its returning 58 error code. Have > attached sample certificate and keys file which i am using. > > Regards > Praveen >
------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html