summaryrefslogtreecommitdiff
path: root/src/lib/libssl/s3_lib.c
diff options
context:
space:
mode:
authorjsing <>2021-07-01 17:53:39 +0000
committerjsing <>2021-07-01 17:53:39 +0000
commita0afc1b4032278e02db285a67fa2e295e9970176 (patch)
tree57d97f559edf3211313bbaee593ec7483ded13e4 /src/lib/libssl/s3_lib.c
parentbd1a6cca8085312ddc750a73ac51cba9231bfcf6 (diff)
downloadopenbsd-a0afc1b4032278e02db285a67fa2e295e9970176.tar.gz
openbsd-a0afc1b4032278e02db285a67fa2e295e9970176.tar.bz2
openbsd-a0afc1b4032278e02db285a67fa2e295e9970176.zip
Merge SSL_METHOD_INTERNAL into SSL_METHOD.
Now that SSL_METHOD is opaque and in internal headers, we can remove SSL_METHOD_INTERNAL by merging it back into SSL_METHOD. ok tb@
Diffstat (limited to 'src/lib/libssl/s3_lib.c')
-rw-r--r--src/lib/libssl/s3_lib.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c
index 0cdf9edd2f..125c108f02 100644
--- a/src/lib/libssl/s3_lib.c
+++ b/src/lib/libssl/s3_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: s3_lib.c,v 1.211 2021/06/30 18:07:50 jsing Exp $ */ 1/* $OpenBSD: s3_lib.c,v 1.212 2021/07/01 17:53:39 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 *
@@ -1548,7 +1548,7 @@ ssl3_new(SSL *s)
1548 return (0); 1548 return (0);
1549 } 1549 }
1550 1550
1551 s->method->internal->ssl_clear(s); 1551 s->method->ssl_clear(s);
1552 1552
1553 return (1); 1553 return (1);
1554} 1554}
@@ -2688,7 +2688,7 @@ ssl3_shutdown(SSL *s)
2688 } 2688 }
2689 } else if (!(s->internal->shutdown & SSL_RECEIVED_SHUTDOWN)) { 2689 } else if (!(s->internal->shutdown & SSL_RECEIVED_SHUTDOWN)) {
2690 /* If we are waiting for a close from our peer, we are closed */ 2690 /* If we are waiting for a close from our peer, we are closed */
2691 s->method->internal->ssl_read_bytes(s, 0, NULL, 0, 0); 2691 s->method->ssl_read_bytes(s, 0, NULL, 0, 0);
2692 if (!(s->internal->shutdown & SSL_RECEIVED_SHUTDOWN)) { 2692 if (!(s->internal->shutdown & SSL_RECEIVED_SHUTDOWN)) {
2693 return(-1); /* return WANT_READ */ 2693 return(-1); /* return WANT_READ */
2694 } 2694 }
@@ -2709,8 +2709,8 @@ ssl3_write(SSL *s, const void *buf, int len)
2709 if (S3I(s)->renegotiate) 2709 if (S3I(s)->renegotiate)
2710 ssl3_renegotiate_check(s); 2710 ssl3_renegotiate_check(s);
2711 2711
2712 return s->method->internal->ssl_write_bytes(s, 2712 return s->method->ssl_write_bytes(s, SSL3_RT_APPLICATION_DATA,
2713 SSL3_RT_APPLICATION_DATA, buf, len); 2713 buf, len);
2714} 2714}
2715 2715
2716static int 2716static int
@@ -2722,8 +2722,9 @@ ssl3_read_internal(SSL *s, void *buf, int len, int peek)
2722 if (S3I(s)->renegotiate) 2722 if (S3I(s)->renegotiate)
2723 ssl3_renegotiate_check(s); 2723 ssl3_renegotiate_check(s);
2724 S3I(s)->in_read_app_data = 1; 2724 S3I(s)->in_read_app_data = 1;
2725 ret = s->method->internal->ssl_read_bytes(s, 2725
2726 SSL3_RT_APPLICATION_DATA, buf, len, peek); 2726 ret = s->method->ssl_read_bytes(s, SSL3_RT_APPLICATION_DATA, buf, len,
2727 peek);
2727 if ((ret == -1) && (S3I(s)->in_read_app_data == 2)) { 2728 if ((ret == -1) && (S3I(s)->in_read_app_data == 2)) {
2728 /* 2729 /*
2729 * ssl3_read_bytes decided to call s->internal->handshake_func, 2730 * ssl3_read_bytes decided to call s->internal->handshake_func,
@@ -2733,8 +2734,8 @@ ssl3_read_internal(SSL *s, void *buf, int len, int peek)
2733 * handshake processing and try to read application data again. 2734 * handshake processing and try to read application data again.
2734 */ 2735 */
2735 s->internal->in_handshake++; 2736 s->internal->in_handshake++;
2736 ret = s->method->internal->ssl_read_bytes(s, 2737 ret = s->method->ssl_read_bytes(s, SSL3_RT_APPLICATION_DATA,
2737 SSL3_RT_APPLICATION_DATA, buf, len, peek); 2738 buf, len, peek);
2738 s->internal->in_handshake--; 2739 s->internal->in_handshake--;
2739 } else 2740 } else
2740 S3I(s)->in_read_app_data = 0; 2741 S3I(s)->in_read_app_data = 0;