summaryrefslogtreecommitdiff
path: root/src/lib/libssl/d1_both.c
diff options
context:
space:
mode:
authorbeck <>2017-05-07 04:22:24 +0000
committerbeck <>2017-05-07 04:22:24 +0000
commit3b455600d14ddcf2be0dcd2d4765d1b7854cd1c5 (patch)
tree9f980ffff8490ca0af628971a6d8ceb4a23d3b99 /src/lib/libssl/d1_both.c
parent2145114fc4f04a6a75134ef92bc551a976292150 (diff)
downloadopenbsd-3b455600d14ddcf2be0dcd2d4765d1b7854cd1c5.tar.gz
openbsd-3b455600d14ddcf2be0dcd2d4765d1b7854cd1c5.tar.bz2
openbsd-3b455600d14ddcf2be0dcd2d4765d1b7854cd1c5.zip
Move state from ssl->internal to the handshake structure.
while we are at it, convert SSLerror to use a function internally, so that we may later allocate the handshake structure and check for it ok jsing@
Diffstat (limited to 'src/lib/libssl/d1_both.c')
-rw-r--r--src/lib/libssl/d1_both.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libssl/d1_both.c b/src/lib/libssl/d1_both.c
index 0b8999b782..6b86cfc03e 100644
--- a/src/lib/libssl/d1_both.c
+++ b/src/lib/libssl/d1_both.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d1_both.c,v 1.50 2017/03/04 16:32:00 jsing Exp $ */ 1/* $OpenBSD: d1_both.c,v 1.51 2017/05/07 04:22:24 beck Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -850,7 +850,7 @@ again:
850 goto f_err; 850 goto f_err;
851 851
852 /* XDTLS: ressurect this when restart is in place */ 852 /* XDTLS: ressurect this when restart is in place */
853 s->internal->state = stn; 853 S3I(s)->hs.state = stn;
854 854
855 if (frag_len > 0) { 855 if (frag_len > 0) {
856 unsigned char *p = (unsigned char *)s->internal->init_buf->data + DTLS1_HM_HEADER_LENGTH; 856 unsigned char *p = (unsigned char *)s->internal->init_buf->data + DTLS1_HM_HEADER_LENGTH;
@@ -908,7 +908,7 @@ dtls1_send_change_cipher_spec(SSL *s, int a, int b)
908{ 908{
909 unsigned char *p; 909 unsigned char *p;
910 910
911 if (s->internal->state == a) { 911 if (S3I(s)->hs.state == a) {
912 p = (unsigned char *)s->internal->init_buf->data; 912 p = (unsigned char *)s->internal->init_buf->data;
913 *p++=SSL3_MT_CCS; 913 *p++=SSL3_MT_CCS;
914 D1I(s)->handshake_write_seq = D1I(s)->next_handshake_write_seq; 914 D1I(s)->handshake_write_seq = D1I(s)->next_handshake_write_seq;
@@ -922,7 +922,7 @@ dtls1_send_change_cipher_spec(SSL *s, int a, int b)
922 /* buffer the message to handle re-xmits */ 922 /* buffer the message to handle re-xmits */
923 dtls1_buffer_message(s, 1); 923 dtls1_buffer_message(s, 1);
924 924
925 s->internal->state = b; 925 S3I(s)->hs.state = b;
926 } 926 }
927 927
928 /* SSL3_ST_CW_CHANGE_B */ 928 /* SSL3_ST_CW_CHANGE_B */