diff options
author | jsing <> | 2022-02-05 14:54:10 +0000 |
---|---|---|
committer | jsing <> | 2022-02-05 14:54:10 +0000 |
commit | 83e485da0e6d59ae7baf4be882b7d2a569774e84 (patch) | |
tree | da7fe094101bf3711667cf1650e3c6f57a50e2ff /src/lib/libssl/d1_both.c | |
parent | a97d9e9ca8287d1d19559ab919f71b5c5771caeb (diff) | |
download | openbsd-83e485da0e6d59ae7baf4be882b7d2a569774e84.tar.gz openbsd-83e485da0e6d59ae7baf4be882b7d2a569774e84.tar.bz2 openbsd-83e485da0e6d59ae7baf4be882b7d2a569774e84.zip |
Bye bye S3I.
S3I has served us well, however now that libssl is fully opaque it is time
to say goodbye. Aside from removing the calloc/free/memset, the rest is
mechanical sed.
ok inoguchi@ tb@
Diffstat (limited to 'src/lib/libssl/d1_both.c')
-rw-r--r-- | src/lib/libssl/d1_both.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/libssl/d1_both.c b/src/lib/libssl/d1_both.c index 07c868f45e..fd7c07a4d5 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.80 2021/10/23 13:36:03 jsing Exp $ */ | 1 | /* $OpenBSD: d1_both.c,v 1.81 2022/02/05 14:54:10 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. |
@@ -380,15 +380,15 @@ dtls1_get_message(SSL *s, int st1, int stn, int mt, long max) | |||
380 | * s3->internal->tmp is used to store messages that are unexpected, caused | 380 | * s3->internal->tmp is used to store messages that are unexpected, caused |
381 | * by the absence of an optional handshake message | 381 | * by the absence of an optional handshake message |
382 | */ | 382 | */ |
383 | if (S3I(s)->hs.tls12.reuse_message) { | 383 | if (s->s3->hs.tls12.reuse_message) { |
384 | S3I(s)->hs.tls12.reuse_message = 0; | 384 | s->s3->hs.tls12.reuse_message = 0; |
385 | if ((mt >= 0) && (S3I(s)->hs.tls12.message_type != mt)) { | 385 | if ((mt >= 0) && (s->s3->hs.tls12.message_type != mt)) { |
386 | al = SSL_AD_UNEXPECTED_MESSAGE; | 386 | al = SSL_AD_UNEXPECTED_MESSAGE; |
387 | SSLerror(s, SSL_R_UNEXPECTED_MESSAGE); | 387 | SSLerror(s, SSL_R_UNEXPECTED_MESSAGE); |
388 | goto fatal_err; | 388 | goto fatal_err; |
389 | } | 389 | } |
390 | s->internal->init_msg = s->internal->init_buf->data + DTLS1_HM_HEADER_LENGTH; | 390 | s->internal->init_msg = s->internal->init_buf->data + DTLS1_HM_HEADER_LENGTH; |
391 | s->internal->init_num = (int)S3I(s)->hs.tls12.message_size; | 391 | s->internal->init_num = (int)s->s3->hs.tls12.message_size; |
392 | return 1; | 392 | return 1; |
393 | } | 393 | } |
394 | 394 | ||
@@ -463,9 +463,9 @@ dtls1_preprocess_fragment(SSL *s, struct hm_header_st *msg_hdr, int max) | |||
463 | return SSL_AD_INTERNAL_ERROR; | 463 | return SSL_AD_INTERNAL_ERROR; |
464 | } | 464 | } |
465 | 465 | ||
466 | S3I(s)->hs.tls12.message_size = msg_len; | 466 | s->s3->hs.tls12.message_size = msg_len; |
467 | s->d1->r_msg_hdr.msg_len = msg_len; | 467 | s->d1->r_msg_hdr.msg_len = msg_len; |
468 | S3I(s)->hs.tls12.message_type = msg_hdr->type; | 468 | s->s3->hs.tls12.message_type = msg_hdr->type; |
469 | s->d1->r_msg_hdr.type = msg_hdr->type; | 469 | s->d1->r_msg_hdr.type = msg_hdr->type; |
470 | s->d1->r_msg_hdr.seq = msg_hdr->seq; | 470 | s->d1->r_msg_hdr.seq = msg_hdr->seq; |
471 | } else if (msg_len != s->d1->r_msg_hdr.msg_len) { | 471 | } else if (msg_len != s->d1->r_msg_hdr.msg_len) { |
@@ -818,7 +818,7 @@ dtls1_get_message_fragment(SSL *s, int st1, int stn, long max, int *ok) | |||
818 | goto fatal_err; | 818 | goto fatal_err; |
819 | 819 | ||
820 | /* XDTLS: ressurect this when restart is in place */ | 820 | /* XDTLS: ressurect this when restart is in place */ |
821 | S3I(s)->hs.state = stn; | 821 | s->s3->hs.state = stn; |
822 | 822 | ||
823 | if (frag_len > 0) { | 823 | if (frag_len > 0) { |
824 | unsigned char *p = (unsigned char *)s->internal->init_buf->data + DTLS1_HM_HEADER_LENGTH; | 824 | unsigned char *p = (unsigned char *)s->internal->init_buf->data + DTLS1_HM_HEADER_LENGTH; |