mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 20:24:39 +02:00
added an additional failure case log output to InitSSL() for the RNG initialize failing
This commit is contained in:
@@ -1340,8 +1340,10 @@ int InitSSL(CYASSL* ssl, CYASSL_CTX* ctx)
|
|||||||
return MEMORY_E;
|
return MEMORY_E;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( (ret = InitRng(ssl->rng)) != 0)
|
if ( (ret = InitRng(ssl->rng)) != 0) {
|
||||||
|
CYASSL_MSG("RNG Init error");
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
/* suites */
|
/* suites */
|
||||||
ssl->suites = (Suites*)XMALLOC(sizeof(Suites), ssl->heap,
|
ssl->suites = (Suites*)XMALLOC(sizeof(Suites), ssl->heap,
|
||||||
|
@@ -147,6 +147,7 @@ void CyaSSL_CTX_free(CYASSL_CTX* ctx)
|
|||||||
CYASSL* CyaSSL_new(CYASSL_CTX* ctx)
|
CYASSL* CyaSSL_new(CYASSL_CTX* ctx)
|
||||||
{
|
{
|
||||||
CYASSL* ssl = NULL;
|
CYASSL* ssl = NULL;
|
||||||
|
int ret = 0;
|
||||||
|
|
||||||
CYASSL_ENTER("SSL_new");
|
CYASSL_ENTER("SSL_new");
|
||||||
|
|
||||||
@@ -155,12 +156,12 @@ CYASSL* CyaSSL_new(CYASSL_CTX* ctx)
|
|||||||
|
|
||||||
ssl = (CYASSL*) XMALLOC(sizeof(CYASSL), ctx->heap,DYNAMIC_TYPE_SSL);
|
ssl = (CYASSL*) XMALLOC(sizeof(CYASSL), ctx->heap,DYNAMIC_TYPE_SSL);
|
||||||
if (ssl)
|
if (ssl)
|
||||||
if (InitSSL(ssl, ctx) < 0) {
|
if ( (ret = InitSSL(ssl, ctx)) < 0) {
|
||||||
FreeSSL(ssl);
|
FreeSSL(ssl);
|
||||||
ssl = 0;
|
ssl = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
CYASSL_LEAVE("SSL_new", 0);
|
CYASSL_LEAVE("SSL_new", ret);
|
||||||
return ssl;
|
return ssl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user