New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
04_https_request certificate format incorrect #112
Comments
Example works for me as is. |
What caused you to think that the example code expects a DER formatted certificate? The certificate data is passed to the mbedTLS function DER format certificates are a computationally simpler to parse (no decoding step), but PEM is a lot easier to work with which is why I chose it for the example. |
When the pem format used mbedTls returned a format error:
2180 is MBEDTLS_ERR_X509_INVALID_FORMAT. The example only worked when replaced the cert with der format. |
Thanks for clarifying. I don't get this failure on the current esp-idf master 8ab4e11:
Maybe a clean build might help, or there's some other modification or config tweak which will allow me to reproduce? Angus |
We have reproduced this on OS X. @ggsubs which OS are you running? |
build system: Fix null-terminating of text files for embedding on OS X Ref github #112 `/bin/echo -ne` echoes literal `-ne` on OS X. See merge request !238
Fixed in 5ac7810. |
The server cert file included in the example is in an incorrect format. The file is pem, the example expects der encoded. The cert file can be converted by:
openssl x509 -inform pem -in server_root_cert.pem -outform der -out server_root_cert.der
Once converted component.mk should be updated as well as the extern ref to the object:
The text was updated successfully, but these errors were encountered: