diff --git a/.github/lua-openssl.supp b/.github/lua-openssl.supp index 048c3748..7bf299c1 100644 --- a/.github/lua-openssl.supp +++ b/.github/lua-openssl.supp @@ -191,7 +191,6 @@ fun:_dlerror_run } -# OpenSSL 1.1.1 { asn1.c ASN1_TYPE_set1 in openssl_asn1type_new Memcheck:Leak @@ -203,3 +202,61 @@ fun:ASN1_TYPE_set1 obj:* } + +{ + asn1.c ASN1_TYPE_set1 in openssl_asn1type_new + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:CRYPTO_zalloc + fun:ASN1_STRING_type_new + fun:ASN1_STRING_dup + fun:ASN1_TYPE_set1 + obj:* +} + +{ + dlopen_doit + Memcheck:Leak + match-leak-kinds: reachable + fun:malloc + fun:_dl_new_object + fun:_dl_map_object_from_fd + fun:_dl_map_object + fun:openaux + fun:_dl_catch_exception + fun:_dl_map_object_deps + fun:dl_open_worker + fun:_dl_catch_exception + fun:_dl_open + fun:dlopen_doit + fun:_dl_catch_exception +} + +{ + dlopen_doit + Memcheck:Leak + match-leak-kinds: reachable + fun:calloc + fun:_dl_new_object + fun:_dl_map_object_from_fd + fun:_dl_map_object + fun:openaux + fun:_dl_catch_exception + fun:_dl_map_object_deps + fun:dl_open_worker + fun:_dl_catch_exception + fun:_dl_open + fun:dlopen_doit + fun:_dl_catch_exception +} + +{ + ASN1_item_d2i + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + fun:CRYPTO_zalloc + obj:/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 + fun:BN_bin2bn +} diff --git a/test/8.ssl.lua b/test/8.ssl.lua index eddbe1ef..f1277d69 100644 --- a/test/8.ssl.lua +++ b/test/8.ssl.lua @@ -587,4 +587,27 @@ function TestSSL:testSNI() sess = ssl.session_new() sess:id(id) + + bs, bc = bio.pair() + srv = assert(srv_ctx:ssl(bs)) + srv:set_accept_state() + cli = assert(cli_ctx:ssl(bc)) + cli:use(cert, pkey) + cli:set_connect_state() + cli:set('hostname', 'serverB') + repeat + cs, ec = cli:handshake() + rs, es = srv:handshake() + srv:want() + until (rs and cs) or (rs == nil or cs == nil) + + local sbio = bio.filter('ssl', ssl) + sbio:close() + + cli:clear() + cli:shutdown() + + bs:close() + bc:close() + end