Move BN_options function to bn_print.c to remove dependency for BIO printf

routines from bn_lib.c
This commit is contained in:
Dr. Stephen Henson 2011-01-25 17:10:42 +00:00
parent a7508fec1a
commit d5654d2b20
2 changed files with 19 additions and 19 deletions

View file

@ -139,25 +139,6 @@ const BIGNUM *BN_value_one(void)
return(&const_one);
}
char *BN_options(void)
{
static int init=0;
static char data[16];
if (!init)
{
init++;
#ifdef BN_LLONG
BIO_snprintf(data,sizeof data,"bn(%d,%d)",
(int)sizeof(BN_ULLONG)*8,(int)sizeof(BN_ULONG)*8);
#else
BIO_snprintf(data,sizeof data,"bn(%d,%d)",
(int)sizeof(BN_ULONG)*8,(int)sizeof(BN_ULONG)*8);
#endif
}
return(data);
}
int BN_num_bits_word(BN_ULONG l)
{
static const unsigned char bits[256]={

View file

@ -357,3 +357,22 @@ end:
return(ret);
}
#endif
char *BN_options(void)
{
static int init=0;
static char data[16];
if (!init)
{
init++;
#ifdef BN_LLONG
BIO_snprintf(data,sizeof data,"bn(%d,%d)",
(int)sizeof(BN_ULLONG)*8,(int)sizeof(BN_ULONG)*8);
#else
BIO_snprintf(data,sizeof data,"bn(%d,%d)",
(int)sizeof(BN_ULONG)*8,(int)sizeof(BN_ULONG)*8);
#endif
}
return(data);
}