diff options
author | 2014-05-27 18:51:24 +0000 | |
---|---|---|
committer | 2014-05-27 18:51:24 +0000 | |
commit | 067899c95e0d0a5ab7d47365e65c4da7de01bac9 (patch) | |
tree | 0bfbd48331389fc6a2f2ace9fa7324f7263c608f /lib/libssl/src | |
parent | paste in an EXAMPLES section, from posix spec; (diff) | |
download | wireguard-openbsd-067899c95e0d0a5ab7d47365e65c4da7de01bac9.tar.xz wireguard-openbsd-067899c95e0d0a5ab7d47365e65c4da7de01bac9.zip |
Remove redundant test introduced in s3_pkt.c on 20001225, which got cargo-culted
(with an XXX comment, though) in d1_pkt.c in 2005.
Diffstat (limited to 'lib/libssl/src')
-rw-r--r-- | lib/libssl/src/ssl/d1_pkt.c | 5 | ||||
-rw-r--r-- | lib/libssl/src/ssl/s3_pkt.c | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/lib/libssl/src/ssl/d1_pkt.c b/lib/libssl/src/ssl/d1_pkt.c index 4e306829bc9..c855d0e2a61 100644 --- a/lib/libssl/src/ssl/d1_pkt.c +++ b/lib/libssl/src/ssl/d1_pkt.c @@ -731,9 +731,8 @@ dtls1_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek) if (!ssl3_setup_buffers(s)) return (-1); - /* XXX: check what the second '&& type' is about */ - if ((type && (type != SSL3_RT_APPLICATION_DATA) && - (type != SSL3_RT_HANDSHAKE) && type) || + if ((type && + type != SSL3_RT_APPLICATION_DATA && type != SSL3_RT_HANDSHAKE) || (peek && (type != SSL3_RT_APPLICATION_DATA))) { SSLerr(SSL_F_DTLS1_READ_BYTES, ERR_R_INTERNAL_ERROR); return -1; diff --git a/lib/libssl/src/ssl/s3_pkt.c b/lib/libssl/src/ssl/s3_pkt.c index da6c860cfc7..3a167f058c0 100644 --- a/lib/libssl/src/ssl/s3_pkt.c +++ b/lib/libssl/src/ssl/s3_pkt.c @@ -907,8 +907,8 @@ ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek) return -1; } - if ((type && (type != SSL3_RT_APPLICATION_DATA) && - (type != SSL3_RT_HANDSHAKE) && type) || + if ((type && + type != SSL3_RT_APPLICATION_DATA && type != SSL3_RT_HANDSHAKE) || (peek && (type != SSL3_RT_APPLICATION_DATA))) { SSLerr(SSL_F_SSL3_READ_BYTES, ERR_R_INTERNAL_ERROR); return -1; |