From 1f3cfad66456dd6f2e48f20b8eb0c51343449a1c Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 11 Apr 2013 20:27:46 +0200 Subject: Add gcry_pubkey_get_sexp. * src/gcrypt.h.in (GCRY_PK_GET_PUBKEY): New. (GCRY_PK_GET_SECKEY): New. (gcry_pubkey_get_sexp): New. * src/visibility.c (gcry_pubkey_get_sexp): New. * src/visibility.h (gcry_pubkey_get_sexp): Mark visible. * src/libgcrypt.def, src/libgcrypt.vers: Add new function. * cipher/pubkey-internal.h: New. * cipher/Makefile.am (libcipher_la_SOURCES): Add new file. * cipher/ecc.c: Include pubkey-internal.h (_gcry_pk_ecc_get_sexp): New. * cipher/pubkey.c: Include pubkey-internal.h and context.h. (_gcry_pubkey_get_sexp): New. * src/context.c (_gcry_ctx_find_pointer): New. * src/cipher-proto.h: Add _gcry_pubkey_get_sexp. * tests/t-mpi-point.c (print_sexp): New. (context_param, basic_ec_math_simplified): Add tests for the new function. * configure.ac (NEED_GPG_ERROR_VERSION): Set to 1.11. (AH_BOTTOM) Add error codes from gpg-error 1.12 * src/g10lib.h (fips_not_operational): Use GPG_ERR_NOT_OPERATIONAL. * mpi/ec.c (_gcry_mpi_ec_get_mpi): Fix computation of Q. (_gcry_mpi_ec_get_point): Ditto. -- While checking the new code I figured that the auto-computation of Q must have led to a segv. It seems we had no test case for that. Signed-off-by: Werner Koch --- src/visibility.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/visibility.h') diff --git a/src/visibility.h b/src/visibility.h index 031537a1..1564e865 100644 --- a/src/visibility.h +++ b/src/visibility.h @@ -494,6 +494,7 @@ MARK_VISIBLE (gcry_pk_map_name) MARK_VISIBLE (gcry_pk_sign) MARK_VISIBLE (gcry_pk_testkey) MARK_VISIBLE (gcry_pk_verify) +MARK_VISIBLEX(gcry_pubkey_get_sexp) MARK_VISIBLE (gcry_kdf_derive) -- cgit v1.2.1