diff options
| author | jsing <> | 2014-05-25 13:27:38 +0000 |
|---|---|---|
| committer | jsing <> | 2014-05-25 13:27:38 +0000 |
| commit | a26ab58294e030cd16e09f09139a602c114d495e (patch) | |
| tree | 1981463f492523e729cbfd564646012bb0a6574c /src/lib/libssl/ssl_txt.c | |
| parent | 4742830abc4156a69bf5e7e604c4087367c1ffb1 (diff) | |
| download | openbsd-a26ab58294e030cd16e09f09139a602c114d495e.tar.gz openbsd-a26ab58294e030cd16e09f09139a602c114d495e.tar.bz2 openbsd-a26ab58294e030cd16e09f09139a602c114d495e.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 '')
| -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; |
