diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-09-24 18:41:54 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-09-24 18:41:54 +0200 |
commit | a47b5930f9fd50bc299db69c37159647962d630f (patch) | |
tree | 86a7dd22202606b7cd544c61caadb811df0c058c | |
parent | 3cc4fbdbdcb973972029e98c60597b54c2c0006e (diff) | |
download | gnutls-a47b5930f9fd50bc299db69c37159647962d630f.tar.gz |
cipher,mac and digest priorities moved to crypto.c
-rw-r--r-- | lib/crypto.c | 5 | ||||
-rw-r--r-- | lib/gcrypt/cipher.c | 2 | ||||
-rw-r--r-- | lib/gcrypt/mac.c | 3 | ||||
-rw-r--r-- | lib/nettle/cipher.c | 3 | ||||
-rw-r--r-- | lib/nettle/mac.c | 4 |
5 files changed, 5 insertions, 12 deletions
diff --git a/lib/crypto.c b/lib/crypto.c index c7de86b272..571a4c4bc8 100644 --- a/lib/crypto.c +++ b/lib/crypto.c @@ -31,6 +31,11 @@ #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; diff --git a/lib/gcrypt/cipher.c b/lib/gcrypt/cipher.c index 8412f0a8ee..229fd2ecbe 100644 --- a/lib/gcrypt/cipher.c +++ b/lib/gcrypt/cipher.c @@ -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, diff --git a/lib/gcrypt/mac.c b/lib/gcrypt/mac.c index 184b421f76..703d68b316 100644 --- a/lib/gcrypt/mac.c +++ b/lib/gcrypt/mac.c @@ -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, diff --git a/lib/nettle/cipher.c b/lib/nettle/cipher.c index 70d37372b7..66bfee29d0 100644 --- a/lib/nettle/cipher.c +++ b/lib/nettle/cipher.c @@ -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, diff --git a/lib/nettle/mac.c b/lib/nettle/mac.c index 73a2c62cf6..2eb8a63880 100644 --- a/lib/nettle/mac.c +++ b/lib/nettle/mac.c @@ -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, |