forked from wolfSSL/wolfssl
Conform to pre-existing pattern.
This commit is contained in:
@ -5833,17 +5833,18 @@ int DhGenKeyPair(WOLFSSL* ssl, DhKey* dhKey,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_PK_CALLBACKS)
|
#if defined(HAVE_PK_CALLBACKS)
|
||||||
|
ret = NOT_COMPILED_IN;
|
||||||
if (ssl && ssl->ctx && ssl->ctx->DhGenerateKeyPairCb) {
|
if (ssl && ssl->ctx && ssl->ctx->DhGenerateKeyPairCb) {
|
||||||
ret = ssl->ctx->DhGenerateKeyPairCb(dhKey, ssl->rng, priv, privSz,
|
ret = ssl->ctx->DhGenerateKeyPairCb(dhKey, ssl->rng, priv, privSz,
|
||||||
pub, pubSz);
|
pub, pubSz);
|
||||||
if (ret != NOT_COMPILED_IN)
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
if (ret == NOT_COMPILED_IN)
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
PRIVATE_KEY_UNLOCK();
|
PRIVATE_KEY_UNLOCK();
|
||||||
ret = wc_DhGenerateKeyPair(dhKey, ssl->rng, priv, privSz, pub, pubSz);
|
ret = wc_DhGenerateKeyPair(dhKey, ssl->rng, priv, privSz, pub, pubSz);
|
||||||
PRIVATE_KEY_LOCK();
|
PRIVATE_KEY_LOCK();
|
||||||
|
}
|
||||||
|
|
||||||
/* Handle async pending response */
|
/* Handle async pending response */
|
||||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||||
|
Reference in New Issue
Block a user