New function to set compression methods so they can be safely freed.

(cherry picked from commit cbb6744827)
This commit is contained in:
Dr. Stephen Henson 2014-01-27 14:30:29 +00:00
parent 3fcf327e26
commit 9f1979b94a
2 changed files with 6 additions and 0 deletions

View File

@ -2440,6 +2440,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);

View File

@ -1862,6 +1862,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;