]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
cipher,mac and digest priorities moved to crypto.c
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 24 Sep 2010 16:41:54 +0000 (18:41 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 24 Sep 2010 16:41:54 +0000 (18:41 +0200)
lib/crypto.c
lib/gcrypt/cipher.c
lib/gcrypt/mac.c
lib/nettle/cipher.c
lib/nettle/mac.c

index c7de86b272eee333a323d8590139e085b8d82700..571a4c4bc88d5e6f166caf4a61a9d3c6cd327959 100644 (file)
 #include <random.h>
 #include <gnutls_cipher_int.h>
 
+/* default values for priorities */
+int crypto_mac_prio = INT_MAX;
+int crypto_digest_prio = INT_MAX;
+int crypto_cipher_prio = INT_MAX;
+
 typedef struct algo_list
 {
   int algorithm;
index 8412f0a8ee1ba53fddeca5dbe0b231e88a41fd10..229fd2ecbe0de562b85c07a7c0b6a7d7d3d0e2e8 100644 (file)
@@ -158,8 +158,6 @@ wrap_gcry_cipher_close (void *h)
 }
 
 
-int crypto_cipher_prio = INT_MAX;
-
 gnutls_crypto_cipher_st _gnutls_cipher_ops = {
   .init = wrap_gcry_cipher_init,
   .setkey = wrap_gcry_cipher_setkey,
index 184b421f76ebe0315cf3fd168ee212cb4ab9e611..703d68b31660e3bb1eec66a52c0144ccfdcc72d7 100644 (file)
@@ -159,7 +159,6 @@ wrap_gcry_mac_output (void *src_ctx, void *digest, size_t digestsize)
   return GNUTLS_E_HASH_FAILED;
 }
 
-int crypto_mac_prio = INT_MAX;
 
 gnutls_crypto_mac_st _gnutls_mac_ops = {
   .init = wrap_gcry_mac_init,
@@ -170,8 +169,6 @@ gnutls_crypto_mac_st _gnutls_mac_ops = {
   .deinit = wrap_gcry_md_close,
 };
 
-int crypto_digest_prio = INT_MAX;
-
 gnutls_crypto_digest_st _gnutls_digest_ops = {
   .init = wrap_gcry_hash_init,
   .hash = wrap_gcry_md_write,
index 70d37372b73d274511e524c8273c1835d0ab5f7c..66bfee29d0c175b57c2a5ec98c2f5b8e04fe0880 100644 (file)
@@ -296,9 +296,6 @@ wrap_nettle_cipher_close (void *h)
        gnutls_free(h);
 }
 
-
-int crypto_cipher_prio = INT_MAX;
-
 gnutls_crypto_cipher_st _gnutls_cipher_ops = {
   .init = wrap_nettle_cipher_init,
   .setkey = wrap_nettle_cipher_setkey,
index 73a2c62cf6c35e6472a12fae0d22fb498759490b..2eb8a63880e1e1385bb9cb0be1ba96daeb43217c 100644 (file)
@@ -314,8 +314,6 @@ wrap_nettle_hmac_output(void *src_ctx, void *digest, size_t digestsize)
        return 0;
 }
 
-int crypto_mac_prio = INT_MAX;
-
 gnutls_crypto_mac_st _gnutls_mac_ops = {
     .init = wrap_nettle_hmac_init,
     .setkey = wrap_nettle_hmac_setkey,
@@ -325,8 +323,6 @@ gnutls_crypto_mac_st _gnutls_mac_ops = {
     .deinit = wrap_nettle_md_close,
 };
 
-int crypto_digest_prio = INT_MAX;
-
 gnutls_crypto_digest_st _gnutls_digest_ops = {
     .init = wrap_nettle_hash_init,
     .hash = wrap_nettle_hash_update,