]> www.wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
MSVC: Fix casting warning C4057
authorVitaly Chikunov <vt@altlinux.org>
Sun, 19 Dec 2021 22:40:39 +0000 (01:40 +0300)
committerDmitry Belyavskiy <beldmit@users.noreply.github.com>
Tue, 21 Dec 2021 09:12:25 +0000 (12:12 +0300)
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 <vt@altlinux.org>
test_tls.c

index 1e805c3e67118d57a18a1f381f9c0ccbd14794a6..31b750b4949be9d085645bdc7cc69220287d66d5 100644 (file)
@@ -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);