summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_pkt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/ssl_pkt.c')
-rw-r--r--src/lib/libssl/ssl_pkt.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/libssl/ssl_pkt.c b/src/lib/libssl/ssl_pkt.c
index 8126c42d1d..4302794d94 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.21 2020/03/10 17:02:21 jsing Exp $ */ 1/* $OpenBSD: ssl_pkt.c,v 1.22 2020/03/12 17:01:53 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 *
@@ -152,7 +152,7 @@ ssl3_read_n(SSL *s, int n, int max, int extend)
152 int i, len, left; 152 int i, len, left;
153 size_t align; 153 size_t align;
154 unsigned char *pkt; 154 unsigned char *pkt;
155 SSL3_BUFFER *rb; 155 SSL3_BUFFER_INTERNAL *rb;
156 156
157 if (n <= 0) 157 if (n <= 0)
158 return n; 158 return n;
@@ -329,7 +329,7 @@ ssl3_get_record(SSL *s)
329{ 329{
330 int al; 330 int al;
331 int enc_err, n, i, ret = -1; 331 int enc_err, n, i, ret = -1;
332 SSL3_RECORD *rr; 332 SSL3_RECORD_INTERNAL *rr;
333 SSL_SESSION *sess; 333 SSL_SESSION *sess;
334 unsigned char md[EVP_MAX_MD_SIZE]; 334 unsigned char md[EVP_MAX_MD_SIZE];
335 unsigned mac_size, orig_len; 335 unsigned mac_size, orig_len;
@@ -360,7 +360,7 @@ ssl3_get_record(SSL *s)
360 360
361 CBS_init(&header, s->internal->packet, SSL3_RT_HEADER_LENGTH); 361 CBS_init(&header, s->internal->packet, SSL3_RT_HEADER_LENGTH);
362 362
363 /* Pull apart the header into the SSL3_RECORD */ 363 /* Pull apart the header into the SSL3_RECORD_INTERNAL */
364 if (!CBS_get_u8(&header, &type) || 364 if (!CBS_get_u8(&header, &type) ||
365 !CBS_get_u16(&header, &ssl_version) || 365 !CBS_get_u16(&header, &ssl_version) ||
366 !CBS_get_u16(&header, &len)) { 366 !CBS_get_u16(&header, &len)) {
@@ -621,7 +621,7 @@ static int
621ssl3_create_record(SSL *s, unsigned char *p, int type, const unsigned char *buf, 621ssl3_create_record(SSL *s, unsigned char *p, int type, const unsigned char *buf,
622 unsigned int len) 622 unsigned int len)
623{ 623{
624 SSL3_RECORD *wr = &(S3I(s)->wrec); 624 SSL3_RECORD_INTERNAL *wr = &(S3I(s)->wrec);
625 SSL_SESSION *sess = s->session; 625 SSL_SESSION *sess = s->session;
626 int eivlen, mac_size; 626 int eivlen, mac_size;
627 uint16_t version; 627 uint16_t version;
@@ -729,8 +729,8 @@ ssl3_create_record(SSL *s, unsigned char *p, int type, const unsigned char *buf,
729static int 729static int
730do_ssl3_write(SSL *s, int type, const unsigned char *buf, unsigned int len) 730do_ssl3_write(SSL *s, int type, const unsigned char *buf, unsigned int len)
731{ 731{
732 SSL3_RECORD *wr = &(S3I(s)->wrec); 732 SSL3_RECORD_INTERNAL *wr = &(S3I(s)->wrec);
733 SSL3_BUFFER *wb = &(S3I(s)->wbuf); 733 SSL3_BUFFER_INTERNAL *wb = &(S3I(s)->wbuf);
734 SSL_SESSION *sess = s->session; 734 SSL_SESSION *sess = s->session;
735 unsigned char *p; 735 unsigned char *p;
736 int i, clear = 0; 736 int i, clear = 0;
@@ -741,7 +741,7 @@ do_ssl3_write(SSL *s, int type, const unsigned char *buf, unsigned int len)
741 if (!ssl3_setup_write_buffer(s)) 741 if (!ssl3_setup_write_buffer(s))
742 return -1; 742 return -1;
743 743
744 /* first check if there is a SSL3_BUFFER still being written 744 /* first check if there is a SSL3_BUFFER_INTERNAL still being written
745 * out. This will happen with non blocking IO */ 745 * out. This will happen with non blocking IO */
746 if (wb->left != 0) 746 if (wb->left != 0)
747 return (ssl3_write_pending(s, type, buf, len)); 747 return (ssl3_write_pending(s, type, buf, len));
@@ -830,7 +830,7 @@ int
830ssl3_write_pending(SSL *s, int type, const unsigned char *buf, unsigned int len) 830ssl3_write_pending(SSL *s, int type, const unsigned char *buf, unsigned int len)
831{ 831{
832 int i; 832 int i;
833 SSL3_BUFFER *wb = &(S3I(s)->wbuf); 833 SSL3_BUFFER_INTERNAL *wb = &(S3I(s)->wbuf);
834 834
835 /* XXXX */ 835 /* XXXX */
836 if ((S3I(s)->wpend_tot > (int)len) || ((S3I(s)->wpend_buf != buf) && 836 if ((S3I(s)->wpend_tot > (int)len) || ((S3I(s)->wpend_buf != buf) &&
@@ -906,7 +906,7 @@ ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek)
906 void (*cb)(const SSL *ssl, int type2, int val) = NULL; 906 void (*cb)(const SSL *ssl, int type2, int val) = NULL;
907 int al, i, j, ret, rrcount = 0; 907 int al, i, j, ret, rrcount = 0;
908 unsigned int n; 908 unsigned int n;
909 SSL3_RECORD *rr; 909 SSL3_RECORD_INTERNAL *rr;
910 910
911 if (S3I(s)->rbuf.buf == NULL) /* Not initialized yet */ 911 if (S3I(s)->rbuf.buf == NULL) /* Not initialized yet */
912 if (!ssl3_setup_read_buffer(s)) 912 if (!ssl3_setup_read_buffer(s))