Split up X509 files into smaller modules
This commit is contained in:
parent
ace02867f6
commit
7c6b2c320e
31 changed files with 3838 additions and 3212 deletions
|
@ -54,8 +54,12 @@
|
|||
#include "aes.h"
|
||||
#endif
|
||||
|
||||
#if defined(POLARSSL_X509_PARSE_C)
|
||||
#include "x509.h"
|
||||
#if defined(POLARSSL_X509_CRT_PARSE_C)
|
||||
#include "x509_crt.h"
|
||||
#endif
|
||||
|
||||
#if defined(POLARSSL_X509_CRL_PARSE_C)
|
||||
#include "x509_crl.h"
|
||||
#endif
|
||||
|
||||
#if defined(POLARSSL_DHM_C)
|
||||
|
@ -406,9 +410,9 @@ struct _ssl_session
|
|||
unsigned char id[32]; /*!< session identifier */
|
||||
unsigned char master[48]; /*!< the master secret */
|
||||
|
||||
#if defined(POLARSSL_X509_PARSE_C)
|
||||
#if defined(POLARSSL_X509_CRT_PARSE_C)
|
||||
x509_cert *peer_cert; /*!< peer X.509 cert chain */
|
||||
#endif /* POLARSSL_X509_PARSE_C */
|
||||
#endif /* POLARSSL_X509_CRT_PARSE_C */
|
||||
int verify_result; /*!< verification result */
|
||||
|
||||
#if defined(POLARSSL_SSL_SESSION_TICKETS)
|
||||
|
@ -579,7 +583,7 @@ struct _ssl_context
|
|||
void *p_sni; /*!< context for SNI extension */
|
||||
#endif
|
||||
|
||||
#if defined(POLARSSL_X509_PARSE_C)
|
||||
#if defined(POLARSSL_X509_CRT_PARSE_C)
|
||||
int (*f_vrfy)(void *, x509_cert *, int, int *);
|
||||
void *p_vrfy; /*!< context for verification */
|
||||
#endif
|
||||
|
@ -642,12 +646,14 @@ struct _ssl_context
|
|||
pk_context *pk_key; /*!< own private key */
|
||||
int pk_key_own_alloc; /*!< did we allocate pk_key? */
|
||||
|
||||
#if defined(POLARSSL_X509_PARSE_C)
|
||||
#if defined(POLARSSL_X509_CRT_PARSE_C)
|
||||
x509_cert *own_cert; /*!< own X.509 certificate */
|
||||
x509_cert *ca_chain; /*!< own trusted CA chain */
|
||||
x509_crl *ca_crl; /*!< trusted CA CRLs */
|
||||
const char *peer_cn; /*!< expected peer CN */
|
||||
#endif /* POLARSSL_X509_PARSE_C */
|
||||
#endif /* POLARSSL_X509_CRT_PARSE_C */
|
||||
#if defined(POLARSSL_X509_CRL_PARSE_C)
|
||||
x509_crl *ca_crl; /*!< trusted CA CRLs */
|
||||
#endif /* POLARSSL_X509_CRL_PARSE_C */
|
||||
|
||||
#if defined(POLARSSL_SSL_SESSION_TICKETS)
|
||||
/*
|
||||
|
@ -806,7 +812,7 @@ void ssl_set_endpoint( ssl_context *ssl, int endpoint );
|
|||
*/
|
||||
void ssl_set_authmode( ssl_context *ssl, int authmode );
|
||||
|
||||
#if defined(POLARSSL_X509_PARSE_C)
|
||||
#if defined(POLARSSL_X509_CRT_PARSE_C)
|
||||
/**
|
||||
* \brief Set the verification callback (Optional).
|
||||
*
|
||||
|
@ -821,7 +827,7 @@ void ssl_set_authmode( ssl_context *ssl, int authmode );
|
|||
void ssl_set_verify( ssl_context *ssl,
|
||||
int (*f_vrfy)(void *, x509_cert *, int, int *),
|
||||
void *p_vrfy );
|
||||
#endif /* POLARSSL_X509_PARSE_C */
|
||||
#endif /* POLARSSL_X509_CRT_PARSE_C */
|
||||
|
||||
/**
|
||||
* \brief Set the random number generator callback
|
||||
|
@ -941,7 +947,7 @@ void ssl_set_ciphersuites_for_version( ssl_context *ssl,
|
|||
const int *ciphersuites,
|
||||
int major, int minor );
|
||||
|
||||
#if defined(POLARSSL_X509_PARSE_C)
|
||||
#if defined(POLARSSL_X509_CRT_PARSE_C)
|
||||
/**
|
||||
* \brief Set the data required to verify peer certificate
|
||||
*
|
||||
|
@ -1011,7 +1017,7 @@ int ssl_set_own_cert_alt( ssl_context *ssl, x509_cert *own_cert,
|
|||
rsa_decrypt_func rsa_decrypt,
|
||||
rsa_sign_func rsa_sign,
|
||||
rsa_key_len_func rsa_key_len );
|
||||
#endif /* POLARSSL_X509_PARSE_C */
|
||||
#endif /* POLARSSL_X509_CRT_PARSE_C */
|
||||
|
||||
#if defined(POLARSSL_KEY_EXCHANGE_PSK_ENABLED)
|
||||
/**
|
||||
|
@ -1272,7 +1278,7 @@ const char *ssl_get_ciphersuite( const ssl_context *ssl );
|
|||
*/
|
||||
const char *ssl_get_version( const ssl_context *ssl );
|
||||
|
||||
#if defined(POLARSSL_X509_PARSE_C)
|
||||
#if defined(POLARSSL_X509_CRT_PARSE_C)
|
||||
/**
|
||||
* \brief Return the peer certificate from the current connection
|
||||
*
|
||||
|
@ -1288,7 +1294,7 @@ const char *ssl_get_version( const ssl_context *ssl );
|
|||
* \return the current peer certificate
|
||||
*/
|
||||
const x509_cert *ssl_get_peer_cert( const ssl_context *ssl );
|
||||
#endif /* POLARSSL_X509_PARSE_C */
|
||||
#endif /* POLARSSL_X509_CRT_PARSE_C */
|
||||
|
||||
/**
|
||||
* \brief Save session in order to resume it later (client-side only)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue