Hi,
When using standard DH, pre-generated parameters can be loaded using one of the following functions from <wolfssl/ssl.h> with an SSL session (WOLFSSL) object:
int wolfSSL_SetTmpDH(WOLFSSL* ssl, const unsigned char* p, int pSz, const unsigned char* g, int gSz);
int wolfSSL_SetTmpDH_buffer(WOLFSSL* ssl, const unsigned char* b, long sz, int format);
int wolfSSL_SetTmpDH_file(WOLFSSL*, const char* f, int format);
Or with one of these, if loading into a SSL context (WOLFSSL_CTX):
int wolfSSL_CTX_SetTmpDH(WOLFSSL_CTX* ctx, const unsigned char* p, int pSz, const unsigned char* g, int gSz);
int wolfSSL_CTX_SetTmpDH_buffer(WOLFSSL_CTX* ctx, const unsigned char* b, long sz, int format);
int wolfSSL_CTX_SetTmpDH_file(WOLFSSL_CTX*, const char* f, int format);
Note that we don't support loading pre-generated ECDH parameters, as wolfSSL currently only supports P-256, and parameters are automatically generated.
Best Regards,
Chris