Finish OCSP response issuer finding function

The function follows RFC 6960 and uses either the responder's name or
the responder's hash of their key as available in the OCSP response to
locate the correct issuer certificate.

To avoid code duplication, some functionality from x509_crt.c module
was moved to x509.c and made public in x509.h.
This commit is contained in:
Andres Amaya Garcia
2017-11-10 19:39:43 +00:00
parent eb00356168
commit 9b0136dcb9
4 changed files with 163 additions and 103 deletions

View File

@@ -287,6 +287,9 @@ int mbedtls_x509_self_test( int verbose );
* Internal module functions. You probably do not want to use these unless you
* know you do.
*/
int mbedtls_x509_serial_cmp( const mbedtls_x509_buf *a, const mbedtls_x509_buf *b );
int mbedtls_x509_memcasecmp( const void *s1, const void *s2, size_t len );
int mbedtls_x509_name_cmp( const mbedtls_x509_name *a, const mbedtls_x509_name *b );
int mbedtls_x509_get_name( unsigned char **p, const unsigned char *end,
mbedtls_x509_name *cur );
int mbedtls_x509_get_alg_null( unsigned char **p, const unsigned char *end,