aboutsummaryrefslogtreecommitdiff
path: root/src/libcrypto.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-06-30 14:23:05 +0200
committerAndreas Schneider <asn@cryptomilk.org>2018-06-30 14:37:04 +0200
commit6dd9303729b430af3eaf1014af5af99c9230e9c7 (patch)
tree66054cac0f7a195506a7d9f8ba2503fe955b9397 /src/libcrypto.c
parenta19513b87a7763a521a33771bac238118f9ec6e8 (diff)
downloadlibssh-6dd9303729b430af3eaf1014af5af99c9230e9c7.tar.gz
libssh-6dd9303729b430af3eaf1014af5af99c9230e9c7.tar.xz
libssh-6dd9303729b430af3eaf1014af5af99c9230e9c7.zip
chachapoly: Use a function instead of an extern variable
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/libcrypto.c')
-rw-r--r--src/libcrypto.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libcrypto.c b/src/libcrypto.c
index 186d6105..0e30727f 100644
--- a/src/libcrypto.c
+++ b/src/libcrypto.c
@@ -60,7 +60,6 @@
#include "libssh/crypto.h"
-extern const struct ssh_cipher_struct chacha20poly1305_cipher;
struct ssh_mac_ctx_struct {
enum ssh_mac_e mac_type;
union {
@@ -764,7 +763,7 @@ void libcrypto_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;
}