X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fgcrypt%2Fecdh.c;fp=src%2Fopenssl%2Fecdh.h;h=4e30733f4a36873bf8f545027cc7b0a66a9e6ad4;hp=ef7de6e944d293d2fa47624633257daf0f8dabdc;hb=9b9230a0a79c670b86f54fadd2807b864ff9d91f;hpb=e70b5b5bd77bb66e8dd324c17d86d9bff151aa82 diff --git a/src/openssl/ecdh.h b/src/gcrypt/ecdh.c similarity index 60% rename from src/openssl/ecdh.h rename to src/gcrypt/ecdh.c index ef7de6e9..4e30733f 100644 --- a/src/openssl/ecdh.h +++ b/src/gcrypt/ecdh.c @@ -1,6 +1,6 @@ /* - ecdh.h -- header file for ecdh.c - Copyright (C) 2011 Guus Sliepen + ecdh.c -- Diffie-Hellman key exchange handling + Copyright (C) 2011-2013 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,18 +17,21 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef __TINC_ECDH_H__ -#define __TINC_ECDH_H__ +#include "../system.h" -#include +#include "../ecdh.h" +#include "../logger.h" +#include "../utils.h" +#include "../xalloc.h" -#define ECDH_SIZE 67 -#define ECDH_SHARED_SIZE 66 +ecdh_t *ecdh_generate_public(void *pubkey) { + logger(DEBUG_ALWAYS, LOG_ERR, "EC support using libgcrypt not implemented"); + return NULL; +} -typedef EC_KEY *ecdh_t; +bool ecdh_compute_shared(ecdh_t *ecdh, const void *pubkey, void *shared) { + return false +} -extern bool ecdh_generate_public(ecdh_t *ecdh, void *pubkey); -extern bool ecdh_compute_shared(ecdh_t *ecdh, const void *pubkey, void *shared); -extern void ecdh_free(ecdh_t *ecdh); - -#endif +void ecdh_free(ecdh_t *ecdh) { +}