From 52865e5eeb36c93c8cff8cd88623bbe5e9e9c90d Mon Sep 17 00:00:00 2001 From: Dmitry Eremin-Solenikov Date: Wed, 30 Nov 2016 06:40:39 +0300 Subject: Rework KX -> PK mappings GOST VKO and PSS keys would support several public keys, so change the previous 1:1 kx->pk mapping into 1:many. Signed-off-by: Dmitry Eremin-Solenikov Signed-off-by: Nikos Mavrogiannopoulos --- lib/algorithms.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'lib/algorithms.h') diff --git a/lib/algorithms.h b/lib/algorithms.h index 60c0915098..b666668cf0 100644 --- a/lib/algorithms.h +++ b/lib/algorithms.h @@ -270,7 +270,6 @@ inline static int _gnutls_cipher_get_tag_size(const cipher_entry_st * e) /* Functions for key exchange. */ bool _gnutls_kx_needs_dh_params(gnutls_kx_algorithm_t algorithm); bool _gnutls_kx_allows_false_start(gnutls_session_t session); -int _gnutls_kx_cert_pk_params(gnutls_kx_algorithm_t algorithm); mod_auth_st *_gnutls_kx_auth_struct(gnutls_kx_algorithm_t algorithm); int _gnutls_kx_is_ok(gnutls_kx_algorithm_t algorithm); @@ -283,11 +282,9 @@ gnutls_credentials_type_t _gnutls_map_kx_get_cred(gnutls_kx_algorithm_t algorithm, int server); /* KX to PK mapping. */ - -/* DSA + RSA + ECC */ -#define GNUTLS_DISTINCT_PK_ALGORITHMS 3 -gnutls_pk_algorithm_t _gnutls_map_kx_get_pk(gnutls_kx_algorithm_t - kx_algorithm); +int +_gnutls_kx_supports_pk(gnutls_kx_algorithm_t kx_algorithm, + gnutls_pk_algorithm_t pk_algorithm); enum encipher_type { CIPHER_ENCRYPT = 0, CIPHER_SIGN = 1, CIPHER_IGN }; -- cgit v1.2.1