diff options
author | jsing <> | 2021-02-20 07:29:07 +0000 |
---|---|---|
committer | jsing <> | 2021-02-20 07:29:07 +0000 |
commit | bacd1c55415e25c60d3d43d34214067b6f87bf10 (patch) | |
tree | 7aa7da657d5662a35bbc631ced691bacaf8dc422 | |
parent | c0a82707368e11e3872c506071effd56313abf17 (diff) | |
download | openbsd-bacd1c55415e25c60d3d43d34214067b6f87bf10.tar.gz openbsd-bacd1c55415e25c60d3d43d34214067b6f87bf10.tar.bz2 openbsd-bacd1c55415e25c60d3d43d34214067b6f87bf10.zip |
Clean up/simplify dtls1_get_cipher().
ok tb@
-rw-r--r-- | src/lib/libssl/d1_lib.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/lib/libssl/d1_lib.c b/src/lib/libssl/d1_lib.c index 4d406271af..4a45e66f34 100644 --- a/src/lib/libssl/d1_lib.c +++ b/src/lib/libssl/d1_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: d1_lib.c,v 1.52 2021/01/21 18:48:56 jsing Exp $ */ | 1 | /* $OpenBSD: d1_lib.c,v 1.53 2021/02/20 07:29:07 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * DTLS implementation written by Nagendra Modadugu | 3 | * DTLS implementation written by Nagendra Modadugu |
4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. | 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. |
@@ -251,14 +251,15 @@ dtls1_ctrl(SSL *s, int cmd, long larg, void *parg) | |||
251 | const SSL_CIPHER * | 251 | const SSL_CIPHER * |
252 | dtls1_get_cipher(unsigned int u) | 252 | dtls1_get_cipher(unsigned int u) |
253 | { | 253 | { |
254 | const SSL_CIPHER *ciph = ssl3_get_cipher(u); | 254 | const SSL_CIPHER *cipher; |
255 | 255 | ||
256 | if (ciph != NULL) { | 256 | if ((cipher = ssl3_get_cipher(u)) == NULL) |
257 | if (ciph->algorithm_enc == SSL_RC4) | 257 | return NULL; |
258 | return NULL; | 258 | |
259 | } | 259 | if (cipher->algorithm_enc == SSL_RC4) |
260 | return NULL; | ||
260 | 261 | ||
261 | return ciph; | 262 | return cipher; |
262 | } | 263 | } |
263 | 264 | ||
264 | void | 265 | void |