From 0dd39898681d628d4215b145a542c8f1182ac41f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bodo=20M=C3=B6ller?= Date: Fri, 10 Mar 2000 12:17:37 +0000 Subject: [PATCH] Change to code generated by 'dhparam -C': - Move DH parameter components inside the function. - Automatically #include the required header file if it has not already been #included. --- apps/dhparam.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/apps/dhparam.c b/apps/dhparam.c index 14f0e2b93c..709547ff5e 100644 --- a/apps/dhparam.c +++ b/apps/dhparam.c @@ -438,25 +438,29 @@ bad: perror("Malloc"); goto end; } + printf("#ifndef HEADER_DH_H\n" + "#include \n" + "#endif\n"); + printf("DH *get_dh%d()\n\t{\n",bits); + l=BN_bn2bin(dh->p,data); - printf("static unsigned char dh%d_p[]={",bits); + printf("\tstatic unsigned char dh%d_p[]={",bits); for (i=0; ig,data); - printf("static unsigned char dh%d_g[]={",bits); + printf("\tstatic unsigned char dh%d_g[]={",bits); for (i=0; ip=BN_bin2bn(dh%d_p,sizeof(dh%d_p),NULL);\n", -- 2.25.1