diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2012-06-29 16:36:03 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2012-06-29 16:36:11 +0200 |
commit | 4ad2d65a531290119c6467c09683cb9678103207 (patch) | |
tree | 18670f0b69095176ef6429967573ce30a27a6fc0 /lib | |
parent | 3889a91abe842c05c5e79c0650391b979bb99bc0 (diff) | |
download | gnutls-4ad2d65a531290119c6467c09683cb9678103207.tar.gz |
Added Camellia-192-CBC algorithm identifier.
Based on patch by David Woodhouse.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/accelerated/cryptodev.c | 1 | ||||
-rw-r--r-- | lib/algorithms/ciphers.c | 2 | ||||
-rw-r--r-- | lib/includes/gnutls/gnutls.h.in | 2 | ||||
-rw-r--r-- | lib/nettle/cipher.c | 3 | ||||
-rw-r--r-- | lib/x509/privkey_openssl.c | 1 |
5 files changed, 9 insertions, 0 deletions
diff --git a/lib/accelerated/cryptodev.c b/lib/accelerated/cryptodev.c index 8a239d3ea6..822dc14a4e 100644 --- a/lib/accelerated/cryptodev.c +++ b/lib/accelerated/cryptodev.c @@ -60,6 +60,7 @@ static const int gnutls_cipher_map[] = { [GNUTLS_CIPHER_AES_256_CBC] = CRYPTO_AES_CBC, [GNUTLS_CIPHER_3DES_CBC] = CRYPTO_3DES_CBC, [GNUTLS_CIPHER_CAMELLIA_128_CBC] = CRYPTO_CAMELLIA_CBC, + [GNUTLS_CIPHER_CAMELLIA_192_CBC] = CRYPTO_CAMELLIA_CBC, [GNUTLS_CIPHER_CAMELLIA_256_CBC] = CRYPTO_CAMELLIA_CBC, [GNUTLS_CIPHER_DES_CBC] = CRYPTO_DES_CBC, }; diff --git a/lib/algorithms/ciphers.c b/lib/algorithms/ciphers.c index 7c88231da2..8e3399f215 100644 --- a/lib/algorithms/ciphers.c +++ b/lib/algorithms/ciphers.c @@ -54,6 +54,8 @@ static const gnutls_cipher_entry algorithms[] = { {"ARCFOUR-128", GNUTLS_CIPHER_ARCFOUR_128, 1, 16, CIPHER_STREAM, 0, 0, 0}, {"CAMELLIA-256-CBC", GNUTLS_CIPHER_CAMELLIA_256_CBC, 16, 32, CIPHER_BLOCK, 16, 0, 0}, + {"CAMELLIA-192-CBC", GNUTLS_CIPHER_CAMELLIA_192_CBC, 16, 24, CIPHER_BLOCK, + 16, 0, 0}, {"CAMELLIA-128-CBC", GNUTLS_CIPHER_CAMELLIA_128_CBC, 16, 16, CIPHER_BLOCK, 16, 0, 0}, {"3DES-CBC", GNUTLS_CIPHER_3DES_CBC, 8, 24, CIPHER_BLOCK, 8, 0, 0}, diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in index d0ff2d00c4..d27070f4ab 100644 --- a/lib/includes/gnutls/gnutls.h.in +++ b/lib/includes/gnutls/gnutls.h.in @@ -76,6 +76,7 @@ extern "C" * @GNUTLS_CIPHER_AES_256_CBC: AES in CBC mode with 256-bit keys. * @GNUTLS_CIPHER_ARCFOUR_40: ARCFOUR stream cipher with 40-bit keys. * @GNUTLS_CIPHER_CAMELLIA_128_CBC: Camellia in CBC mode with 128-bit keys. + * @GNUTLS_CIPHER_CAMELLIA_192_CBC: Camellia in CBC mode with 192-bit keys. * @GNUTLS_CIPHER_CAMELLIA_256_CBC: Camellia in CBC mode with 256-bit keys. * @GNUTLS_CIPHER_RC2_40_CBC: RC2 in CBC mode with 40-bit keys. * @GNUTLS_CIPHER_DES_CBC: DES in CBC mode (56-bit keys). @@ -109,6 +110,7 @@ extern "C" GNUTLS_CIPHER_AES_192_CBC = 92, GNUTLS_CIPHER_AES_128_GCM = 93, GNUTLS_CIPHER_AES_256_GCM = 94, + GNUTLS_CIPHER_CAMELLIA_192_CBC = 95, /* used only for PGP internals. Ignored in TLS/SSL */ diff --git a/lib/nettle/cipher.c b/lib/nettle/cipher.c index 1333cae97d..2a662c7141 100644 --- a/lib/nettle/cipher.c +++ b/lib/nettle/cipher.c @@ -108,6 +108,7 @@ static int wrap_nettle_cipher_exists(gnutls_cipher_algorithm_t algo) case GNUTLS_CIPHER_AES_128_GCM: case GNUTLS_CIPHER_AES_256_GCM: case GNUTLS_CIPHER_CAMELLIA_128_CBC: + case GNUTLS_CIPHER_CAMELLIA_192_CBC: case GNUTLS_CIPHER_CAMELLIA_256_CBC: case GNUTLS_CIPHER_AES_128_CBC: case GNUTLS_CIPHER_AES_192_CBC: @@ -151,6 +152,7 @@ wrap_nettle_cipher_init (gnutls_cipher_algorithm_t algo, void **_ctx, int enc) ctx->block_size = AES_BLOCK_SIZE; break; case GNUTLS_CIPHER_CAMELLIA_128_CBC: + case GNUTLS_CIPHER_CAMELLIA_192_CBC: case GNUTLS_CIPHER_CAMELLIA_256_CBC: ctx->encrypt = cbc_encrypt; ctx->decrypt = cbc_decrypt; @@ -234,6 +236,7 @@ wrap_nettle_cipher_setkey (void *_ctx, const void *key, size_t keysize) aes_set_decrypt_key (ctx->ctx_ptr, keysize, key); break; case GNUTLS_CIPHER_CAMELLIA_128_CBC: + case GNUTLS_CIPHER_CAMELLIA_192_CBC: case GNUTLS_CIPHER_CAMELLIA_256_CBC: if (ctx->enc) camellia_set_encrypt_key (ctx->ctx_ptr, keysize, key); diff --git a/lib/x509/privkey_openssl.c b/lib/x509/privkey_openssl.c index 4e62507e32..1d95e5e9e5 100644 --- a/lib/x509/privkey_openssl.c +++ b/lib/x509/privkey_openssl.c @@ -97,6 +97,7 @@ static const struct pem_cipher { { "AES-192-CBC", GNUTLS_CIPHER_AES_192_CBC }, { "AES-256-CBC", GNUTLS_CIPHER_AES_256_CBC }, { "CAMELLIA-128-CBC", GNUTLS_CIPHER_CAMELLIA_128_CBC }, + { "CAMELLIA-192-CBC", GNUTLS_CIPHER_CAMELLIA_192_CBC }, { "CAMELLIA-256-CBC", GNUTLS_CIPHER_CAMELLIA_256_CBC }, }; |