From 5066a5ec83976a283f676b0386e0cb15fd7378dc Mon Sep 17 00:00:00 2001 From: Vitaly Chikunov Date: Mon, 20 Dec 2021 01:40:39 +0300 Subject: [PATCH] MSVC: Fix casting warning C4057 test_tls.c(103,5): warning C4057: 'function': 'const unsigned char *' differs in indirection to slightly different base types from 'char [8]' test_tls.c(104,5): warning C4057: 'function': 'const unsigned char *' differs in indirection to slightly different base types from 'char [9]' Signed-off-by: Vitaly Chikunov --- test_tls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test_tls.c b/test_tls.c index 1e805c3..31b750b 100644 --- a/test_tls.c +++ b/test_tls.c @@ -225,8 +225,8 @@ static struct certkey certgen(const char *algname, const char *paramset) T(X509_REQ_set_version(req, 0L)); X509_NAME *name; T(name = X509_NAME_new()); - T(X509_NAME_add_entry_by_txt(name, "O", MBSTRING_ASC, "Test CA", -1, -1, 0)); - T(X509_NAME_add_entry_by_txt(name, "CN", MBSTRING_ASC, "Test Key", -1, -1, 0)); + T(X509_NAME_add_entry_by_txt(name, "O", MBSTRING_ASC, (unsigned char *)"Test CA", -1, -1, 0)); + T(X509_NAME_add_entry_by_txt(name, "CN", MBSTRING_ASC, (unsigned char *)"Test Key", -1, -1, 0)); T(X509_REQ_set_subject_name(req, name)); T(X509_REQ_set_pubkey(req, pkey)); X509_NAME_free(name); -- 2.39.5