[gnutls-devel] GnuTLS | TLS 1.3: calculate ticket age based on higher precision time (!785)
Development of GNU's TLS library
gnutls-devel at lists.gnutls.org
Thu Oct 25 14:11:32 CEST 2018
New Merge Request !785
https://gitlab.com/gnutls/gnutls/merge_requests/785
Branches: tmp-session-ticket-timestamp to master
Author: Daiki Ueno
Assignee:
Approvers: Simon Josefsson, Nikos Mavrogiannopoulos, Dmitry Eremin-Solenikov, Hubert Kario, Tim Rühsen, Andreas Metzler, Tom, Ander Juaristi, Tomáš Mráz, Anderson Sasaki and GnuTLS devel mailing list
Previously, the client's view of ticket age was calculated from the time in seconds, something like:
```
time_t cur_time = gnutls_time(0);
(cur_time - ticket->timestamp) * 1000;
```
while the RFC 8446 explicitly says that ticket ages are in milliseconds. This prevents implementing freshness checks correctly as in !782.
This MR consists of 3 parts:
- use `struct timespec` for ticket arrival time, which is the baseline of ticket age
- add a means to replace `gettime()` function extensively used in the library for testing
- other refactoring and fixes
## Checklist
* [ ] Code modified for feature
* [ ] Test suite updated with functionality tests
* [ ] Test suite updated with negative tests
* [ ] Documentation updated
## Reviewer's checklist:
* [ ] Any issues marked for closing are addressed
* [ ] There is a test suite reasonably covering new functionality or modifications
* [ ] Function naming, parameters, return values, types, etc., are consistent and according to `CONTRIBUTION.md`
* [ ] This feature/change has adequate documentation added
* [ ] No obvious mistakes in the code
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/785
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/20181025/d9fb1ac4/attachment.html>
More information about the Gnutls-devel
mailing list