Move BN_options function to bn_print.c to remove dependency for BIO printf
[openssl.git] / crypto / bn / bn_print.c
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);
+       }