summaryrefslogtreecommitdiff
path: root/lib/gnutls_global.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2002-03-26 19:33:20 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2002-03-26 19:33:20 +0000
commit0f111f88e23905efd0474fe45f1fe8e524a91898 (patch)
tree0be3496cd14f1d6aba0881ff93a316c02d9a6006 /lib/gnutls_global.c
parent5dbbfc9710578e4e3a6c2767b57c25307fe2fcc9 (diff)
downloadgnutls-0f111f88e23905efd0474fe45f1fe8e524a91898.tar.gz
Several optimizations
Diffstat (limited to 'lib/gnutls_global.c')
-rw-r--r--lib/gnutls_global.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gnutls_global.c b/lib/gnutls_global.c
index 8998268ede..6e1ccf060d 100644
--- a/lib/gnutls_global.c
+++ b/lib/gnutls_global.c
@@ -71,6 +71,8 @@ static void dlog( const char* str) {
static int _gnutls_init = 0;
+void _gnutls_cipher_suite_count_int(void);
+
/**
* gnutls_global_init - This function initializes the global state to defaults.
*
@@ -90,6 +92,10 @@ int gnutls_global_init( void)
if (_gnutls_init!=1) {
return 0;
}
+
+ /* precalculate the cipher suite count.
+ */
+ _gnutls_cipher_suite_count_int();
/* for gcrypt in order to be able to allocate memory */
gcry_set_allocation_handler(gnutls_malloc, gnutls_secure_malloc, _gnutls_is_secure_memory, gnutls_realloc, gnutls_free);