1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-30 13:01:23 +03:00

chachapoly: Use a function instead of an extern variable

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider
2018-06-30 14:23:05 +02:00
parent a19513b87a
commit 6dd9303729
5 changed files with 10 additions and 8 deletions

View File

@@ -30,8 +30,6 @@
#ifdef HAVE_LIBMBEDCRYPTO
#include <mbedtls/md.h>
extern const struct ssh_cipher_struct chacha20poly1305_cipher;
struct ssh_mac_ctx_struct {
enum ssh_mac_e mac_type;
mbedtls_md_context_t ctx;
@@ -964,7 +962,7 @@ void ssh_mbedtls_init(void)
cmp = strcmp(ssh_ciphertab[i].name, "chacha20-poly1305@openssh.com");
if (cmp == 0) {
memcpy(&ssh_ciphertab[i],
&chacha20poly1305_cipher,
ssh_get_chacha20poly1305_cipher(),
sizeof(struct ssh_cipher_struct));
break;
}