summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dh/dh_prn.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/dh/dh_prn.c (renamed from src/lib/libssl/src/crypto/bn/bn_opt.c)37
1 files changed, 15 insertions, 22 deletions
diff --git a/src/lib/libssl/src/crypto/bn/bn_opt.c b/src/lib/libcrypto/dh/dh_prn.c
index 21cbb38f62..ae58c2ac87 100644
--- a/src/lib/libssl/src/crypto/bn/bn_opt.c
+++ b/src/lib/libcrypto/dh/dh_prn.c
@@ -1,4 +1,4 @@
1/* crypto/bn/bn_opt.c */ 1/* crypto/asn1/t_pkey.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -56,32 +56,25 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#ifndef BN_DEBUG
60# undef NDEBUG /* avoid conflicting definitions */
61# define NDEBUG
62#endif
63
64#include <assert.h>
65#include <limits.h>
66#include <stdio.h> 59#include <stdio.h>
67#include "cryptlib.h" 60#include "cryptlib.h"
68#include "bn_lcl.h" 61#include <openssl/evp.h>
62#include <openssl/dh.h>
69 63
70char *BN_options(void) 64#ifndef OPENSSL_NO_FP_API
65int DHparams_print_fp(FILE *fp, const DH *x)
71 { 66 {
72 static int init=0; 67 BIO *b;
73 static char data[16]; 68 int ret;
74 69
75 if (!init) 70 if ((b=BIO_new(BIO_s_file())) == NULL)
76 { 71 {
77 init++; 72 DHerr(DH_F_DHPARAMS_PRINT_FP,ERR_R_BUF_LIB);
78#ifdef BN_LLONG 73 return(0);
79 BIO_snprintf(data,sizeof data,"bn(%d,%d)",
80 (int)sizeof(BN_ULLONG)*8,(int)sizeof(BN_ULONG)*8);
81#else
82 BIO_snprintf(data,sizeof data,"bn(%d,%d)",
83 (int)sizeof(BN_ULONG)*8,(int)sizeof(BN_ULONG)*8);
84#endif
85 } 74 }
86 return(data); 75 BIO_set_fp(b,fp,BIO_NOCLOSE);
76 ret=DHparams_print(b, x);
77 BIO_free(b);
78 return(ret);
87 } 79 }
80#endif