diff options
author | jsing <> | 2017-01-22 09:02:07 +0000 |
---|---|---|
committer | jsing <> | 2017-01-22 09:02:07 +0000 |
commit | fcfe199cc99431d4e250ada852b3989b210b67ca (patch) | |
tree | 74edac7239262d369a6f63b69bea3291a4184000 /src/lib/libssl/d1_both.c | |
parent | 0356ccc6b32439d6cef453be9bd3c4786baa75d3 (diff) | |
download | openbsd-fcfe199cc99431d4e250ada852b3989b210b67ca.tar.gz openbsd-fcfe199cc99431d4e250ada852b3989b210b67ca.tar.bz2 openbsd-fcfe199cc99431d4e250ada852b3989b210b67ca.zip |
Move most of the SSL3_STATE fields to internal - the ones that remain are
known to be used by ports.
ok beck@
Diffstat (limited to 'src/lib/libssl/d1_both.c')
-rw-r--r-- | src/lib/libssl/d1_both.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/lib/libssl/d1_both.c b/src/lib/libssl/d1_both.c index d83df1c9a0..2ee4a7ffcf 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.41 2017/01/22 07:16:38 beck Exp $ */ | 1 | /* $OpenBSD: d1_both.c,v 1.42 2017/01/22 09:02:07 jsing 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. |
@@ -403,12 +403,12 @@ dtls1_get_message(SSL *s, int st1, int stn, int mt, long max, int *ok) | |||
403 | unsigned long msg_len; | 403 | unsigned long msg_len; |
404 | 404 | ||
405 | /* | 405 | /* |
406 | * s3->tmp is used to store messages that are unexpected, caused | 406 | * s3->internal->tmp is used to store messages that are unexpected, caused |
407 | * by the absence of an optional handshake message | 407 | * by the absence of an optional handshake message |
408 | */ | 408 | */ |
409 | if (s->s3->tmp.reuse_message) { | 409 | if (S3I(s)->tmp.reuse_message) { |
410 | s->s3->tmp.reuse_message = 0; | 410 | S3I(s)->tmp.reuse_message = 0; |
411 | if ((mt >= 0) && (s->s3->tmp.message_type != mt)) { | 411 | if ((mt >= 0) && (S3I(s)->tmp.message_type != mt)) { |
412 | al = SSL_AD_UNEXPECTED_MESSAGE; | 412 | al = SSL_AD_UNEXPECTED_MESSAGE; |
413 | SSLerr(SSL_F_DTLS1_GET_MESSAGE, | 413 | SSLerr(SSL_F_DTLS1_GET_MESSAGE, |
414 | SSL_R_UNEXPECTED_MESSAGE); | 414 | SSL_R_UNEXPECTED_MESSAGE); |
@@ -416,7 +416,7 @@ dtls1_get_message(SSL *s, int st1, int stn, int mt, long max, int *ok) | |||
416 | } | 416 | } |
417 | *ok = 1; | 417 | *ok = 1; |
418 | s->init_msg = s->init_buf->data + DTLS1_HM_HEADER_LENGTH; | 418 | s->init_msg = s->init_buf->data + DTLS1_HM_HEADER_LENGTH; |
419 | s->init_num = (int)s->s3->tmp.message_size; | 419 | s->init_num = (int)S3I(s)->tmp.message_size; |
420 | return s->init_num; | 420 | return s->init_num; |
421 | } | 421 | } |
422 | 422 | ||
@@ -499,9 +499,9 @@ dtls1_preprocess_fragment(SSL *s, struct hm_header_st *msg_hdr, int max) | |||
499 | return SSL_AD_INTERNAL_ERROR; | 499 | return SSL_AD_INTERNAL_ERROR; |
500 | } | 500 | } |
501 | 501 | ||
502 | s->s3->tmp.message_size = msg_len; | 502 | S3I(s)->tmp.message_size = msg_len; |
503 | D1I(s)->r_msg_hdr.msg_len = msg_len; | 503 | D1I(s)->r_msg_hdr.msg_len = msg_len; |
504 | s->s3->tmp.message_type = msg_hdr->type; | 504 | S3I(s)->tmp.message_type = msg_hdr->type; |
505 | D1I(s)->r_msg_hdr.type = msg_hdr->type; | 505 | D1I(s)->r_msg_hdr.type = msg_hdr->type; |
506 | D1I(s)->r_msg_hdr.seq = msg_hdr->seq; | 506 | D1I(s)->r_msg_hdr.seq = msg_hdr->seq; |
507 | } else if (msg_len != D1I(s)->r_msg_hdr.msg_len) { | 507 | } else if (msg_len != D1I(s)->r_msg_hdr.msg_len) { |
@@ -905,8 +905,8 @@ f_err: | |||
905 | /* | 905 | /* |
906 | * for these 2 messages, we need to | 906 | * for these 2 messages, we need to |
907 | * ssl->enc_read_ctx re-init | 907 | * ssl->enc_read_ctx re-init |
908 | * ssl->s3->read_sequence zero | 908 | * ssl->s3->internal->read_sequence zero |
909 | * ssl->s3->read_mac_secret re-init | 909 | * ssl->s3->internal->read_mac_secret re-init |
910 | * ssl->session->read_sym_enc assign | 910 | * ssl->session->read_sym_enc assign |
911 | * ssl->session->read_hash assign | 911 | * ssl->session->read_hash assign |
912 | */ | 912 | */ |
@@ -1132,10 +1132,10 @@ dtls1_retransmit_message(SSL *s, unsigned short seq, unsigned long frag_off, | |||
1132 | 1132 | ||
1133 | if (frag->msg_header.saved_retransmit_state.epoch == | 1133 | if (frag->msg_header.saved_retransmit_state.epoch == |
1134 | saved_state.epoch - 1) { | 1134 | saved_state.epoch - 1) { |
1135 | memcpy(save_write_sequence, s->s3->write_sequence, | 1135 | memcpy(save_write_sequence, S3I(s)->write_sequence, |
1136 | sizeof(s->s3->write_sequence)); | 1136 | sizeof(S3I(s)->write_sequence)); |
1137 | memcpy(s->s3->write_sequence, D1I(s)->last_write_sequence, | 1137 | memcpy(S3I(s)->write_sequence, D1I(s)->last_write_sequence, |
1138 | sizeof(s->s3->write_sequence)); | 1138 | sizeof(S3I(s)->write_sequence)); |
1139 | } | 1139 | } |
1140 | 1140 | ||
1141 | ret = dtls1_do_write(s, frag->msg_header.is_ccs ? | 1141 | ret = dtls1_do_write(s, frag->msg_header.is_ccs ? |
@@ -1149,10 +1149,10 @@ dtls1_retransmit_message(SSL *s, unsigned short seq, unsigned long frag_off, | |||
1149 | 1149 | ||
1150 | if (frag->msg_header.saved_retransmit_state.epoch == | 1150 | if (frag->msg_header.saved_retransmit_state.epoch == |
1151 | saved_state.epoch - 1) { | 1151 | saved_state.epoch - 1) { |
1152 | memcpy(D1I(s)->last_write_sequence, s->s3->write_sequence, | 1152 | memcpy(D1I(s)->last_write_sequence, S3I(s)->write_sequence, |
1153 | sizeof(s->s3->write_sequence)); | 1153 | sizeof(S3I(s)->write_sequence)); |
1154 | memcpy(s->s3->write_sequence, save_write_sequence, | 1154 | memcpy(S3I(s)->write_sequence, save_write_sequence, |
1155 | sizeof(s->s3->write_sequence)); | 1155 | sizeof(S3I(s)->write_sequence)); |
1156 | } | 1156 | } |
1157 | 1157 | ||
1158 | D1I(s)->retransmitting = 0; | 1158 | D1I(s)->retransmitting = 0; |