cipher: Simplify the cipher dispatcher cipher.c.
authorWerner Koch <wk@gnupg.org>
Tue, 1 Oct 2013 20:00:50 +0000 (22:00 +0200)
committerWerner Koch <wk@gnupg.org>
Tue, 1 Oct 2013 20:00:50 +0000 (22:00 +0200)
commit3ca180b25e8df252fc16f802cfdc27496e307830
tree1399c7891aa6f4bf4bf994adaa078dadd3510091
parent4153fa859816e799e506055321a22e6450aacdcc
cipher: Simplify the cipher dispatcher cipher.c.

* src/gcrypt-module.h (gcry_cipher_spec_t):  Move to ...
* src/cipher-proto.h (gcry_cipher_spec_t): here.  Merge with
cipher_extra_spec_t.  Add fields ALGO and FLAGS.  Set these fields in
all cipher modules.
* cipher/cipher.c: Change most code to replace the former module
system by a simpler system to gain information about the algorithms.
(disable_pubkey_algo): Simplified.  Not anymore thread-safe, though.

* cipher/md.c (_gcry_md_selftest): Use correct structure.  Not a real
problem because both define the same function as their first field.

* cipher/pubkey.c (_gcry_pk_selftest): Take care of the disabled flag.

Signed-off-by: Werner Koch <wk@gnupg.org>
25 files changed:
cipher/arcfour.c
cipher/blowfish.c
cipher/camellia-glue.c
cipher/cast5.c
cipher/cipher-aeswrap.c
cipher/cipher-cbc.c
cipher/cipher-cfb.c
cipher/cipher-ctr.c
cipher/cipher-internal.h
cipher/cipher-ofb.c
cipher/cipher.c
cipher/des.c
cipher/gost28147.c
cipher/idea.c
cipher/md.c
cipher/pubkey.c
cipher/rfc2268.c
cipher/rijndael.c
cipher/salsa20.c
cipher/seed.c
cipher/serpent.c
cipher/twofish.c
src/cipher-proto.h
src/cipher.h
src/gcrypt-module.h