Byron/google-apis-rs

error with hyper_rustls: InvalidCertificateData

rnag opened this issue · 1 comments

rnag commented

With newest version I am getting below error when uploading a video w/ the YT API:

 MissingToken(HttpError(hyper::Error(Connect, Custom { kind: Other, error: Custom { kind: InvalidData, error: InvalidCertificateData("invalid peer certificate: UnknownIssuer") } })))

No idea how to resolve this. Any help appreciated.

P.S. I have company cert in a custom location, at ~/certs/my-cert.pem. I'm not sure how to pass the path in to YT. Maybe it needs the full path to cert (not sure).

Otherwise, i'm totally fine with disabling SSL validation. I'm not sure how to attempt that either. Any tips appreciated.

rnag commented

This issue can be disregarded. I realized it might be issue with .pem file or something. I even added code to tell rust-tls to pass the path to the pem file and add it to the root store, but no dice.

After uncommenting environment vars that I had set that were already referencing the .pem file (my default shell config), this worked without issue.

Some of those vars I removed from the envrinoment were REQUEST_CA_BUNDLE and SSL_CERT_FILE. After removing this, script worked without any Invalid Cert errors.

Edit: After investigation/testing, it looks like the main variable to remove was SSL_CERT_FILE alone.