add DH param setting by file and buffer, by ctx too

This commit is contained in:
toddouska
2011-11-01 14:05:14 -07:00
parent f97759c9e1
commit 948a901cfc
10 changed files with 206 additions and 32 deletions
+5 -1
View File
@@ -149,7 +149,11 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args)
ssl = SSL_new(ctx);
if (ssl == NULL) err_sys("SSL_new failed");
SSL_set_fd(ssl, clientfd);
SetDH(ssl);
#ifdef NO_FILESYSTEM
SetDH(ssl);
#else
CyaSSL_SetTmpDH_file(ssl, dhParam, SSL_FILETYPE_PEM);
#endif
if (SSL_accept(ssl) != SSL_SUCCESS) {
printf("SSL_accept failed\n");
SSL_free(ssl);