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>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user