thrift: null-terminate certificates in samples and tests

The thrift methods loadCertificateFromBuffer(),
loadPrivateKeyFromBuffer(), and
loadTrustedCertificatesFromBuffer() expect a null-terminated
string.

Append '\0' to each array used to hold a certificate in
thrift samples and tests.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
This commit is contained in:
Christopher Friedt 2024-02-08 09:45:02 -08:00 committed by Henrik Brix Andersen
commit 218f787e26
3 changed files with 8 additions and 0 deletions

View file

@ -29,9 +29,11 @@ ctx context;
static K_THREAD_STACK_DEFINE(ThriftTest_server_stack, CONFIG_THRIFTTEST_SERVER_STACK_SIZE);
static const char cert_pem[] = {
#include "qemu_cert.pem.inc"
'\0'
};
static const char key_pem[] = {
#include "qemu_key.pem.inc"
'\0'
};
static void *server_func(void *arg)