Move BN_options function to bn_print.c to remove dependency for BIO printf
routines from bn_lib.c
This commit is contained in:
parent
f7a2afa652
commit
13a5519208
@ -139,25 +139,6 @@ const BIGNUM *BN_value_one(void)
|
|||||||
return(&const_one);
|
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)
|
int BN_num_bits_word(BN_ULONG l)
|
||||||
{
|
{
|
||||||
static const unsigned char bits[256]={
|
static const unsigned char bits[256]={
|
||||||
|
@ -357,3 +357,22 @@ end:
|
|||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
#endif
|
#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);
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user