Merge pull request #1305 from JacobBarthelmeh/DH

add dh header to test.h and adjust macro guards
This commit is contained in:
toddouska
2018-01-10 08:09:51 -08:00
committed by GitHub
2 changed files with 26 additions and 23 deletions

View File

@@ -23864,29 +23864,6 @@ void* wolfSSL_GetEccSharedSecretCtx(WOLFSSL* ssl)
}
#endif /* HAVE_ECC */
#ifndef NO_DH
void wolfSSL_CTX_SetDhAgreeCb(WOLFSSL_CTX* ctx, CallbackDhAgree cb)
{
if (ctx)
ctx->DhAgreeCb = cb;
}
void wolfSSL_SetDhAgreeCtx(WOLFSSL* ssl, void *ctx)
{
if (ssl)
ssl->DhAgreeCtx = ctx;
}
void* wolfSSL_GetDhAgreeCtx(WOLFSSL* ssl)
{
if (ssl)
return ssl->DhAgreeCtx;
return NULL;
}
#endif /* !NO_DH */
#ifdef HAVE_ED25519
void wolfSSL_CTX_SetEd25519SignCb(WOLFSSL_CTX* ctx, CallbackEd25519Sign cb)
{
@@ -24102,6 +24079,29 @@ void* wolfSSL_GetRsaDecCtx(WOLFSSL* ssl)
#endif /* HAVE_PK_CALLBACKS */
#endif /* NO_CERTS */
#if defined(HAVE_PK_CALLBACKS) && !defined(NO_DH)
void wolfSSL_CTX_SetDhAgreeCb(WOLFSSL_CTX* ctx, CallbackDhAgree cb)
{
if (ctx)
ctx->DhAgreeCb = cb;
}
void wolfSSL_SetDhAgreeCtx(WOLFSSL* ssl, void *ctx)
{
if (ssl)
ssl->DhAgreeCtx = ctx;
}
void* wolfSSL_GetDhAgreeCtx(WOLFSSL* ssl)
{
if (ssl)
return ssl->DhAgreeCtx;
return NULL;
}
#endif /* HAVE_PK_CALLBACKS && !NO_DH */
#ifdef WOLFSSL_HAVE_WOLFSCEP
/* Used by autoconf to see if wolfSCEP is available */

View File

@@ -24,6 +24,9 @@
#ifdef HAVE_ECC
#include <wolfssl/wolfcrypt/ecc.h>
#endif /* HAVE_ECC */
#ifndef NO_DH
#include <wolfssl/wolfcrypt/dh.h>
#endif /* !NO_DH */
#ifdef HAVE_ED25519
#include <wolfssl/wolfcrypt/ed25519.h>
#endif /* HAVE_ED25519 */