const correct new API
This commit is contained in:
parent
948a901cfc
commit
ef72bae2ff
12
cyassl/ssl.h
12
cyassl/ssl.h
@ -673,18 +673,18 @@ CYASSL_API char* CyaSSL_X509_get_subjectCN(CYASSL_X509*);
|
||||
CYASSL_API int CyaSSL_connect_cert(CYASSL* ssl);
|
||||
|
||||
/* server Diffie-Hellman parameters */
|
||||
CYASSL_API int CyaSSL_SetTmpDH(CYASSL*, unsigned char* p, int pSz,
|
||||
unsigned char* g, int gSz);
|
||||
CYASSL_API int CyaSSL_SetTmpDH_buffer(CYASSL*, unsigned char* b, long sz,
|
||||
CYASSL_API int CyaSSL_SetTmpDH(CYASSL*, const unsigned char* p, int pSz,
|
||||
const unsigned char* g, int gSz);
|
||||
CYASSL_API int CyaSSL_SetTmpDH_buffer(CYASSL*, const unsigned char* b, long sz,
|
||||
int format);
|
||||
#ifndef NO_FILESYSTEM
|
||||
CYASSL_API int CyaSSL_SetTmpDH_file(CYASSL*, const char* f, int format);
|
||||
#endif
|
||||
|
||||
/* server ctx Diffie-Hellman parameters */
|
||||
CYASSL_API int CyaSSL_CTX_SetTmpDH(CYASSL_CTX*, unsigned char* p, int pSz,
|
||||
unsigned char* g, int gSz);
|
||||
CYASSL_API int CyaSSL_CTX_SetTmpDH_buffer(CYASSL_CTX*, unsigned char* b,
|
||||
CYASSL_API int CyaSSL_CTX_SetTmpDH(CYASSL_CTX*, const unsigned char* p,
|
||||
int pSz, const unsigned char* g, int gSz);
|
||||
CYASSL_API int CyaSSL_CTX_SetTmpDH_buffer(CYASSL_CTX*, const unsigned char* b,
|
||||
long sz, int format);
|
||||
#ifndef NO_FILESYSTEM
|
||||
CYASSL_API int CyaSSL_CTX_SetTmpDH_file(CYASSL_CTX*, const char* f,
|
||||
|
17
src/ssl.c
17
src/ssl.c
@ -168,8 +168,8 @@ int CyaSSL_negotiate(CYASSL* ssl)
|
||||
|
||||
|
||||
/* server Diffie-Hellman parameters */
|
||||
int CyaSSL_SetTmpDH(CYASSL* ssl, unsigned char* p, int pSz, unsigned char* g,
|
||||
int gSz)
|
||||
int CyaSSL_SetTmpDH(CYASSL* ssl, const unsigned char* p, int pSz,
|
||||
const unsigned char* g, int gSz)
|
||||
{
|
||||
byte havePSK = 0;
|
||||
|
||||
@ -1192,7 +1192,7 @@ int CyaSSL_use_certificate_chain_file(CYASSL* ssl, const char* file)
|
||||
|
||||
/* server wrapper for ctx or ssl Diffie-Hellman parameters */
|
||||
static int CyaSSL_SetTmpDH_buffer_wrapper(CYASSL_CTX* ctx, CYASSL* ssl,
|
||||
unsigned char* buf, long sz, int format)
|
||||
const unsigned char* buf, long sz, int format)
|
||||
{
|
||||
buffer der;
|
||||
int ret;
|
||||
@ -1234,15 +1234,16 @@ static int CyaSSL_SetTmpDH_buffer_wrapper(CYASSL_CTX* ctx, CYASSL* ssl,
|
||||
}
|
||||
|
||||
/* server Diffie-Hellman parameters */
|
||||
int CyaSSL_SetTmpDH_buffer(CYASSL* ssl, unsigned char* buf, long sz, int format)
|
||||
int CyaSSL_SetTmpDH_buffer(CYASSL* ssl, const unsigned char* buf, long sz,
|
||||
int format)
|
||||
{
|
||||
return CyaSSL_SetTmpDH_buffer_wrapper(ssl->ctx, ssl, buf, sz, format);
|
||||
}
|
||||
|
||||
|
||||
/* server ctx Diffie-Hellman parameters */
|
||||
int CyaSSL_CTX_SetTmpDH_buffer(CYASSL_CTX* ctx, unsigned char* buf, long sz,
|
||||
int format)
|
||||
int CyaSSL_CTX_SetTmpDH_buffer(CYASSL_CTX* ctx, const unsigned char* buf,
|
||||
long sz, int format)
|
||||
{
|
||||
return CyaSSL_SetTmpDH_buffer_wrapper(ctx, NULL, buf, sz, format);
|
||||
}
|
||||
@ -3676,8 +3677,8 @@ int CyaSSL_set_compression(CYASSL* ssl)
|
||||
|
||||
|
||||
/* server ctx Diffie-Hellman parameters */
|
||||
int CyaSSL_CTX_SetTmpDH(CYASSL_CTX* ctx, unsigned char* p, int pSz,
|
||||
unsigned char* g, int gSz)
|
||||
int CyaSSL_CTX_SetTmpDH(CYASSL_CTX* ctx, const unsigned char* p, int pSz,
|
||||
const unsigned char* g, int gSz)
|
||||
{
|
||||
CYASSL_ENTER("CyaSSL_CTX_SetTmpDH");
|
||||
if (ctx == NULL || p == NULL || g == NULL) return BAD_FUNC_ARG;
|
||||
|
Loading…
Reference in New Issue
Block a user