aboutsummaryrefslogtreecommitdiffstats
path: root/demos/tunala/tunala.c
diff options
context:
space:
mode:
authorGeoff Thorpe <geoff@openssl.org>2008-03-28 01:56:08 +0000
committerGeoff Thorpe <geoff@openssl.org>2008-03-28 01:56:08 +0000
commiteb77ebe26c5228a9a9688b33901e79968789b980 (patch)
treebe3b65dbd8150ee5aeec945d3dcd5133877315c9 /demos/tunala/tunala.c
parentf5e2354c9d46c3abbc0afcab704ea4fb051d3c76 (diff)
downloadopenssl-eb77ebe26c5228a9a9688b33901e79968789b980.tar.gz
Update tunala so it builds ok with OPENSSL_NO_DEPRECATED, and improve the
autoungunk.sh logic (autobits have grown since I last tried this...).
Diffstat (limited to 'demos/tunala/tunala.c')
-rw-r--r--demos/tunala/tunala.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/demos/tunala/tunala.c b/demos/tunala/tunala.c
index e918cba2ce..ec49d3e943 100644
--- a/demos/tunala/tunala.c
+++ b/demos/tunala/tunala.c
@@ -697,9 +697,11 @@ static int ctx_set_dh(SSL_CTX *ctx, const char *dh_file, const char *dh_special)
abort();
fprintf(stderr, "Info, generating DH parameters ... ");
fflush(stderr);
- if((dh = DH_generate_parameters(512, DH_GENERATOR_5,
- NULL, NULL)) == NULL) {
+ if(!(dh = DH_new()) || !DH_generate_parameters_ex(dh, 512,
+ DH_GENERATOR_5, NULL)) {
fprintf(stderr, "error!\n");
+ if(dh)
+ DH_free(dh);
return 0;
}
fprintf(stderr, "complete\n");
@@ -733,7 +735,7 @@ static SSL_CTX *initialise_ssl_ctx(int server_mode, const char *engine_id,
unsigned int verify_depth)
{
SSL_CTX *ctx = NULL, *ret = NULL;
- SSL_METHOD *meth;
+ const SSL_METHOD *meth;
ENGINE *e = NULL;
OpenSSL_add_ssl_algorithms();