Topic: [SOLVED] loading buffer failing when time not set
Hello,
Im trying to use the command WolfSSL_CTX_load_verify_buffer, but I did not understand how I should format the certificate in order to be acceptable to this command.
according to the online api documentation, I understand that I can choose from asn1 or pem format. However the examples I find uses der format.
I think I should use der format and write the der format like this:
static const unsigned char ca_cert_der_2048[] =
{
0x30, 0x82, 0x04, 0xE0, 0x30, 0x82, 0x03, 0xC8, 0xA0, 0x03,
0x02, 0x01, 0x02, 0x02, 0x09, 0x00, 0xA6, 0x66, 0x38, 0x49,
.....
Is this correct?
If so, which flag should I use in the loading command? SSL_FILETYPE_PEM ?
Kind Regards
Peter
PS. By the way, I have both PEM and DER format, maybe I should write like this to use PEM:
const unsigned char caCertificate_root[] = "-----BEGIN CERTIFICATE-----MIIFazCCA...."
or?
DS