add ca cache callback test to client

This commit is contained in:
toddouska 2012-01-26 12:52:54 -08:00
parent ee46bcce4a
commit a475803eea
2 changed files with 11 additions and 0 deletions

View File

@ -571,6 +571,13 @@ static int myVerify(int preverify, X509_STORE_CTX* store)
#endif /* VERIFY_CALLBACK */
static INLINE void CaCb(unsigned char* der, int sz, int type)
{
printf("Got CA cache add callback, derSz = %d, type = %d\n", sz, type);
}
static INLINE void SetDH(CYASSL* ssl)
{
/* dh1024 p */

View File

@ -117,6 +117,10 @@ void client_test(void* args)
CyaSSL_CTX_set_cipher_list(ctx, "AES256-SHA");
#endif
#ifdef USER_CA_CB
CyaSSL_CTX_SetCACb(ctx, CaCb);
#endif
#ifndef NO_FILESYSTEM
if (CyaSSL_CTX_load_verify_locations(ctx, caCert, 0) != SSL_SUCCESS)
err_sys("can't load ca file, Please run from CyaSSL home dir");