From cbb67448277232c8403f96edad4931c4203e7746 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Mon, 27 Jan 2014 14:30:29 +0000 Subject: [PATCH] New function to set compression methods so they can be safely freed. --- ssl/ssl.h | 1 + ssl/ssl_ciph.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/ssl/ssl.h b/ssl/ssl.h index da777e99a5..aa3be29a46 100644 --- a/ssl/ssl.h +++ b/ssl/ssl.h @@ -2492,6 +2492,7 @@ const COMP_METHOD *SSL_get_current_compression(SSL *s); const COMP_METHOD *SSL_get_current_expansion(SSL *s); const char *SSL_COMP_get_name(const COMP_METHOD *comp); STACK_OF(SSL_COMP) *SSL_COMP_get_compression_methods(void); +void SSL_COMP_set0_compression_methods(STACK_OF(SSL_COMP) *meths); int SSL_COMP_add_compression_method(int id,COMP_METHOD *cm); #else const void *SSL_get_current_compression(SSL *s); diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c index 1a2849a053..33b7d08910 100644 --- a/ssl/ssl_ciph.c +++ b/ssl/ssl_ciph.c @@ -1892,6 +1892,11 @@ STACK_OF(SSL_COMP) *SSL_COMP_get_compression_methods(void) return(ssl_comp_methods); } +void SSL_COMP_set0_compression_methods(STACK_OF(SSL_COMP) *meths) + { + ssl_comp_methods = meths; + } + int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm) { SSL_COMP *comp; -- GitLab