From: Bodo Möller Date: Fri, 10 Mar 2000 12:17:37 +0000 (+0000) Subject: Change to code generated by 'dhparam -C': X-Git-Tag: OpenSSL_0_9_5a-beta1~74 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0dd39898681d628d4215b145a542c8f1182ac41f;p=oweals%2Fopenssl.git 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. --- 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",