diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2015-01-23 02:49:16 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2015-02-03 14:50:07 +0000 |
commit | 0cfb0e75b9dbf1a605c47e1b79c76d43a1f8344d (patch) | |
tree | cc9908361d4c930687b29e0457d46ea73a48e7de /ssl/d1_srvr.c | |
parent | ddc06b35565d9f2888e8d946ee7ae292bc902afd (diff) |
Add extms support to master key generation.
Update master secret calculation to support extended master secret.
TLS 1.2 client authentication adds a complication because we need to
cache the handshake messages. This is simpllified however because
the point at which the handshake hashes are calculated for extended
master secret is identical to that required for TLS 1.2 client
authentication (immediately after client key exchange which is also
immediately before certificate verify).
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'ssl/d1_srvr.c')
-rw-r--r-- | ssl/d1_srvr.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/ssl/d1_srvr.c b/ssl/d1_srvr.c index 1ccdc35e4d..55d37e78b0 100644 --- a/ssl/d1_srvr.c +++ b/ssl/d1_srvr.c @@ -655,17 +655,19 @@ int dtls1_accept(SSL *s) s->init_num = 0; if (!s->session->peer) break; - /* - * For sigalgs freeze the handshake buffer at this point and - * digest cached records. - */ if (!s->s3->handshake_buffer) { SSLerr(SSL_F_DTLS1_ACCEPT, ERR_R_INTERNAL_ERROR); return -1; } - s->s3->flags |= TLS1_FLAGS_KEEP_HANDSHAKE; - if (!ssl3_digest_cached_records(s)) - return -1; + /* + * For sigalgs freeze the handshake buffer. If we support + * extms we've done this already. + */ + if (!(s->s3->flags & SSL_SESS_FLAG_EXTMS)) { + s->s3->flags |= TLS1_FLAGS_KEEP_HANDSHAKE; + if (!ssl3_digest_cached_records(s)) + return -1; + } } else { s->state = SSL3_ST_SR_CERT_VRFY_A; s->init_num = 0; |