Skip to content

Commit 2561621

Browse files
committed
SSL_set_tlsext_host_name: name argument is const
The man page defines it as const, so follow the man.
1 parent b3b6a71 commit 2561621

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

source/deimos/openssl/tls1.d

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,9 @@ int SSL_export_keying_material(SSL *s, ubyte* out_, size_t olen,
300300
const char *label, size_t llen, const(ubyte)* p, size_t plen,
301301
int use_context);
302302

303-
auto SSL_set_tlsext_host_name()(SSL* s,char* name) {
304-
return SSL_ctrl(s,SSL_CTRL_SET_TLSEXT_HOSTNAME,TLSEXT_NAMETYPE_host_name,name);
303+
/// https://www.openssl.org/docs/man1.1.1/man3/SSL_set_tlsext_host_name.html
304+
auto SSL_set_tlsext_host_name()(SSL* s, const(char)* name) {
305+
return SSL_ctrl(s,SSL_CTRL_SET_TLSEXT_HOSTNAME,TLSEXT_NAMETYPE_host_name, cast(void*)name);
305306
}
306307

307308
auto SSL_set_tlsext_debug_callback()(SSL* ssl, ExternC!(void function()) cb) {

0 commit comments

Comments
 (0)