diff options
author | jsing <> | 2018-11-21 15:13:29 +0000 |
---|---|---|
committer | jsing <> | 2018-11-21 15:13:29 +0000 |
commit | ab91451e6ebf1260022c78c25a334e437c04d78e (patch) | |
tree | 7992535c747d2aff7dd9a131f8fc65ad2af3636d /src/lib/libssl/ssl_locl.h | |
parent | 1b50b4396296c64d8937c2ec1c7ed2eb5547cf91 (diff) | |
download | openbsd-ab91451e6ebf1260022c78c25a334e437c04d78e.tar.gz openbsd-ab91451e6ebf1260022c78c25a334e437c04d78e.tar.bz2 openbsd-ab91451e6ebf1260022c78c25a334e437c04d78e.zip |
Fix DTLS transcript handling for HelloVerifyRequest.
If DTLS sees a HelloVerifyRequest the transcript is reset - the previous
tls1_init_finished_mac() function could be called multiple times and would
discard any existing state. The replacement tls1_transcript_init() is more
strict and fails if a transcript already exists.
Provide an explicit tls1_transcript_reset() function and call it from the
appropriate places. This also lets us make DTLS less of a special snowflake
and call tls1_transcript_init() in the same place as used for TLS.
ok beck@ tb@
Diffstat (limited to 'src/lib/libssl/ssl_locl.h')
-rw-r--r-- | src/lib/libssl/ssl_locl.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h index 50806d1b18..94bb76eca3 100644 --- a/src/lib/libssl/ssl_locl.h +++ b/src/lib/libssl/ssl_locl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_locl.h,v 1.224 2018/11/10 01:19:09 beck Exp $ */ | 1 | /* $OpenBSD: ssl_locl.h,v 1.225 2018/11/21 15:13:29 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 | * |
@@ -1242,6 +1242,7 @@ void tls1_handshake_hash_free(SSL *s); | |||
1242 | 1242 | ||
1243 | int tls1_transcript_init(SSL *s); | 1243 | int tls1_transcript_init(SSL *s); |
1244 | void tls1_transcript_free(SSL *s); | 1244 | void tls1_transcript_free(SSL *s); |
1245 | void tls1_transcript_reset(SSL *s); | ||
1245 | int tls1_transcript_append(SSL *s, const unsigned char *buf, size_t len); | 1246 | int tls1_transcript_append(SSL *s, const unsigned char *buf, size_t len); |
1246 | int tls1_transcript_data(SSL *s, const unsigned char **data, size_t *len); | 1247 | int tls1_transcript_data(SSL *s, const unsigned char **data, size_t *len); |
1247 | void tls1_transcript_freeze(SSL *s); | 1248 | void tls1_transcript_freeze(SSL *s); |