[gnutls-devel] GnuTLS | tls1.3: server returns early on handshake when no cert is provided by client (!711)
Development of GNU's TLS library
gnutls-devel at lists.gnutls.org
Fri Aug 3 10:52:16 CEST 2018
Daiki Ueno commented on a discussion on lib/handshake-tls13.c:
> + _gnutls_write_uint24(session->security_parameters.prf->output_size, finished+1);
> +
> + ret = _gnutls_buffer_append_data(&session->internals.handshake_hash_buffer, finished,
> + TLS_HANDSHAKE_HEADER_SIZE+session->security_parameters.prf->output_size);
> + if (ret < 0)
> + return gnutls_assert_val(ret);
> +
> + ret = _tls13_derive_secret(session, RMS_MASTER_LABEL, sizeof(RMS_MASTER_LABEL)-1,
> + session->internals.handshake_hash_buffer.data,
> + session->internals.handshake_hash_buffer.length,
> + session->key.proto.tls13.temp_secret,
> + session->key.proto.tls13.ap_rms);
> + if (ret < 0)
> + return gnutls_assert_val(ret);
> +
> + session->internals.handshake_hash_buffer.length = spos;
In that case, that would be fine.
By the way, couldn't this be written like the following to share some code with `generate_rms_keys()`?
```c
spos = session->internals.handshake_hash_buffer.length;
ret = _gnutls_buffer_append_data(&session->internals.handshake_hash_buffer, ...);
session->internals.handshake_hash_buffer_client_finished_len = session->internals.handshake_hash_buffer.length;
session->internals.handshake_hash_buffer.length = spos;
return generate_rms_keys(session);
```
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/711#note_92291898
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20180803/ceff1889/attachment-0001.html>
More information about the Gnutls-devel
mailing list