diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 11 | ||||
-rw-r--r-- | src/g10lib.h | 1 | ||||
-rw-r--r-- | src/gcrypt.h.in | 408 | ||||
-rw-r--r-- | src/global.c | 9 | ||||
-rw-r--r-- | src/libgcrypt.def | 41 | ||||
-rw-r--r-- | src/libgcrypt.vers | 20 | ||||
-rw-r--r-- | src/visibility.c | 281 | ||||
-rw-r--r-- | src/visibility.h | 218 |
8 files changed, 22 insertions, 967 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index af7aa48c..3da69b2d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,16 @@ 2011-09-15 Werner Koch <wk@g10code.com> + * gcrypt.h.in: Remove all gcry_ac symbols. + * visibility.h: Remove all gcry_ac symbols. + * visibility.c: Remove all gcry_ac wrappers. + * libgcrypt.vers: Remove all gcry_ac symbols. + (GCRYPT_1.2): Rename to GCRYPT_1.6. + * libgcrypt.def: Remove all gcry_ac symbols. + * global.c (global_init): Remove comment code with a call to + _gcry_ac_init. + +2011-09-15 Werner Koch <wk@g10code.com> + * hmac256.c (main): Fix endless loop when using pipe input and option --binary. diff --git a/src/g10lib.h b/src/g10lib.h index 8d98ae38..a55d3d69 100644 --- a/src/g10lib.h +++ b/src/g10lib.h @@ -301,7 +301,6 @@ gcry_err_code_t _gcry_module_list (gcry_module_t modules, gcry_err_code_t _gcry_cipher_init (void); gcry_err_code_t _gcry_md_init (void); gcry_err_code_t _gcry_pk_init (void); -gcry_err_code_t _gcry_ac_init (void); gcry_err_code_t _gcry_pk_module_lookup (int id, gcry_module_t *module); void _gcry_pk_module_release (gcry_module_t module); diff --git a/src/gcrypt.h.in b/src/gcrypt.h.in index 63f71c0e..33059d2f 100644 --- a/src/gcrypt.h.in +++ b/src/gcrypt.h.in @@ -1248,414 +1248,6 @@ void gcry_md_debug (gcry_md_hd_t hd, const char *suffix); number. */ gcry_error_t gcry_md_list (int *list, int *list_length); - -/* Alternative interface for asymmetric cryptography. This interface - is deprecated. */ - -/* The algorithm IDs. */ -typedef enum gcry_ac_id - { - GCRY_AC_RSA = 1, - GCRY_AC_DSA = 17, - GCRY_AC_ELG = 20, - GCRY_AC_ELG_E = 16 - } -gcry_ac_id_t _GCRY_ATTR_INTERNAL; - -/* Key types. */ -typedef enum gcry_ac_key_type - { - GCRY_AC_KEY_SECRET, - GCRY_AC_KEY_PUBLIC - } -gcry_ac_key_type_t _GCRY_ATTR_INTERNAL; - -/* Encoding methods. */ -typedef enum gcry_ac_em - { - GCRY_AC_EME_PKCS_V1_5, - GCRY_AC_EMSA_PKCS_V1_5 - } -gcry_ac_em_t _GCRY_ATTR_INTERNAL; - -/* Encryption and Signature schemes. */ -typedef enum gcry_ac_scheme - { - GCRY_AC_ES_PKCS_V1_5, - GCRY_AC_SSA_PKCS_V1_5 - } -gcry_ac_scheme_t _GCRY_ATTR_INTERNAL; - -/* AC data. */ -#define GCRY_AC_FLAG_DEALLOC (1 << 0) -#define GCRY_AC_FLAG_COPY (1 << 1) -#define GCRY_AC_FLAG_NO_BLINDING (1 << 2) - -/* This type represents a `data set'. */ -typedef struct gcry_ac_data *gcry_ac_data_t _GCRY_ATTR_INTERNAL; - -/* This type represents a single `key', either a secret one or a - public one. */ -typedef struct gcry_ac_key *gcry_ac_key_t _GCRY_ATTR_INTERNAL; - -/* This type represents a `key pair' containing a secret and a public - key. */ -typedef struct gcry_ac_key_pair *gcry_ac_key_pair_t _GCRY_ATTR_INTERNAL; - -/* This type represents a `handle' that is needed by functions - performing cryptographic operations. */ -typedef struct gcry_ac_handle *gcry_ac_handle_t _GCRY_ATTR_INTERNAL; - -typedef gpg_error_t (*gcry_ac_data_read_cb_t) (void *opaque, - unsigned char *buffer, - size_t *buffer_n) - /* */ _GCRY_ATTR_INTERNAL; - -typedef gpg_error_t (*gcry_ac_data_write_cb_t) (void *opaque, - unsigned char *buffer, - size_t buffer_n) - /* */ _GCRY_ATTR_INTERNAL; - -typedef enum - { - GCRY_AC_IO_READABLE, - GCRY_AC_IO_WRITABLE - } -gcry_ac_io_mode_t _GCRY_ATTR_INTERNAL; - -typedef enum - { - GCRY_AC_IO_STRING, - GCRY_AC_IO_CALLBACK - } -gcry_ac_io_type_t _GCRY_ATTR_INTERNAL; - -typedef struct gcry_ac_io -{ - /* This is an INTERNAL structure, do NOT use manually. */ - gcry_ac_io_mode_t mode _GCRY_ATTR_INTERNAL; - gcry_ac_io_type_t type _GCRY_ATTR_INTERNAL; - union - { - union - { - struct - { - gcry_ac_data_read_cb_t cb; - void *opaque; - } callback; - struct - { - unsigned char *data; - size_t data_n; - } string; - void *opaque; - } readable; - union - { - struct - { - gcry_ac_data_write_cb_t cb; - void *opaque; - } callback; - struct - { - unsigned char **data; - size_t *data_n; - } string; - void *opaque; - } writable; - } io _GCRY_ATTR_INTERNAL; -} -gcry_ac_io_t _GCRY_ATTR_INTERNAL; - -/* The caller of gcry_ac_key_pair_generate can provide one of these - structures in order to influence the key generation process in an - algorithm-specific way. */ -typedef struct gcry_ac_key_spec_rsa -{ - gcry_mpi_t e; /* E to use. */ -} gcry_ac_key_spec_rsa_t _GCRY_ATTR_INTERNAL; - -/* Structure used for passing data to the implementation of the - `EME-PKCS-V1_5' encoding method. */ -typedef struct gcry_ac_eme_pkcs_v1_5 -{ - size_t key_size; -} gcry_ac_eme_pkcs_v1_5_t _GCRY_ATTR_INTERNAL; - -typedef enum gcry_md_algos gcry_md_algo_t _GCRY_ATTR_INTERNAL; - -/* Structure used for passing data to the implementation of the - `EMSA-PKCS-V1_5' encoding method. */ -typedef struct gcry_ac_emsa_pkcs_v1_5 -{ - gcry_md_algo_t md; - size_t em_n; -} gcry_ac_emsa_pkcs_v1_5_t _GCRY_ATTR_INTERNAL; - -/* Structure used for passing data to the implementation of the - `SSA-PKCS-V1_5' signature scheme. */ -typedef struct gcry_ac_ssa_pkcs_v1_5 -{ - gcry_md_algo_t md; -} gcry_ac_ssa_pkcs_v1_5_t _GCRY_ATTR_INTERNAL; - - -#ifndef GCRYPT_NO_DEPRECATED -/* Returns a new, empty data set in DATA. */ -gcry_error_t gcry_ac_data_new (gcry_ac_data_t *data) - /* */ _GCRY_ATTR_INTERNAL; - -/* Destroy the data set DATA. */ -void gcry_ac_data_destroy (gcry_ac_data_t data) - /* */ _GCRY_ATTR_INTERNAL; - -/* Create a copy of the data set DATA and store it in DATA_CP. */ -gcry_error_t gcry_ac_data_copy (gcry_ac_data_t *data_cp, - gcry_ac_data_t data) - /* */ _GCRY_ATTR_INTERNAL; - -/* Return the number of named MPI values inside of the data set - DATA. */ -unsigned int gcry_ac_data_length (gcry_ac_data_t data) - /* */ _GCRY_ATTR_INTERNAL; - -/* Destroy any values contained in the data set DATA. */ -void gcry_ac_data_clear (gcry_ac_data_t data) - /* */ _GCRY_ATTR_INTERNAL; - -/* Add the value MPI to DATA with the label NAME. If FLAGS contains - GCRY_AC_FLAG_DATA_COPY, the data set will contain copies of NAME - and MPI. If FLAGS contains GCRY_AC_FLAG_DATA_DEALLOC or - GCRY_AC_FLAG_DATA_COPY, the values contained in the data set will - be deallocated when they are to be removed from the data set. */ -gcry_error_t gcry_ac_data_set (gcry_ac_data_t data, unsigned int flags, - const char *name, gcry_mpi_t mpi) - /* */ _GCRY_ATTR_INTERNAL; - -/* Store the value labelled with NAME found in DATA in MPI. If FLAGS - contains GCRY_AC_FLAG_COPY, store a copy of the MPI value contained - in the data set. MPI may be NULL. */ -gcry_error_t gcry_ac_data_get_name (gcry_ac_data_t data, unsigned int flags, - const char *name, gcry_mpi_t *mpi) - /* */ _GCRY_ATTR_INTERNAL; - -/* Stores in NAME and MPI the named MPI value contained in the data - set DATA with the index IDX. If FLAGS contains GCRY_AC_FLAG_COPY, - store copies of the values contained in the data set. NAME or MPI - may be NULL. */ -gcry_error_t gcry_ac_data_get_index (gcry_ac_data_t data, unsigned int flags, - unsigned int idx, - const char **name, gcry_mpi_t *mpi) - /* */ _GCRY_ATTR_INTERNAL; - -/* Convert the data set DATA into a new S-Expression, which is to be - stored in SEXP, according to the identifiers contained in - IDENTIFIERS. */ -gcry_error_t gcry_ac_data_to_sexp (gcry_ac_data_t data, gcry_sexp_t *sexp, - const char **identifiers) - /* */ _GCRY_ATTR_INTERNAL; - -/* Create a new data set, which is to be stored in DATA_SET, from the - S-Expression SEXP, according to the identifiers contained in - IDENTIFIERS. */ -gcry_error_t gcry_ac_data_from_sexp (gcry_ac_data_t *data, gcry_sexp_t sexp, - const char **identifiers) - /* */ _GCRY_ATTR_INTERNAL; - -/* Initialize AC_IO according to MODE, TYPE and the variable list of - arguments. The list of variable arguments to specify depends on - the given TYPE. */ -void gcry_ac_io_init (gcry_ac_io_t *ac_io, gcry_ac_io_mode_t mode, - gcry_ac_io_type_t type, ...) - /* */ _GCRY_ATTR_INTERNAL; - -/* Initialize AC_IO according to MODE, TYPE and the variable list of - arguments AP. The list of variable arguments to specify depends on - the given TYPE. */ -void gcry_ac_io_init_va (gcry_ac_io_t *ac_io, gcry_ac_io_mode_t mode, - gcry_ac_io_type_t type, va_list ap) - /* */ _GCRY_ATTR_INTERNAL; - -/* Create a new ac handle. */ -gcry_error_t gcry_ac_open (gcry_ac_handle_t *handle, - gcry_ac_id_t algorithm, unsigned int flags) - /* */ _GCRY_ATTR_INTERNAL; - -/* Destroy an ac handle. */ -void gcry_ac_close (gcry_ac_handle_t handle) - /* */ _GCRY_ATTR_INTERNAL; - -/* Initialize a key from a given data set. */ -gcry_error_t gcry_ac_key_init (gcry_ac_key_t *key, gcry_ac_handle_t handle, - gcry_ac_key_type_t type, gcry_ac_data_t data) - /* */ _GCRY_ATTR_INTERNAL; - -/* Generates a new key pair via the handle HANDLE of NBITS bits and - stores it in KEY_PAIR. In case non-standard settings are wanted, a - pointer to a structure of type gcry_ac_key_spec_<algorithm>_t, - matching the selected algorithm, can be given as KEY_SPEC. - MISC_DATA is not used yet. */ -gcry_error_t gcry_ac_key_pair_generate (gcry_ac_handle_t handle, - unsigned int nbits, void *spec, - gcry_ac_key_pair_t *key_pair, - gcry_mpi_t **misc_data) - /* */ _GCRY_ATTR_INTERNAL; - -/* Returns the key of type WHICH out of the key pair KEY_PAIR. */ -gcry_ac_key_t gcry_ac_key_pair_extract (gcry_ac_key_pair_t key_pair, - gcry_ac_key_type_t which) - /* */ _GCRY_ATTR_INTERNAL; - -/* Returns the data set contained in the key KEY. */ -gcry_ac_data_t gcry_ac_key_data_get (gcry_ac_key_t key) - /* */ _GCRY_ATTR_INTERNAL; - -/* Verifies that the key KEY is sane via HANDLE. */ -gcry_error_t gcry_ac_key_test (gcry_ac_handle_t handle, gcry_ac_key_t key) - /* */ _GCRY_ATTR_INTERNAL; - -/* Stores the number of bits of the key KEY in NBITS via HANDLE. */ -gcry_error_t gcry_ac_key_get_nbits (gcry_ac_handle_t handle, - gcry_ac_key_t key, unsigned int *nbits) - /* */ _GCRY_ATTR_INTERNAL; - -/* Writes the 20 byte long key grip of the key KEY to KEY_GRIP via - HANDLE. */ -gcry_error_t gcry_ac_key_get_grip (gcry_ac_handle_t handle, gcry_ac_key_t key, - unsigned char *key_grip) - /* */ _GCRY_ATTR_INTERNAL; - -/* Destroy a key. */ -void gcry_ac_key_destroy (gcry_ac_key_t key) - /* */ _GCRY_ATTR_INTERNAL; - -/* Destroy a key pair. */ -void gcry_ac_key_pair_destroy (gcry_ac_key_pair_t key_pair) - /* */ _GCRY_ATTR_INTERNAL; - -/* Encodes a message according to the encoding method METHOD. OPTIONS - must be a pointer to a method-specific structure - (gcry_ac_em*_t). */ -gcry_error_t gcry_ac_data_encode (gcry_ac_em_t method, - unsigned int flags, void *options, - gcry_ac_io_t *io_read, - gcry_ac_io_t *io_write) - /* */ _GCRY_ATTR_INTERNAL; - -/* Decodes a message according to the encoding method METHOD. OPTIONS - must be a pointer to a method-specific structure - (gcry_ac_em*_t). */ -gcry_error_t gcry_ac_data_decode (gcry_ac_em_t method, - unsigned int flags, void *options, - gcry_ac_io_t *io_read, - gcry_ac_io_t *io_write) - /* */ _GCRY_ATTR_INTERNAL; - -/* Encrypt the plain text MPI value DATA_PLAIN with the key KEY under - the control of the flags FLAGS and store the resulting data set - into DATA_ENCRYPTED. */ -gcry_error_t gcry_ac_data_encrypt (gcry_ac_handle_t handle, - unsigned int flags, - gcry_ac_key_t key, - gcry_mpi_t data_plain, - gcry_ac_data_t *data_encrypted) - /* */ _GCRY_ATTR_INTERNAL; - -/* Decrypt the decrypted data contained in the data set DATA_ENCRYPTED - with the key KEY under the control of the flags FLAGS and store the - resulting plain text MPI value in DATA_PLAIN. */ -gcry_error_t gcry_ac_data_decrypt (gcry_ac_handle_t handle, - unsigned int flags, - gcry_ac_key_t key, - gcry_mpi_t *data_plain, - gcry_ac_data_t data_encrypted) - /* */ _GCRY_ATTR_INTERNAL; - -/* Sign the data contained in DATA with the key KEY and store the - resulting signature in the data set DATA_SIGNATURE. */ -gcry_error_t gcry_ac_data_sign (gcry_ac_handle_t handle, - gcry_ac_key_t key, - gcry_mpi_t data, - gcry_ac_data_t *data_signature) - /* */ _GCRY_ATTR_INTERNAL; - -/* Verify that the signature contained in the data set DATA_SIGNATURE - is indeed the result of signing the data contained in DATA with the - secret key belonging to the public key KEY. */ -gcry_error_t gcry_ac_data_verify (gcry_ac_handle_t handle, - gcry_ac_key_t key, - gcry_mpi_t data, - gcry_ac_data_t data_signature) - /* */ _GCRY_ATTR_INTERNAL; - -/* Encrypts the plain text readable from IO_MESSAGE through HANDLE - with the public key KEY according to SCHEME, FLAGS and OPTS. If - OPTS is not NULL, it has to be a pointer to a structure specific to - the chosen scheme (gcry_ac_es_*_t). The encrypted message is - written to IO_CIPHER. */ -gcry_error_t gcry_ac_data_encrypt_scheme (gcry_ac_handle_t handle, - gcry_ac_scheme_t scheme, - unsigned int flags, void *opts, - gcry_ac_key_t key, - gcry_ac_io_t *io_message, - gcry_ac_io_t *io_cipher) - /* */ _GCRY_ATTR_INTERNAL; - -/* Decrypts the cipher text readable from IO_CIPHER through HANDLE - with the secret key KEY according to SCHEME, @var{flags} and OPTS. - If OPTS is not NULL, it has to be a pointer to a structure specific - to the chosen scheme (gcry_ac_es_*_t). The decrypted message is - written to IO_MESSAGE. */ -gcry_error_t gcry_ac_data_decrypt_scheme (gcry_ac_handle_t handle, - gcry_ac_scheme_t scheme, - unsigned int flags, void *opts, - gcry_ac_key_t key, - gcry_ac_io_t *io_cipher, - gcry_ac_io_t *io_message) - /* */ _GCRY_ATTR_INTERNAL; - -/* Signs the message readable from IO_MESSAGE through HANDLE with the - secret key KEY according to SCHEME, FLAGS and OPTS. If OPTS is not - NULL, it has to be a pointer to a structure specific to the chosen - scheme (gcry_ac_ssa_*_t). The signature is written to - IO_SIGNATURE. */ -gcry_error_t gcry_ac_data_sign_scheme (gcry_ac_handle_t handle, - gcry_ac_scheme_t scheme, - unsigned int flags, void *opts, - gcry_ac_key_t key, - gcry_ac_io_t *io_message, - gcry_ac_io_t *io_signature) - /* */ _GCRY_ATTR_INTERNAL; - -/* Verifies through HANDLE that the signature readable from - IO_SIGNATURE is indeed the result of signing the message readable - from IO_MESSAGE with the secret key belonging to the public key KEY - according to SCHEME and OPTS. If OPTS is not NULL, it has to be an - anonymous structure (gcry_ac_ssa_*_t) specific to the chosen - scheme. */ -gcry_error_t gcry_ac_data_verify_scheme (gcry_ac_handle_t handle, - gcry_ac_scheme_t scheme, - unsigned int flags, void *opts, - gcry_ac_key_t key, - gcry_ac_io_t *io_message, - gcry_ac_io_t *io_signature) - /* */ _GCRY_ATTR_INTERNAL; - -/* Store the textual representation of the algorithm whose id is given - in ALGORITHM in NAME. This function is deprecated; use - gcry_pk_algo_name. */ -gcry_error_t gcry_ac_id_to_name (gcry_ac_id_t algorithm, - const char **name) - /* */ _GCRY_GCC_ATTR_DEPRECATED; -/* Store the numeric ID of the algorithm whose textual representation - is contained in NAME in ALGORITHM. This function is deprecated; - use gcry_pk_map_name. */ -gcry_error_t gcry_ac_name_to_id (const char *name, - gcry_ac_id_t *algorithm) - /* */ _GCRY_GCC_ATTR_DEPRECATED; -#endif /*GCRYPT_NO_DEPRECATED*/ /****************************** diff --git a/src/global.c b/src/global.c index d65b0680..93ff800c 100644 --- a/src/global.c +++ b/src/global.c @@ -123,15 +123,6 @@ global_init (void) err = _gcry_pk_init (); if (err) goto fail; -#if 0 - /* Hmmm, as of now ac_init does nothing. */ - if ( !fips_mode () ) - { - err = _gcry_ac_init (); - if (err) - goto fail; - } -#endif return; diff --git a/src/libgcrypt.def b/src/libgcrypt.def index 031b9410..55fd6d70 100644 --- a/src/libgcrypt.def +++ b/src/libgcrypt.def @@ -148,31 +148,10 @@ EXPORTS gcry_pk_get_keygrip @116 gcry_pk_list @117 - gcry_ac_data_new @118 - gcry_ac_data_destroy @119 - gcry_ac_data_set @120 - gcry_ac_data_copy @121 - gcry_ac_data_length @122 - gcry_ac_data_get_name @123 - gcry_ac_data_get_index @124 - gcry_ac_data_clear @125 - gcry_ac_open @126 - gcry_ac_close @127 - gcry_ac_key_init @128 - gcry_ac_key_pair_generate @129 - gcry_ac_key_pair_extract @130 - gcry_ac_key_data_get @131 - gcry_ac_key_test @132 - gcry_ac_key_get_nbits @133 - gcry_ac_key_get_grip @134 - gcry_ac_key_destroy @135 - gcry_ac_key_pair_destroy @136 - gcry_ac_data_encrypt @137 - gcry_ac_data_decrypt @138 - gcry_ac_data_sign @139 - gcry_ac_data_verify @140 - gcry_ac_id_to_name @141 - gcry_ac_name_to_id @142 +;; +;; 118 to 142 were used in previous Libgcrypt versions for the gcry_ac +;; interface +;; gcry_md_open @143 gcry_md_close @144 @@ -216,14 +195,10 @@ EXPORTS gcry_pk_register @177 gcry_pk_unregister @178 - gcry_ac_data_from_sexp @179 - gcry_ac_data_to_sexp @180 - gcry_ac_io_init @181 - gcry_ac_io_init_va @182 - gcry_ac_data_encrypt_scheme @183 - gcry_ac_data_decrypt_scheme @184 - gcry_ac_data_sign_scheme @185 - gcry_ac_data_verify_scheme @186 +;; +;; 179 to 186 were used in previous Libgcrypt versions for the gcry_ac +;; interface +;; gcry_sexp_nth_string @187 diff --git a/src/libgcrypt.vers b/src/libgcrypt.vers index 5a617ccb..58307db5 100644 --- a/src/libgcrypt.vers +++ b/src/libgcrypt.vers @@ -1,5 +1,5 @@ # libgcrypt.vers - What symbols to export -*- std -*- -# Copyright (C) 2002, 2004, 2008 Free Software Foundation, Inc. +# Copyright (C) 2002, 2004, 2008, 2011 Free Software Foundation, Inc. # # This file is part of Libgcrypt. # @@ -20,7 +20,7 @@ # NOTE: When adding new functions, please make sure to add them to # visibility.h and libgcrypt.def as well. -GCRYPT_1.2 { +GCRYPT_1.6 { global: gcry_check_version; gcry_control; gcry_set_allocation_handler; gcry_set_fatalerror_handler; @@ -59,22 +59,6 @@ GCRYPT_1.2 { gcry_pk_testkey; gcry_pk_unregister; gcry_pk_verify; gcry_pk_get_curve; gcry_pk_get_param; - gcry_ac_data_new; gcry_ac_data_destroy; gcry_ac_data_copy; - gcry_ac_data_length; gcry_ac_data_clear; gcry_ac_data_set; - gcry_ac_data_get_name; gcry_ac_data_get_index; gcry_ac_open; - gcry_ac_close; gcry_ac_key_init; gcry_ac_key_pair_generate; - gcry_ac_key_pair_extract; gcry_ac_key_data_get; gcry_ac_key_test; - gcry_ac_key_get_nbits; gcry_ac_key_get_grip; gcry_ac_key_destroy; - gcry_ac_key_pair_destroy; gcry_ac_data_encrypt; gcry_ac_data_decrypt; - gcry_ac_data_sign; gcry_ac_data_verify; gcry_ac_id_to_name; - gcry_ac_name_to_id; gcry_ac_list; gcry_ac_data_encode; - gcry_ac_data_decode; gcry_ac_mpi_to_os; gcry_ac_mpi_to_os_alloc; - gcry_ac_os_to_mpi; gcry_ac_data_encrypt_scheme; - gcry_ac_data_decrypt_scheme; - gcry_ac_data_sign_scheme; gcry_ac_data_verify_scheme; - gcry_ac_data_to_sexp; gcry_ac_data_from_sexp; - gcry_ac_io_init; gcry_ac_io_init_va; - gcry_kdf_derive; gcry_prime_check; gcry_prime_generate; diff --git a/src/visibility.c b/src/visibility.c index 2fccb017..d1c55de5 100644 --- a/src/visibility.c +++ b/src/visibility.c @@ -928,287 +928,6 @@ gcry_md_list (int *list, int *list_length) return _gcry_md_list (list, list_length); } -gcry_error_t -gcry_ac_data_new (gcry_ac_data_t *data) -{ - return _gcry_ac_data_new (data); -} - -void -gcry_ac_data_destroy (gcry_ac_data_t data) -{ - _gcry_ac_data_destroy (data); -} - -gcry_error_t -gcry_ac_data_copy (gcry_ac_data_t *data_cp, gcry_ac_data_t data) -{ - return _gcry_ac_data_copy (data_cp, data); -} - -unsigned int -gcry_ac_data_length (gcry_ac_data_t data) -{ - return _gcry_ac_data_length (data); -} - -void -gcry_ac_data_clear (gcry_ac_data_t data) -{ - _gcry_ac_data_clear (data); -} - -gcry_error_t -gcry_ac_data_set (gcry_ac_data_t data, unsigned int flags, - const char *name, gcry_mpi_t mpi) -{ - return _gcry_ac_data_set (data, flags, name, mpi); -} - -gcry_error_t -gcry_ac_data_get_name (gcry_ac_data_t data, unsigned int flags, - const char *name, gcry_mpi_t *mpi) -{ - return _gcry_ac_data_get_name (data, flags, name, mpi); -} - -gcry_error_t -gcry_ac_data_get_index (gcry_ac_data_t data, unsigned int flags, - unsigned int idx, const char **name, gcry_mpi_t *mpi) -{ - return _gcry_ac_data_get_index (data, flags, idx, name, mpi); -} - -gcry_error_t -gcry_ac_data_to_sexp (gcry_ac_data_t data, gcry_sexp_t *sexp, - const char **identifiers) -{ - return _gcry_ac_data_to_sexp (data, sexp, identifiers); -} - -gcry_error_t -gcry_ac_data_from_sexp (gcry_ac_data_t *data, gcry_sexp_t sexp, - const char **identifiers) -{ - return _gcry_ac_data_from_sexp (data, sexp, identifiers); -} - -void -gcry_ac_io_init (gcry_ac_io_t *ac_io, gcry_ac_io_mode_t mode, - gcry_ac_io_type_t type, ...) -{ - va_list arg_ptr; - - va_start (arg_ptr, type); - _gcry_ac_io_init_va (ac_io, mode, type, arg_ptr); - va_end (arg_ptr); -} - -void -gcry_ac_io_init_va (gcry_ac_io_t *ac_io, gcry_ac_io_mode_t mode, - gcry_ac_io_type_t type, va_list ap) -{ - _gcry_ac_io_init_va (ac_io, mode, type, ap); -} - -gcry_error_t -gcry_ac_open (gcry_ac_handle_t *handle, - gcry_ac_id_t algorithm, unsigned int flags) -{ - return _gcry_ac_open (handle, algorithm, flags); -} - -void -gcry_ac_close (gcry_ac_handle_t handle) -{ - _gcry_ac_close (handle); -} - -gcry_error_t -gcry_ac_key_init (gcry_ac_key_t *key, gcry_ac_handle_t handle, - gcry_ac_key_type_t type, gcry_ac_data_t data) -{ - return _gcry_ac_key_init (key, handle, type, data); -} - -gcry_error_t -gcry_ac_key_pair_generate (gcry_ac_handle_t handle, - unsigned int nbits, void *spec, - gcry_ac_key_pair_t *key_pair, - gcry_mpi_t **miscdata) -{ - return _gcry_ac_key_pair_generate ( handle, nbits, spec, key_pair, miscdata); -} - -gcry_ac_key_t -gcry_ac_key_pair_extract (gcry_ac_key_pair_t keypair, gcry_ac_key_type_t which) -{ - return _gcry_ac_key_pair_extract (keypair, which); -} - -gcry_ac_data_t -gcry_ac_key_data_get (gcry_ac_key_t key) -{ - return _gcry_ac_key_data_get (key); -} - -gcry_error_t -gcry_ac_key_test (gcry_ac_handle_t handle, gcry_ac_key_t key) -{ - return _gcry_ac_key_test (handle, key); -} - -gcry_error_t -gcry_ac_key_get_nbits (gcry_ac_handle_t handle, - gcry_ac_key_t key, unsigned int *nbits) -{ - return _gcry_ac_key_get_nbits (handle, key, nbits); -} - -gcry_error_t -gcry_ac_key_get_grip (gcry_ac_handle_t handle, gcry_ac_key_t key, - unsigned char *key_grip) -{ - return _gcry_ac_key_get_grip (handle, key, key_grip); -} - -void -gcry_ac_key_destroy (gcry_ac_key_t key) -{ - _gcry_ac_key_destroy (key); -} - -void -gcry_ac_key_pair_destroy (gcry_ac_key_pair_t key_pair) -{ - _gcry_ac_key_pair_destroy (key_pair); -} - -gcry_error_t -gcry_ac_data_encode (gcry_ac_em_t method, unsigned int flags, void *options, - gcry_ac_io_t *io_read, gcry_ac_io_t *io_write) -{ - return _gcry_ac_data_encode (method, flags, options, io_read, io_write); -} - -gcry_error_t -gcry_ac_data_decode (gcry_ac_em_t method, unsigned int flags, void *options, - gcry_ac_io_t *io_read, gcry_ac_io_t *io_write) -{ - return _gcry_ac_data_decode (method, flags, options, io_read, io_write); -} - -gcry_error_t -gcry_ac_data_encrypt (gcry_ac_handle_t handle, - unsigned int flags, - gcry_ac_key_t key, - gcry_mpi_t data_plain, - gcry_ac_data_t *data_encrypted) -{ - return _gcry_ac_data_encrypt (handle, flags, key, - data_plain, data_encrypted); -} - -gcry_error_t -gcry_ac_data_decrypt (gcry_ac_handle_t handle, - unsigned int flags, - gcry_ac_key_t key, - gcry_mpi_t *data_plain, - gcry_ac_data_t data_encrypted) -{ - return _gcry_ac_data_decrypt (handle, flags, key, - data_plain, data_encrypted); -} - -gcry_error_t -gcry_ac_data_sign (gcry_ac_handle_t handle, - gcry_ac_key_t key, - gcry_mpi_t data, - gcry_ac_data_t *data_signature) -{ - return _gcry_ac_data_sign (handle, key, data, data_signature); -} - -gcry_error_t -gcry_ac_data_verify (gcry_ac_handle_t handle, - gcry_ac_key_t key, - gcry_mpi_t data, - gcry_ac_data_t data_signature) -{ - return _gcry_ac_data_verify (handle, key, data, data_signature); -} - -gcry_error_t -gcry_ac_data_encrypt_scheme (gcry_ac_handle_t handle, - gcry_ac_scheme_t scheme, - unsigned int flags, void *opts, - gcry_ac_key_t key, - gcry_ac_io_t *io_message, - gcry_ac_io_t *io_cipher) -{ - return _gcry_ac_data_encrypt_scheme (handle, scheme, flags, opts, key, - io_message, io_cipher); -} - -gcry_error_t -gcry_ac_data_decrypt_scheme (gcry_ac_handle_t handle, - gcry_ac_scheme_t scheme, - unsigned int flags, void *opts, - gcry_ac_key_t key, - gcry_ac_io_t *io_cipher, - gcry_ac_io_t *io_message) -{ - return _gcry_ac_data_decrypt_scheme (handle, scheme, flags, opts, key, - io_cipher, io_message); -} - -gcry_error_t -gcry_ac_data_sign_scheme (gcry_ac_handle_t handle, - gcry_ac_scheme_t scheme, - unsigned int flags, void *opts, - gcry_ac_key_t key, - gcry_ac_io_t *io_message, - gcry_ac_io_t *io_signature) -{ - return _gcry_ac_data_sign_scheme (handle, scheme, flags, opts, key, - io_message, io_signature); -} - -gcry_error_t -gcry_ac_data_verify_scheme (gcry_ac_handle_t handle, - gcry_ac_scheme_t scheme, - unsigned int flags, void *opts, - gcry_ac_key_t key, - gcry_ac_io_t *io_message, - gcry_ac_io_t *io_signature) -{ - return _gcry_ac_data_verify_scheme (handle, scheme, flags, opts, key, - io_message, io_signature); -} - -gcry_error_t -gcry_ac_id_to_name (gcry_ac_id_t algorithm, const char **name) -{ - /* This function is deprecated. We implement it in terms of the - suggested replacement. */ - const char *tmp = _gcry_pk_algo_name (algorithm); - if (!*tmp) - return gcry_error (GPG_ERR_PUBKEY_ALGO); - *name = tmp; - return 0; -} - -gcry_error_t -gcry_ac_name_to_id (const char *name, gcry_ac_id_t *algorithm) -{ - /* This function is deprecated. We implement it in terms of the - suggested replacement. */ - int algo = _gcry_pk_map_name (name); - if (!algo) - return gcry_error (GPG_ERR_PUBKEY_ALGO); - *algorithm = algo; - return 0; -} gpg_error_t gcry_kdf_derive (const void *passphrase, size_t passphraselen, diff --git a/src/visibility.h b/src/visibility.h index 3c1e8aa8..072018ac 100644 --- a/src/visibility.h +++ b/src/visibility.h @@ -114,45 +114,6 @@ #define gcry_pk_testkey _gcry_pk_testkey #define gcry_pk_verify _gcry_pk_verify -#define gcry_ac_data_new _gcry_ac_data_new -#define gcry_ac_data_destroy _gcry_ac_data_destroy -#define gcry_ac_data_copy _gcry_ac_data_copy -#define gcry_ac_data_length _gcry_ac_data_length -#define gcry_ac_data_clear _gcry_ac_data_clear -#define gcry_ac_data_set _gcry_ac_data_set -#define gcry_ac_data_get_name _gcry_ac_data_get_name -#define gcry_ac_data_get_index _gcry_ac_data_get_index -#define gcry_ac_open _gcry_ac_open -#define gcry_ac_close _gcry_ac_close -#define gcry_ac_key_init _gcry_ac_key_init -#define gcry_ac_key_pair_generate _gcry_ac_key_pair_generate -#define gcry_ac_key_pair_extract _gcry_ac_key_pair_extract -#define gcry_ac_key_data_get _gcry_ac_key_data_get -#define gcry_ac_key_test _gcry_ac_key_test -#define gcry_ac_key_get_nbits _gcry_ac_key_get_nbits -#define gcry_ac_key_get_grip _gcry_ac_key_get_grip -#define gcry_ac_key_destroy _gcry_ac_key_destroy -#define gcry_ac_key_pair_destroy _gcry_ac_key_pair_destroy -#define gcry_ac_data_encrypt _gcry_ac_data_encrypt -#define gcry_ac_data_decrypt _gcry_ac_data_decrypt -#define gcry_ac_data_sign _gcry_ac_data_sign -#define gcry_ac_data_verify _gcry_ac_data_verify -#define gcry_ac_id_to_name _gcry_ac_id_to_name -#define gcry_ac_name_to_id _gcry_ac_name_to_id -#define gcry_ac_data_encode _gcry_ac_data_encode -#define gcry_ac_data_decode _gcry_ac_data_decode -#define gcry_ac_mpi_to_os _gcry_ac_mpi_to_os -#define gcry_ac_mpi_to_os_alloc _gcry_ac_mpi_to_os_alloc -#define gcry_ac_os_to_mpi _gcry_ac_os_to_mpi -#define gcry_ac_data_encrypt_scheme _gcry_ac_data_encrypt_scheme -#define gcry_ac_data_decrypt_scheme _gcry_ac_data_decrypt_scheme -#define gcry_ac_data_sign_scheme _gcry_ac_data_sign_scheme -#define gcry_ac_data_verify_scheme _gcry_ac_data_verify_scheme -#define gcry_ac_data_to_sexp _gcry_ac_data_to_sexp -#define gcry_ac_data_from_sexp _gcry_ac_data_from_sexp -#define gcry_ac_io_init _gcry_ac_io_init -#define gcry_ac_io_init_va _gcry_ac_io_init_va - #define gcry_kdf_derive _gcry_kdf_derive #define gcry_prime_check _gcry_prime_check @@ -241,99 +202,7 @@ deprecated attribute. */ # define GCRYPT_NO_DEPRECATED # include "gcrypt.h" -/* The algorithm IDs. */ - gcry_error_t gcry_ac_data_new (gcry_ac_data_t *data); - void gcry_ac_data_destroy (gcry_ac_data_t data); - gcry_error_t gcry_ac_data_copy (gcry_ac_data_t *data_cp, - gcry_ac_data_t data); - unsigned int gcry_ac_data_length (gcry_ac_data_t data); - void gcry_ac_data_clear (gcry_ac_data_t data); - gcry_error_t gcry_ac_data_set (gcry_ac_data_t data, unsigned int flags, - const char *name, gcry_mpi_t mpi); - gcry_error_t gcry_ac_data_get_name (gcry_ac_data_t data, unsigned int flags, - const char *name, gcry_mpi_t *mpi); - gcry_error_t gcry_ac_data_get_index (gcry_ac_data_t data, unsigned int flags, - unsigned int idx, - const char **name, gcry_mpi_t *mpi); - gcry_error_t gcry_ac_data_to_sexp (gcry_ac_data_t data, gcry_sexp_t *sexp, - const char **identifiers); - gcry_error_t gcry_ac_data_from_sexp (gcry_ac_data_t *data, gcry_sexp_t sexp, - const char **identifiers); - void gcry_ac_io_init (gcry_ac_io_t *ac_io, gcry_ac_io_mode_t mode, - gcry_ac_io_type_t type, ...); - void gcry_ac_io_init_va (gcry_ac_io_t *ac_io, gcry_ac_io_mode_t mode, - gcry_ac_io_type_t type, va_list ap); - gcry_error_t gcry_ac_open (gcry_ac_handle_t *handle, - gcry_ac_id_t algorithm, unsigned int flags); - void gcry_ac_close (gcry_ac_handle_t handle); - gcry_error_t gcry_ac_key_init (gcry_ac_key_t *key, gcry_ac_handle_t handle, - gcry_ac_key_type_t type, gcry_ac_data_t data); - gcry_error_t gcry_ac_key_pair_generate (gcry_ac_handle_t handle, - unsigned int nbits, void *spec, - gcry_ac_key_pair_t *key_pair, - gcry_mpi_t **misc_data); - gcry_ac_key_t gcry_ac_key_pair_extract (gcry_ac_key_pair_t key_pair, - gcry_ac_key_type_t which); - gcry_ac_data_t gcry_ac_key_data_get (gcry_ac_key_t key); - gcry_error_t gcry_ac_key_test (gcry_ac_handle_t handle, gcry_ac_key_t key); - gcry_error_t gcry_ac_key_get_nbits (gcry_ac_handle_t handle, - gcry_ac_key_t key, unsigned int *nbits); - gcry_error_t gcry_ac_key_get_grip (gcry_ac_handle_t handle, gcry_ac_key_t key, - unsigned char *key_grip); - void gcry_ac_key_destroy (gcry_ac_key_t key); - void gcry_ac_key_pair_destroy (gcry_ac_key_pair_t key_pair); - gcry_error_t gcry_ac_data_encode (gcry_ac_em_t method, - unsigned int flags, void *options, - gcry_ac_io_t *io_read, - gcry_ac_io_t *io_write); - gcry_error_t gcry_ac_data_decode (gcry_ac_em_t method, - unsigned int flags, void *options, - gcry_ac_io_t *io_read, - gcry_ac_io_t *io_write); - gcry_error_t gcry_ac_data_encrypt (gcry_ac_handle_t handle, - unsigned int flags, - gcry_ac_key_t key, - gcry_mpi_t data_plain, - gcry_ac_data_t *data_encrypted); - gcry_error_t gcry_ac_data_decrypt (gcry_ac_handle_t handle, - unsigned int flags, - gcry_ac_key_t key, - gcry_mpi_t *data_plain, - gcry_ac_data_t data_encrypted); - gcry_error_t gcry_ac_data_sign (gcry_ac_handle_t handle, - gcry_ac_key_t key, - gcry_mpi_t data, - gcry_ac_data_t *data_signature); - gcry_error_t gcry_ac_data_verify (gcry_ac_handle_t handle, - gcry_ac_key_t key, - gcry_mpi_t data, - gcry_ac_data_t data_signature); - gcry_error_t gcry_ac_data_encrypt_scheme (gcry_ac_handle_t handle, - gcry_ac_scheme_t scheme, - unsigned int flags, void *opts, - gcry_ac_key_t key, - gcry_ac_io_t *io_message, - gcry_ac_io_t *io_cipher); - gcry_error_t gcry_ac_data_decrypt_scheme (gcry_ac_handle_t handle, - gcry_ac_scheme_t scheme, - unsigned int flags, void *opts, - gcry_ac_key_t key, - gcry_ac_io_t *io_cipher, - gcry_ac_io_t *io_message); - gcry_error_t gcry_ac_data_sign_scheme (gcry_ac_handle_t handle, - gcry_ac_scheme_t scheme, - unsigned int flags, void *opts, - gcry_ac_key_t key, - gcry_ac_io_t *io_message, - gcry_ac_io_t *io_signature); - gcry_error_t gcry_ac_data_verify_scheme (gcry_ac_handle_t handle, - gcry_ac_scheme_t scheme, - unsigned int flags, void *opts, - gcry_ac_key_t key, - gcry_ac_io_t *io_message, - gcry_ac_io_t *io_signature); - gcry_error_t gcry_ac_id_to_name (gcry_ac_id_t algorithm, const char **name); - gcry_error_t gcry_ac_name_to_id (const char *name, gcry_ac_id_t *algorithm); + /* None in this version. */ #else # include "gcrypt.h" #endif @@ -341,11 +210,6 @@ /* Prototypes of functions exported but not ready for use. */ gcry_err_code_t gcry_md_get (gcry_md_hd_t hd, int algo, unsigned char *buffer, int buflen); -void gcry_ac_mpi_to_os (gcry_mpi_t mpi, unsigned char *os, size_t os_n); -gcry_error_t gcry_ac_mpi_to_os_alloc (gcry_mpi_t mpi, unsigned char **os, - size_t *os_n); -void gcry_ac_os_to_mpi (gcry_mpi_t mpi, unsigned char *os, size_t os_n); - /* Our use of the ELF visibility feature works by passing @@ -464,45 +328,6 @@ void gcry_ac_os_to_mpi (gcry_mpi_t mpi, unsigned char *os, size_t os_n); #undef gcry_pk_testkey #undef gcry_pk_verify -#undef gcry_ac_data_new -#undef gcry_ac_data_destroy -#undef gcry_ac_data_copy -#undef gcry_ac_data_length -#undef gcry_ac_data_clear -#undef gcry_ac_data_set -#undef gcry_ac_data_get_name -#undef gcry_ac_data_get_index -#undef gcry_ac_open -#undef gcry_ac_close -#undef gcry_ac_key_init -#undef gcry_ac_key_pair_generate -#undef gcry_ac_key_pair_extract -#undef gcry_ac_key_data_get -#undef gcry_ac_key_test -#undef gcry_ac_key_get_nbits -#undef gcry_ac_key_get_grip -#undef gcry_ac_key_destroy -#undef gcry_ac_key_pair_destroy -#undef gcry_ac_data_encrypt -#undef gcry_ac_data_decrypt -#undef gcry_ac_data_sign -#undef gcry_ac_data_verify -#undef gcry_ac_id_to_name -#undef gcry_ac_name_to_id -#undef gcry_ac_data_encode -#undef gcry_ac_data_decode -#undef gcry_ac_mpi_to_os -#undef gcry_ac_mpi_to_os_alloc -#undef gcry_ac_os_to_mpi -#undef gcry_ac_data_encrypt_scheme -#undef gcry_ac_data_decrypt_scheme -#undef gcry_ac_data_sign_scheme -#undef gcry_ac_data_verify_scheme -#undef gcry_ac_data_to_sexp -#undef gcry_ac_data_from_sexp -#undef gcry_ac_io_init -#undef gcry_ac_io_init_va - #undef gcry_kdf_derive #undef gcry_prime_check @@ -678,47 +503,6 @@ MARK_VISIBLE (gcry_pk_testkey) MARK_VISIBLE (gcry_pk_unregister) MARK_VISIBLE (gcry_pk_verify) -MARK_VISIBLE (gcry_ac_data_new) -MARK_VISIBLE (gcry_ac_data_destroy) -MARK_VISIBLE (gcry_ac_data_copy) -MARK_VISIBLE (gcry_ac_data_length) -MARK_VISIBLE (gcry_ac_data_clear) -MARK_VISIBLE (gcry_ac_data_set) -MARK_VISIBLE (gcry_ac_data_get_name) -MARK_VISIBLE (gcry_ac_data_get_index) -MARK_VISIBLE (gcry_ac_open) -MARK_VISIBLE (gcry_ac_close) -MARK_VISIBLE (gcry_ac_key_init) -MARK_VISIBLE (gcry_ac_key_pair_generate) -MARK_VISIBLE (gcry_ac_key_pair_extract) -MARK_VISIBLE (gcry_ac_key_data_get) -MARK_VISIBLE (gcry_ac_key_test) -MARK_VISIBLE (gcry_ac_key_get_nbits) -MARK_VISIBLE (gcry_ac_key_get_grip) -MARK_VISIBLE (gcry_ac_key_destroy) -MARK_VISIBLE (gcry_ac_key_pair_destroy) -MARK_VISIBLE (gcry_ac_data_encrypt) -MARK_VISIBLE (gcry_ac_data_decrypt) -MARK_VISIBLE (gcry_ac_data_sign) -MARK_VISIBLE (gcry_ac_data_verify) -MARK_VISIBLE (gcry_ac_id_to_name) -MARK_VISIBLE (gcry_ac_name_to_id) -/* MARK_VISIBLE (gcry_ac_list) Not defined although it is in - libgcrypt.vers. */ -MARK_VISIBLE (gcry_ac_data_encode) -MARK_VISIBLE (gcry_ac_data_decode) -MARK_VISIBLE (gcry_ac_mpi_to_os) -MARK_VISIBLE (gcry_ac_mpi_to_os_alloc) -MARK_VISIBLE (gcry_ac_os_to_mpi) -MARK_VISIBLE (gcry_ac_data_encrypt_scheme) -MARK_VISIBLE (gcry_ac_data_decrypt_scheme) -MARK_VISIBLE (gcry_ac_data_sign_scheme) -MARK_VISIBLE (gcry_ac_data_verify_scheme) -MARK_VISIBLE (gcry_ac_data_to_sexp) -MARK_VISIBLE (gcry_ac_data_from_sexp) -MARK_VISIBLE (gcry_ac_io_init) -MARK_VISIBLE (gcry_ac_io_init_va) - MARK_VISIBLE (gcry_kdf_derive) MARK_VISIBLE (gcry_prime_check) |