diff options
author | miod <> | 2014-05-27 18:51:24 +0000 |
---|---|---|
committer | miod <> | 2014-05-27 18:51:24 +0000 |
commit | d8cbd9f61b4f17e66988182d3ab66022b1acf6df (patch) | |
tree | 15b4bbb92955aa5eabd74b2b3b25dca9a79671e0 /src | |
parent | d4a590efc9b941652f50685df40769f10139f187 (diff) | |
download | openbsd-d8cbd9f61b4f17e66988182d3ab66022b1acf6df.tar.gz openbsd-d8cbd9f61b4f17e66988182d3ab66022b1acf6df.tar.bz2 openbsd-d8cbd9f61b4f17e66988182d3ab66022b1acf6df.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 'src')
-rw-r--r-- | src/lib/libssl/d1_pkt.c | 5 | ||||
-rw-r--r-- | src/lib/libssl/s3_pkt.c | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/d1_pkt.c | 5 | ||||
-rw-r--r-- | src/lib/libssl/src/ssl/s3_pkt.c | 4 |
4 files changed, 8 insertions, 10 deletions
diff --git a/src/lib/libssl/d1_pkt.c b/src/lib/libssl/d1_pkt.c index 4e306829bc..c855d0e2a6 100644 --- a/src/lib/libssl/d1_pkt.c +++ b/src/lib/libssl/d1_pkt.c | |||
@@ -731,9 +731,8 @@ dtls1_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek) | |||
731 | if (!ssl3_setup_buffers(s)) | 731 | if (!ssl3_setup_buffers(s)) |
732 | return (-1); | 732 | return (-1); |
733 | 733 | ||
734 | /* XXX: check what the second '&& type' is about */ | 734 | if ((type && |
735 | if ((type && (type != SSL3_RT_APPLICATION_DATA) && | 735 | type != SSL3_RT_APPLICATION_DATA && type != SSL3_RT_HANDSHAKE) || |
736 | (type != SSL3_RT_HANDSHAKE) && type) || | ||
737 | (peek && (type != SSL3_RT_APPLICATION_DATA))) { | 736 | (peek && (type != SSL3_RT_APPLICATION_DATA))) { |
738 | SSLerr(SSL_F_DTLS1_READ_BYTES, ERR_R_INTERNAL_ERROR); | 737 | SSLerr(SSL_F_DTLS1_READ_BYTES, ERR_R_INTERNAL_ERROR); |
739 | return -1; | 738 | return -1; |
diff --git a/src/lib/libssl/s3_pkt.c b/src/lib/libssl/s3_pkt.c index da6c860cfc..3a167f058c 100644 --- a/src/lib/libssl/s3_pkt.c +++ b/src/lib/libssl/s3_pkt.c | |||
@@ -907,8 +907,8 @@ ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek) | |||
907 | return -1; | 907 | return -1; |
908 | } | 908 | } |
909 | 909 | ||
910 | if ((type && (type != SSL3_RT_APPLICATION_DATA) && | 910 | if ((type && |
911 | (type != SSL3_RT_HANDSHAKE) && type) || | 911 | type != SSL3_RT_APPLICATION_DATA && type != SSL3_RT_HANDSHAKE) || |
912 | (peek && (type != SSL3_RT_APPLICATION_DATA))) { | 912 | (peek && (type != SSL3_RT_APPLICATION_DATA))) { |
913 | SSLerr(SSL_F_SSL3_READ_BYTES, ERR_R_INTERNAL_ERROR); | 913 | SSLerr(SSL_F_SSL3_READ_BYTES, ERR_R_INTERNAL_ERROR); |
914 | return -1; | 914 | return -1; |
diff --git a/src/lib/libssl/src/ssl/d1_pkt.c b/src/lib/libssl/src/ssl/d1_pkt.c index 4e306829bc..c855d0e2a6 100644 --- a/src/lib/libssl/src/ssl/d1_pkt.c +++ b/src/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) | |||
731 | if (!ssl3_setup_buffers(s)) | 731 | if (!ssl3_setup_buffers(s)) |
732 | return (-1); | 732 | return (-1); |
733 | 733 | ||
734 | /* XXX: check what the second '&& type' is about */ | 734 | if ((type && |
735 | if ((type && (type != SSL3_RT_APPLICATION_DATA) && | 735 | type != SSL3_RT_APPLICATION_DATA && type != SSL3_RT_HANDSHAKE) || |
736 | (type != SSL3_RT_HANDSHAKE) && type) || | ||
737 | (peek && (type != SSL3_RT_APPLICATION_DATA))) { | 736 | (peek && (type != SSL3_RT_APPLICATION_DATA))) { |
738 | SSLerr(SSL_F_DTLS1_READ_BYTES, ERR_R_INTERNAL_ERROR); | 737 | SSLerr(SSL_F_DTLS1_READ_BYTES, ERR_R_INTERNAL_ERROR); |
739 | return -1; | 738 | return -1; |
diff --git a/src/lib/libssl/src/ssl/s3_pkt.c b/src/lib/libssl/src/ssl/s3_pkt.c index da6c860cfc..3a167f058c 100644 --- a/src/lib/libssl/src/ssl/s3_pkt.c +++ b/src/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) | |||
907 | return -1; | 907 | return -1; |
908 | } | 908 | } |
909 | 909 | ||
910 | if ((type && (type != SSL3_RT_APPLICATION_DATA) && | 910 | if ((type && |
911 | (type != SSL3_RT_HANDSHAKE) && type) || | 911 | type != SSL3_RT_APPLICATION_DATA && type != SSL3_RT_HANDSHAKE) || |
912 | (peek && (type != SSL3_RT_APPLICATION_DATA))) { | 912 | (peek && (type != SSL3_RT_APPLICATION_DATA))) { |
913 | SSLerr(SSL_F_SSL3_READ_BYTES, ERR_R_INTERNAL_ERROR); | 913 | SSLerr(SSL_F_SSL3_READ_BYTES, ERR_R_INTERNAL_ERROR); |
914 | return -1; | 914 | return -1; |