1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

checker: deprecate using V strings in C function calls (#10140)

This commit is contained in:
Enzo
2021-05-20 08:17:44 +02:00
committed by GitHub
parent b0de1f76e8
commit 906b207e58
13 changed files with 27 additions and 25 deletions

View File

@@ -16,7 +16,7 @@ fn (req &Request) ssl_do(port int, method Method, host_name string, path string)
C.SSL_CTX_set_verify_depth(ctx, 4)
flags := C.SSL_OP_NO_SSLv2 | C.SSL_OP_NO_SSLv3 | C.SSL_OP_NO_COMPRESSION
C.SSL_CTX_set_options(ctx, flags)
mut res := C.SSL_CTX_load_verify_locations(ctx, 'random-org-chain.pem', 0)
mut res := C.SSL_CTX_load_verify_locations(ctx, c'random-org-chain.pem', 0)
web := C.BIO_new_ssl_connect(ctx)
addr := host_name + ':' + port.str()
res = C.BIO_set_conn_hostname(web, addr.str)

View File

@@ -5,7 +5,7 @@ module openssl
// openssl from libssl-dev. If there is no local openssl,
// the next flag is harmless, since it will still use the
// (older) system openssl.
#flag linux -I/usr/local/include/openssl -L/usr/local/lib
#flag linux -I/usr/local/include/openssl -L/usr/local/lib
#flag windows -l libssl -l libcrypto
#flag -lssl -lcrypto
#flag linux -ldl -lpthread