Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

Wi-Fi Combo Forum Discussions

MuOr_1658816
Level 4
Level 4
First like received

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?

0 Likes
1 Solution
Anonymous
Not applicable

The 2nd parameter of this API should be a pointer.

Please see wiced_tcpip.h and http_server.c as reference.

View solution in original post

0 Likes
2 Replies
Anonymous
Not applicable

The 2nd parameter of this API should be a pointer.

Please see wiced_tcpip.h and http_server.c as reference.

0 Likes

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.

0 Likes