allows one to set the cyassl ex_data to null

pull/1/head
John Safranek 2012-03-23 14:39:37 -07:00
parent 53c7f4d5a9
commit d3efce71c9
3 changed files with 5 additions and 5 deletions

View File

@ -1069,7 +1069,7 @@ struct CYASSL {
CYASSL_X509 peerCert; /* X509 peer cert */
#endif
#ifdef FORTRESS
void* ex_data[MAX_EX_DATA];
void* ex_data[MAX_EX_DATA]; /* external data, for Fortress */
#endif
};

View File

@ -120,7 +120,7 @@ typedef struct CYASSL_X509_STORE_CTX {
int error_depth;
CYASSL_X509* current_cert; /* stunnel dereference */
char* domain; /* subject CN domain name */
void* ex_data; /* For fortress build */
void* ex_data; /* external data, for fortress build */
/* in internal.h too, change there !! */
} CYASSL_X509_STORE_CTX;

View File

@ -3713,17 +3713,17 @@ int CyaSSL_set_compression(CYASSL* ssl)
int CyaSSL_set_ex_data(CYASSL* ssl, int idx, void* data)
{
#ifdef FORTRESS
if (ssl != NULL && idx < MAX_EX_DATA && data != NULL)
if (ssl != NULL && idx < MAX_EX_DATA)
{
ssl->ex_data[idx] = data;
return 1;
return SSL_SUCCESS;
}
#else
(void)ssl;
(void)idx;
(void)data;
#endif
return 0;
return SSL_FAILURE;
}