diff options
author | Damien Miller <djm@mindrot.org> | 2024-09-09 13:50:14 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2024-09-09 13:50:14 +0200 |
commit | 509b757c052ea969b3a41fc36818b44801caf1cf (patch) | |
tree | 92fc6292133df87db8764369fe9f32cc19a51fce | |
parent | declare defeat trying to detect C89 compilers (diff) | |
download | openssh-509b757c052ea969b3a41fc36818b44801caf1cf.tar.xz openssh-509b757c052ea969b3a41fc36818b44801caf1cf.zip |
stubs for ML-KEM KEX functions
used for C89 compilers
-rw-r--r-- | kexmlkem768x25519.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/kexmlkem768x25519.c b/kexmlkem768x25519.c index fa062dd7d..18730ff8a 100644 --- a/kexmlkem768x25519.c +++ b/kexmlkem768x25519.c @@ -25,8 +25,6 @@ #include "includes.h" -#ifdef USE_MLKEM768X25519 - #include <sys/types.h> #include <stdio.h> @@ -42,6 +40,8 @@ #include "ssherr.h" #include "log.h" +#ifdef USE_MLKEM768X25519 + #include "libcrux_mlkem768_sha3.h" int @@ -254,4 +254,25 @@ kex_kem_mlkem768x25519_dec(struct kex *kex, sshbuf_free(buf); return r; } +#else /* USE_MLKEM768X25519 */ +int +kex_kem_mlkem768x25519_keypair(struct kex *kex) +{ + return SSH_ERR_SIGN_ALG_UNSUPPORTED; +} + +int +kex_kem_mlkem768x25519_enc(struct kex *kex, + const struct sshbuf *client_blob, struct sshbuf **server_blobp, + struct sshbuf **shared_secretp) +{ + return SSH_ERR_SIGN_ALG_UNSUPPORTED; +} + +int +kex_kem_mlkem768x25519_dec(struct kex *kex, + const struct sshbuf *server_blob, struct sshbuf **shared_secretp) +{ + return SSH_ERR_SIGN_ALG_UNSUPPORTED; +} #endif /* USE_MLKEM768X25519 */ |