]> granicus.if.org Git - openssl/commitdiff
Return previous compression methods when setting them.
authorDr. Stephen Henson <steve@openssl.org>
Thu, 6 Feb 2014 13:57:26 +0000 (13:57 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 6 Feb 2014 13:58:18 +0000 (13:58 +0000)
(cherry picked from commit b45e874d7c4a8fdac7ec10cff43f21d02e75d511)

ssl/ssl.h
ssl/ssl_ciph.c

index 247d4cfb348cdea4c3a68781296d05cdc6810c5f..a2f32d2c3490d205cae0fca6c50f72f2be226a0e 100644 (file)
--- a/ssl/ssl.h
+++ b/ssl/ssl.h
@@ -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);
index 839b210081bc10ba7c68821ee6f81d21386ae565..1ea202f13600b890b5152122f4680d686d7e300a 100644 (file)
@@ -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)