This function is unused since the commit below.
commit f1cc710a366b47da6f96be2110292f8cd0933e7e
Author: djm <[email protected]>
Date: Sun Apr 30 23:13:25 2017 +0000
remove compat20/compat13/compat15 variables
ok markus@
Index: cipher.c
===================================================================
RCS file: /cvs/src/usr.bin/ssh/cipher.c,v
retrieving revision 1.119
diff -u -p -r1.119 cipher.c
--- cipher.c 3 Apr 2021 06:18:40 -0000 1.119
+++ cipher.c 29 Sep 2023 07:24:27 -0000
@@ -428,27 +428,6 @@ cipher_free(struct sshcipher_ctx *cc)
freezero(cc, sizeof(*cc));
}
-/*
- * Exports an IV from the sshcipher_ctx required to export the key
- * state back from the unprivileged child to the privileged parent
- * process.
- */
-int
-cipher_get_keyiv_len(const struct sshcipher_ctx *cc)
-{
- const struct sshcipher *c = cc->cipher;
-
- if ((c->flags & CFLAG_CHACHAPOLY) != 0)
- return 0;
- else if ((c->flags & CFLAG_AESCTR) != 0)
- return sizeof(cc->ac_ctx.ctr);
-#ifdef WITH_OPENSSL
- return EVP_CIPHER_CTX_iv_length(cc->evp);
-#else
- return 0;
-#endif
-}
-
int
cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, size_t len)
{
Index: cipher.h
===================================================================
RCS file: /cvs/src/usr.bin/ssh/cipher.h,v
retrieving revision 1.55
diff -u -p -r1.55 cipher.h
--- cipher.h 23 Jan 2020 10:24:29 -0000 1.55
+++ cipher.h 29 Sep 2023 07:24:39 -0000
@@ -73,6 +73,5 @@ u_int cipher_ctx_is_plaintext(struct ss
int cipher_get_keyiv(struct sshcipher_ctx *, u_char *, size_t);
int cipher_set_keyiv(struct sshcipher_ctx *, const u_char *, size_t);
-int cipher_get_keyiv_len(const struct sshcipher_ctx *);
#endif /* CIPHER_H */