X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=ustream-openssl.c;h=635d34ce29726b50f141999f13090d13e4e40be1;hb=a4ca61527236e89eb9efb782fd9bfd04796144e3;hp=3abc6e20f0d4abca2d8dabb39738c4016f5432eb;hpb=33853d63aa9d308fc7b0dee1ddbd312bc99e4bed;p=project%2Fustream-ssl.git diff --git a/ustream-openssl.c b/ustream-openssl.c index 3abc6e2..635d34c 100644 --- a/ustream-openssl.c +++ b/ustream-openssl.c @@ -52,6 +52,7 @@ __ustream_ssl_context_new(bool server) return NULL; SSL_CTX_set_verify(c, SSL_VERIFY_NONE, NULL); + SSL_CTX_set_quiet_shutdown(c, 1); return (void *) c; } @@ -100,6 +101,12 @@ __hidden void __ustream_ssl_context_free(struct ustream_ssl_ctx *ctx) SSL_CTX_free((void *) ctx); } +void __ustream_ssl_session_free(void *ssl) +{ + SSL_shutdown(ssl); + SSL_free(ssl); +} + static void ustream_ssl_error(struct ustream_ssl *us, int ret) { us->error = ret; @@ -114,7 +121,7 @@ static bool host_pattern_match(const unsigned char *pattern, const char *cn) for (; (c = tolower(*pattern++)) != 0; cn++) { if (c != '*') { - if (c != *cn) + if (c != tolower(*cn)) return false; continue; }