mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-06 10:00:52 +02:00
f278 fix setting heap in wc_SrpInit_ex
This commit is contained in:
+7
-7
@@ -259,6 +259,13 @@ int wc_SrpInit_ex(Srp* srp, SrpType type, SrpSide side, void* heap, int devId)
|
||||
/* initializing variables */
|
||||
XMEMSET(srp, 0, sizeof(Srp));
|
||||
|
||||
/* default heap hint to NULL or test value */
|
||||
#ifdef WOLFSSL_HEAP_TEST
|
||||
srp->heap = (void*)WOLFSSL_HEAP_TEST;
|
||||
#else
|
||||
srp->heap = heap;
|
||||
#endif /* WOLFSSL_HEAP_TEST */
|
||||
|
||||
if ((r = SrpHashInit(&srp->client_proof, type, srp->heap)) != 0)
|
||||
return r;
|
||||
|
||||
@@ -280,13 +287,6 @@ int wc_SrpInit_ex(Srp* srp, SrpType type, SrpSide side, void* heap, int devId)
|
||||
|
||||
srp->keyGenFunc_cb = wc_SrpSetKey;
|
||||
|
||||
/* default heap hint to NULL or test value */
|
||||
#ifdef WOLFSSL_HEAP_TEST
|
||||
srp->heap = (void*)WOLFSSL_HEAP_TEST;
|
||||
#else
|
||||
srp->heap = heap;
|
||||
#endif /* WOLFSSL_HEAP_TEST */
|
||||
|
||||
(void)devId; /* future */
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user