]> granicus.if.org Git - openssl/commitdiff
Move BN_options function to bn_print.c to remove dependency for BIO printf
authorDr. Stephen Henson <steve@openssl.org>
Tue, 25 Jan 2011 17:10:42 +0000 (17:10 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 25 Jan 2011 17:10:42 +0000 (17:10 +0000)
routines from bn_lib.c

crypto/bn/bn_lib.c
crypto/bn/bn_print.c

index 5470fbe6ef374721ef58c1fb801ef34f7a3e7f8f..7a5676de69275897f4c197fad784a46a585d0f75 100644 (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]={
index bebb466d088a27c60b9440d08aee478564771d80..1743b6a7e212f19bcc94f0816c71493b1270961f 100644 (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);
+       }