summaryrefslogtreecommitdiff
path: root/src/lib/libssl/src
diff options
context:
space:
mode:
authormiod <>2014-05-27 18:51:24 +0000
committermiod <>2014-05-27 18:51:24 +0000
commit523f664304506a71f31a45d381c552dc4eecfacb (patch)
tree15b4bbb92955aa5eabd74b2b3b25dca9a79671e0 /src/lib/libssl/src
parent7c4ac5154e30ebd25a22c0dc2527c1887d8700ee (diff)
downloadopenbsd-523f664304506a71f31a45d381c552dc4eecfacb.tar.gz
openbsd-523f664304506a71f31a45d381c552dc4eecfacb.tar.bz2
openbsd-523f664304506a71f31a45d381c552dc4eecfacb.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/lib/libssl/src')
-rw-r--r--src/lib/libssl/src/ssl/d1_pkt.c5
-rw-r--r--src/lib/libssl/src/ssl/s3_pkt.c4
2 files changed, 4 insertions, 5 deletions
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;