From 047d97e95e1df831d699fb77cd58c269a13a5c5c Mon Sep 17 00:00:00 2001 From: David Shaw Date: Fri, 5 Jun 2009 14:11:03 +0000 Subject: Add full Camellia support. * configure.ac: Remove Camellia restriction. * gpg.c (main), misc.c (openpgp_cipher_test_algo): Remove Camellia restriction. * misc.c (map_cipher_openpgp_to_gcry), main.h: Add macros for openpgp_cipher_open, openpgp_cipher_get_algo_keylen, and openpgp_cipher_get_algo_blklen to wrap around the corresponding gcry_* functions, but pass the algorithm number through map_cipher_openpgp_to_gcry. This is needed in case the gcry algorithm number doesn't match the OpenPGP number (c.f. Camellia). * encr-data.c, pubkey-enc.c, mainproc.c, cipher.c, encode.c, seskey.c, passphrase.c, seckey-cert.c: Use new openpgp_cipher_* macros here. --- g10/pubkey-enc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'g10/pubkey-enc.c') diff --git a/g10/pubkey-enc.c b/g10/pubkey-enc.c index 5a8c0c01f..c0167b12e 100644 --- a/g10/pubkey-enc.c +++ b/g10/pubkey-enc.c @@ -1,6 +1,6 @@ /* pubkey-enc.c - public key encoded packet handling * Copyright (C) 1998, 1999, 2000, 2001, 2002, - * 2006 Free Software Foundation, Inc. + * 2006, 2009 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -251,7 +251,7 @@ get_it( PKT_pubkey_enc *enc, DEK *dek, PKT_secret_key *sk, u32 *keyid ) dek->algo = 0; goto leave; } - if ( dek->keylen != gcry_cipher_get_algo_keylen (dek->algo) ) { + if ( dek->keylen != openpgp_cipher_get_algo_keylen (dek->algo) ) { rc = GPG_ERR_WRONG_SECKEY; goto leave; } -- cgit v1.2.3