check NULL to match docs

This commit is contained in:
toddouska 2013-08-29 08:25:14 -07:00
parent 78b8da9949
commit b9540bf579

View File

@ -797,6 +797,9 @@ void CyaSSL_FreeArrays(CYASSL* ssl)
const byte* CyaSSL_GetMacSecret(CYASSL* ssl, int verify)
{
if (ssl == NULL)
return NULL;
if ( (ssl->options.side == CYASSL_CLIENT_END && !verify) ||
(ssl->options.side == CYASSL_SERVER_END && verify) )
return ssl->keys.client_write_MAC_secret;