aboutsummaryrefslogtreecommitdiff
path: root/src/libmbedcrypto.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libmbedcrypto.c')
-rw-r--r--src/libmbedcrypto.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/libmbedcrypto.c b/src/libmbedcrypto.c
index 2db0f3ea..ee3fad79 100644
--- a/src/libmbedcrypto.c
+++ b/src/libmbedcrypto.c
@@ -1216,6 +1216,17 @@ static void cipher_cleanup(struct ssh_cipher_struct *cipher)
#endif /* MBEDTLS_GCM_C */
}
+#ifdef WITH_INSECURE_NONE
+static void
+none_crypt(UNUSED_PARAM(struct ssh_cipher_struct *cipher),
+ void *in,
+ void *out,
+ size_t len)
+{
+ memcpy(out, in, len);
+}
+#endif /* WITH_INSECURE_NONE */
+
static struct ssh_cipher_struct ssh_ciphertab[] = {
#ifdef WITH_BLOWFISH_CIPHER
{
@@ -1356,6 +1367,15 @@ static struct ssh_cipher_struct ssh_ciphertab[] = {
.name = "chacha20-poly1305@openssh.com"
#endif
},
+#ifdef WITH_INSECURE_NONE
+ {
+ .name = "none",
+ .blocksize = 8,
+ .keysize = 0,
+ .encrypt = none_crypt,
+ .decrypt = none_crypt,
+ },
+#endif /* WITH_INSECURE_NONE */
{
.name = NULL,
.blocksize = 0,