summaryrefslogtreecommitdiff
path: root/src/lib/libssl/src/demos/tunala/tunala.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/src/demos/tunala/tunala.c')
-rw-r--r--src/lib/libssl/src/demos/tunala/tunala.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/libssl/src/demos/tunala/tunala.c b/src/lib/libssl/src/demos/tunala/tunala.c
index e918cba2ce..ec49d3e943 100644
--- a/src/lib/libssl/src/demos/tunala/tunala.c
+++ b/src/lib/libssl/src/demos/tunala/tunala.c
@@ -697,9 +697,11 @@ static int ctx_set_dh(SSL_CTX *ctx, const char *dh_file, const char *dh_special)
697 abort(); 697 abort();
698 fprintf(stderr, "Info, generating DH parameters ... "); 698 fprintf(stderr, "Info, generating DH parameters ... ");
699 fflush(stderr); 699 fflush(stderr);
700 if((dh = DH_generate_parameters(512, DH_GENERATOR_5, 700 if(!(dh = DH_new()) || !DH_generate_parameters_ex(dh, 512,
701 NULL, NULL)) == NULL) { 701 DH_GENERATOR_5, NULL)) {
702 fprintf(stderr, "error!\n"); 702 fprintf(stderr, "error!\n");
703 if(dh)
704 DH_free(dh);
703 return 0; 705 return 0;
704 } 706 }
705 fprintf(stderr, "complete\n"); 707 fprintf(stderr, "complete\n");
@@ -733,7 +735,7 @@ static SSL_CTX *initialise_ssl_ctx(int server_mode, const char *engine_id,
733 unsigned int verify_depth) 735 unsigned int verify_depth)
734{ 736{
735 SSL_CTX *ctx = NULL, *ret = NULL; 737 SSL_CTX *ctx = NULL, *ret = NULL;
736 SSL_METHOD *meth; 738 const SSL_METHOD *meth;
737 ENGINE *e = NULL; 739 ENGINE *e = NULL;
738 740
739 OpenSSL_add_ssl_algorithms(); 741 OpenSSL_add_ssl_algorithms();