From 5da01caa50ae7c3955c7c5192e29f241b08b905b Mon Sep 17 00:00:00 2001
From: Paul Bakker
Date: Wed, 3 Oct 2012 19:48:33 +0000
Subject: [PATCH] - Added warning about example use
---
programs/pkey/dh_genprime.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/programs/pkey/dh_genprime.c b/programs/pkey/dh_genprime.c
index fc37f5c87..94f1c621f 100644
--- a/programs/pkey/dh_genprime.c
+++ b/programs/pkey/dh_genprime.c
@@ -1,7 +1,7 @@
/*
* Diffie-Hellman-Merkle key exchange (prime generation)
*
- * Copyright (C) 2006-2011, Brainspark B.V.
+ * Copyright (C) 2006-2012, Brainspark B.V.
*
* This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker
@@ -71,6 +71,13 @@ int main( int argc, char *argv[] )
mpi_init( &G ); mpi_init( &P ); mpi_init( &Q );
mpi_read_string( &G, 10, GENERATOR );
+ printf( "\nWARNING: You should not generate and use your own DHM primes\n" );
+ printf( " unless you are very certain of what you are doing!\n" );
+ printf( " Failing to follow this instruction may result in\n" );
+ printf( " weak security for your connections! Use the\n" );
+ printf( " predefined DHM parameters from dhm.h instead!\n\n" );
+ printf( "============================================================\n\n" );
+
printf( "\n . Seeding the random number generator..." );
fflush( stdout );