summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTodd Short <tshort@akamai.com>2022-08-29 14:58:57 -0400
committerTodd Short <todd.short@me.com>2022-10-18 09:30:22 -0400
commit7e3cacac943d298348d97c8f7f980ca0916378c5 (patch)
tree23add0038a61ce3ee2a0c6ec6f5c04c96a74f948 /test
parentb540aae97d6b80f9040874b9c56259a85ba46f36 (diff)
downloadopenssl-new-7e3cacac943d298348d97c8f7f980ca0916378c5.tar.gz
Update COMP_METHOD
size_t-ify the COMP_METHOD structure and functions. Get rid of the non-functional COMP_METHODS and return NULL instead. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18186)
Diffstat (limited to 'test')
-rw-r--r--test/ssl_old_test.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/test/ssl_old_test.c b/test/ssl_old_test.c
index beabb7205e..439d0ed8d0 100644
--- a/test/ssl_old_test.c
+++ b/test/ssl_old_test.c
@@ -1314,17 +1314,15 @@ int main(int argc, char *argv[])
if (comp == COMP_ZLIB)
cm = COMP_zlib();
if (cm != NULL) {
- if (COMP_get_type(cm) != NID_undef) {
- if (SSL_COMP_add_compression_method(comp, cm) != 0) {
- fprintf(stderr, "Failed to add compression method\n");
- ERR_print_errors_fp(stderr);
- }
- } else {
- fprintf(stderr,
- "Warning: %s compression not supported\n",
- comp == COMP_ZLIB ? "zlib" : "unknown");
+ if (SSL_COMP_add_compression_method(comp, cm) != 0) {
+ fprintf(stderr, "Failed to add compression method\n");
ERR_print_errors_fp(stderr);
}
+ } else {
+ fprintf(stderr,
+ "Warning: %s compression not supported\n",
+ comp == COMP_ZLIB ? "zlib" : "unknown");
+ ERR_print_errors_fp(stderr);
}
ssl_comp_methods = SSL_COMP_get_compression_methods();
n = sk_SSL_COMP_num(ssl_comp_methods);