Files
mbedtls/include/mbedtls
Hanno Becker 67284cce00 Add abort condition callback to mbedtls_x509_name_cmp_raw()
There are three operations that need to be performed on an X.509 name:
1 Initial traversal to check well-formedness of the ASN.1 structure.
2 Comparison between two X.509 name sequences.
3 Checking whether an X.509 name matches a client's ServerName request.

Each of these tasks involves traversing the nested ASN.1 structure,
In the interest of saving code, we aim to provide a single function
which can perform all of the above tasks.

The existing comparison function is already suitable not only for task 2,
but also for 1: One can simply pass two equal ASN.1 name buffers, in which
case the function will succeed if and only if that buffer is a well-formed
ASN.1 name.

This commit further adds a callback to `mbedtls_x509_name_cmp_raw()` which
is called after each successful step in the simultaneous name traversal and
comparison; it may perform any operation on the current name and potentially
signal that the comparison should be aborted.

With that, task 3 can be implemented by passing equal names and a callback
which aborts as soon as it finds the desired name component.
2019-06-25 09:06:26 +01:00
..
2019-04-24 10:51:54 +02:00
2019-04-24 10:51:54 +02:00
2018-07-01 10:22:53 +03:00
2018-12-28 11:11:10 +08:00
2018-12-16 12:02:50 +02:00
2019-02-21 16:58:20 +01:00
2018-12-16 12:02:50 +02:00
2019-04-24 10:51:54 +02:00
2018-12-16 12:02:50 +02:00
2018-12-28 11:11:10 +08:00
2018-12-28 11:11:10 +08:00
2019-03-19 16:20:02 +00:00
2019-06-18 11:05:44 +01:00