mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-04 21:24:43 +02:00
wolfcrypt/src/asn.c: fix WOLFSSL_ASYNC_CRYPT codepath in SignCert() -- fall through to non-async certSignCtx_lcl for algs without async support.
This commit is contained in:
@@ -29260,15 +29260,10 @@ static int SignCert(int requestSz, int sType, byte* buf, word32 buffSz,
|
||||
{
|
||||
int sigSz = 0;
|
||||
void* heap = NULL;
|
||||
CertSignCtx* certSignCtx;
|
||||
#ifndef WOLFSSL_ASYNC_CRYPT
|
||||
CertSignCtx certSignCtx_lcl;
|
||||
CertSignCtx* certSignCtx = &certSignCtx_lcl;
|
||||
|
||||
certSignCtx = &certSignCtx_lcl;
|
||||
XMEMSET(certSignCtx, 0, sizeof(CertSignCtx));
|
||||
#else
|
||||
certSignCtx = NULL;
|
||||
#endif
|
||||
XMEMSET(certSignCtx, 0, sizeof(*certSignCtx));
|
||||
|
||||
if (requestSz < 0)
|
||||
return requestSz;
|
||||
@@ -29295,12 +29290,6 @@ static int SignCert(int requestSz, int sType, byte* buf, word32 buffSz,
|
||||
#endif /* HAVE_ECC */
|
||||
}
|
||||
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||
if (certSignCtx == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (certSignCtx->sig == NULL) {
|
||||
certSignCtx->sig = (byte*)XMALLOC(MAX_ENCODED_SIG_SZ, heap,
|
||||
DYNAMIC_TYPE_TMP_BUFFER);
|
||||
|
Reference in New Issue
Block a user