diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2014-02-06 13:57:26 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2014-02-06 13:58:18 +0000 |
commit | c41e242e5c0d84b2ae0e5a0ac9011eddfaeb5fb1 (patch) | |
tree | 27ca2bed0f1d987f3227188c89b595b791130426 /ssl | |
parent | 95783193946982d5acfc9f8d43dc25c021f39b9c (diff) |
Return previous compression methods when setting them.
(cherry picked from commit b45e874d7c4a8fdac7ec10cff43f21d02e75d511)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/ssl.h | 2 | ||||
-rw-r--r-- | ssl/ssl_ciph.c | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -2451,7 +2451,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); +STACK_OF(SSL_COMP) *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 839b210081..1ea202f136 100644 --- a/ssl/ssl_ciph.c +++ b/ssl/ssl_ciph.c @@ -1870,9 +1870,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) +STACK_OF(SSL_COMP) *SSL_COMP_set0_compression_methods(STACK_OF(SSL_COMP) *meths) { + STACK_OF(SSL_COMP) *old_meths = ssl_comp_methods; ssl_comp_methods = meths; + return old_meths; } int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm) |