summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_pkt.c
diff options
context:
space:
mode:
authorjsing <>2020-10-14 16:57:33 +0000
committerjsing <>2020-10-14 16:57:33 +0000
commite60f5a8fe5ed7844d5dc6f1c9dbcf86fce1ae298 (patch)
tree78cf866b36bb0fdd2fbaafb054ed0c36fcef0747 /src/lib/libssl/ssl_pkt.c
parenta94866305ad306011ef3cb3dade3f2c6c1c5dec0 (diff)
downloadopenbsd-e60f5a8fe5ed7844d5dc6f1c9dbcf86fce1ae298.tar.gz
openbsd-e60f5a8fe5ed7844d5dc6f1c9dbcf86fce1ae298.tar.bz2
openbsd-e60f5a8fe5ed7844d5dc6f1c9dbcf86fce1ae298.zip
Replace SSL_IS_DTLS with SSL_is_dtls().
Garbage collect the now unused SSL_IS_DTLS macro. ok tb@
Diffstat (limited to 'src/lib/libssl/ssl_pkt.c')
-rw-r--r--src/lib/libssl/ssl_pkt.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libssl/ssl_pkt.c b/src/lib/libssl/ssl_pkt.c
index 02a476ea82..4cc1914ecd 100644
--- a/src/lib/libssl/ssl_pkt.c
+++ b/src/lib/libssl/ssl_pkt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_pkt.c,v 1.32 2020/10/03 17:35:16 jsing Exp $ */ 1/* $OpenBSD: ssl_pkt.c,v 1.33 2020/10/14 16:57:33 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -194,7 +194,7 @@ ssl3_read_n(SSL *s, int n, int max, int extend)
194 /* For DTLS/UDP reads should not span multiple packets 194 /* For DTLS/UDP reads should not span multiple packets
195 * because the read operation returns the whole packet 195 * because the read operation returns the whole packet
196 * at once (as long as it fits into the buffer). */ 196 * at once (as long as it fits into the buffer). */
197 if (SSL_IS_DTLS(s)) { 197 if (SSL_is_dtls(s)) {
198 if (left > 0 && n > left) 198 if (left > 0 && n > left)
199 n = left; 199 n = left;
200 } 200 }
@@ -254,7 +254,7 @@ ssl3_read_n(SSL *s, int n, int max, int extend)
254 if (i <= 0) { 254 if (i <= 0) {
255 rb->left = left; 255 rb->left = left;
256 if (s->internal->mode & SSL_MODE_RELEASE_BUFFERS && 256 if (s->internal->mode & SSL_MODE_RELEASE_BUFFERS &&
257 !SSL_IS_DTLS(s)) { 257 !SSL_is_dtls(s)) {
258 if (len + left == 0) 258 if (len + left == 0)
259 ssl3_release_read_buffer(s); 259 ssl3_release_read_buffer(s);
260 } 260 }
@@ -267,7 +267,7 @@ ssl3_read_n(SSL *s, int n, int max, int extend)
267 * the underlying transport protocol is message oriented as 267 * the underlying transport protocol is message oriented as
268 * opposed to byte oriented as in the TLS case. 268 * opposed to byte oriented as in the TLS case.
269 */ 269 */
270 if (SSL_IS_DTLS(s)) { 270 if (SSL_is_dtls(s)) {
271 if (n > left) 271 if (n > left)
272 n = left; /* makes the while condition false */ 272 n = left; /* makes the while condition false */
273 } 273 }
@@ -655,7 +655,7 @@ ssl3_write_pending(SSL *s, int type, const unsigned char *buf, unsigned int len)
655 wb->left = 0; 655 wb->left = 0;
656 wb->offset += i; 656 wb->offset += i;
657 if (s->internal->mode & SSL_MODE_RELEASE_BUFFERS && 657 if (s->internal->mode & SSL_MODE_RELEASE_BUFFERS &&
658 !SSL_IS_DTLS(s)) 658 !SSL_is_dtls(s))
659 ssl3_release_write_buffer(s); 659 ssl3_release_write_buffer(s);
660 s->internal->rwstate = SSL_NOTHING; 660 s->internal->rwstate = SSL_NOTHING;
661 return (S3I(s)->wpend_ret); 661 return (S3I(s)->wpend_ret);
@@ -664,7 +664,7 @@ ssl3_write_pending(SSL *s, int type, const unsigned char *buf, unsigned int len)
664 * For DTLS, just drop it. That's kind of the 664 * For DTLS, just drop it. That's kind of the
665 * whole point in using a datagram service. 665 * whole point in using a datagram service.
666 */ 666 */
667 if (SSL_IS_DTLS(s)) 667 if (SSL_is_dtls(s))
668 wb->left = 0; 668 wb->left = 0;
669 return (i); 669 return (i);
670 } 670 }