- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am using wiced_tls_init_advanced_context to parse my cert and key in order to be able to active TLS on a client TCP connection. It is returning with a generic error.
The cert and key file contents are in a header file like this:
#define CERTIFICATE_STRING \
"-----BEGIN CERTIFICATE-----\r\n"\
"..."
"-----END CERTIFICATE-----\r\n"\
"\0"\
"\0"
I call the function as such:
result = wiced_tls_init_advanced_context(&tls_context, CERTIFICATE_STRING, PRIVATE_KEY_STRING);
How can i debug this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The 2nd parameter of this API should be a pointer.
Please see wiced_tcpip.h and http_server.c as reference.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The 2nd parameter of this API should be a pointer.
Please see wiced_tcpip.h and http_server.c as reference.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I mistyped. They are in a char pointers already.
However, my issue was that i forgot to put \r\n at the end of each line for the key. The cert was ok, but the key was the one making it fail. Resolved now. Thanks.