diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2022-10-24 23:02:58 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2022-10-25 00:24:43 +0000 |
commit | fd6dd33dc08772fd8a19ec5674bcfb783d18938a (patch) | |
tree | 87165c8aeac44270b291df00eac54401326079b4 | |
parent | b5a81075903b3d97265151960b731210c0e80244 (diff) | |
download | src-fd6dd33dc08772fd8a19ec5674bcfb783d18938a.tar.gz src-fd6dd33dc08772fd8a19ec5674bcfb783d18938a.zip |
opencrypto: fix null esp crypt
Fixes: 3e9470482a1357eef90d007b27ec5d9725ae1111
Reviewed by: jhb
Sponsored by: Nvidia networking
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D37113
-rw-r--r-- | sys/opencrypto/xform_null.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/opencrypto/xform_null.c b/sys/opencrypto/xform_null.c index 160e1d867792..e8741cbe6366 100644 --- a/sys/opencrypto/xform_null.c +++ b/sys/opencrypto/xform_null.c @@ -99,11 +99,15 @@ const struct auth_hash auth_hash_null = { static void null_crypt(void *key, const uint8_t *in, uint8_t *out) { + if (in != out) + memcpy(out, in, NULL_BLOCK_LEN); } static void null_crypt_multi(void *key, const uint8_t *in, uint8_t *out, size_t len) { + if (in != out) + memcpy(out, in, len); } static int @@ -129,7 +133,7 @@ null_reinit(void *ctx, const uint8_t *buf, u_int len) static int null_update(void *ctx, const void *buf, u_int len) { - return 0; + return (0); } static void |