diff options
author | jsing <> | 2014-05-25 13:27:38 +0000 |
---|---|---|
committer | jsing <> | 2014-05-25 13:27:38 +0000 |
commit | fc3ae41e6c3f587c173aca34af47208c06c01668 (patch) | |
tree | 1981463f492523e729cbfd564646012bb0a6574c /src/lib/libssl/ssl_txt.c | |
parent | 272e873b19ba05dbb966cb20a3fa0ca5533b84e2 (diff) | |
download | openbsd-fc3ae41e6c3f587c173aca34af47208c06c01668.tar.gz openbsd-fc3ae41e6c3f587c173aca34af47208c06c01668.tar.bz2 openbsd-fc3ae41e6c3f587c173aca34af47208c06c01668.zip |
The ssl_ciper_get_evp() function is currently overloaded to also return the
compression associated with the SSL session. Based on one of Adam Langley's
chromium diffs, factor out the compression handling code into a separate
ssl_cipher_get_comp() function.
Rewrite the compression handling code to avoid pointless duplication and so
that failures are actually returned to and detectable by the caller.
ok miod@
Diffstat (limited to 'src/lib/libssl/ssl_txt.c')
-rw-r--r-- | src/lib/libssl/ssl_txt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_txt.c b/src/lib/libssl/ssl_txt.c index 01dd846596..734e0c0755 100644 --- a/src/lib/libssl/ssl_txt.c +++ b/src/lib/libssl/ssl_txt.c | |||
@@ -190,7 +190,9 @@ SSL_SESSION_print(BIO *bp, const SSL_SESSION *x) | |||
190 | if (x->compress_meth != 0) { | 190 | if (x->compress_meth != 0) { |
191 | SSL_COMP *comp = NULL; | 191 | SSL_COMP *comp = NULL; |
192 | 192 | ||
193 | ssl_cipher_get_evp(x, NULL, NULL, NULL, NULL, &comp); | 193 | if (!ssl_cipher_get_comp(x, &comp)) |
194 | goto err; | ||
195 | |||
194 | if (comp == NULL) { | 196 | if (comp == NULL) { |
195 | if (BIO_printf(bp, "\n Compression: %d", x->compress_meth) <= 0) | 197 | if (BIO_printf(bp, "\n Compression: %d", x->compress_meth) <= 0) |
196 | goto err; | 198 | goto err; |