When I compile and use this according to README, I require to have OpenSSL headers on my system. This is also issue because
some macros have been changed to functions by BoringSSL and the generated zig function is wrong.
For example this OpenSSL definition
# define SSL_set_tlsext_host_name(s,name) \
SSL_ctrl(s,SSL_CTRL_SET_TLSEXT_HOSTNAME,TLSEXT_NAMETYPE_host_name,\
(void *)name)
gets compiles by translateC to
pub inline fn SSL_set_tlsext_host_name(s: anytype, name: anytype) @TypeOf(SSL_ctrl(s, SSL_CTRL_SET_TLSEXT_HOSTNAME, TLSEXT_NAMETYPE_host_name, __helpers.cast(?*anyopaque, name))) {
_ = &s;
_ = &name;
return SSL_ctrl(s, SSL_CTRL_SET_TLSEXT_HOSTNAME, TLSEXT_NAMETYPE_host_name, __helpers.cast(?*anyopaque, name));
}
However symbol SSL_ctrl is not provided by BoringSSL.
Correct BoringSSL definition is
OPENSSL_EXPORT int SSL_set_tlsext_host_name(SSL *ssl, const char *name);
which should correctly be compiled by translateC to extern symbol.
Another issue is that the new BoringSSL functions are missing. For example SSL_CTX_set_select_certificate_cb is not present in zig file at all.
I have tried ensuring that no system headers are used (by removing /usr/include/openssl) and gotten error error: 'openssl/ssl.h' not found. So then I tried adding boringssl headers lib_ssl_c.addIncludePath(boringssl_dependency.artifact("ssl").getEmittedIncludeTree()); . But this resulted in many compilation errors.
When I compile and use this according to README, I require to have OpenSSL headers on my system. This is also issue because
some macros have been changed to functions by BoringSSL and the generated zig function is wrong.
For example this OpenSSL definition
gets compiles by translateC to
However symbol SSL_ctrl is not provided by BoringSSL.
Correct BoringSSL definition is
which should correctly be compiled by translateC to extern symbol.
Another issue is that the new BoringSSL functions are missing. For example
SSL_CTX_set_select_certificate_cbis not present in zig file at all.I have tried ensuring that no system headers are used (by removing /usr/include/openssl) and gotten error
error: 'openssl/ssl.h' not found. So then I tried adding boringssl headerslib_ssl_c.addIncludePath(boringssl_dependency.artifact("ssl").getEmittedIncludeTree());. But this resulted in many compilation errors.