summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2023-10-10 06:49:55 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2023-10-10 06:49:55 +0000
commit2d8901f7875c0d99d141039ed2a0419c255c9d95 (patch)
treeb9905a854e9bdaaeb2b63f8ebefa234c8ffb8091 /usr.bin
parent25f7e1f5293faea2a72d66ec9300e04c3b2cf9c0 (diff)
Garbage collect cipher_get_keyiv_len()
This is a compat20 leftover, unused since 2017. ok djm
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/cipher.c23
-rw-r--r--usr.bin/ssh/cipher.h3
2 files changed, 2 insertions, 24 deletions
diff --git a/usr.bin/ssh/cipher.c b/usr.bin/ssh/cipher.c
index c7664a3efa3..28a7f7bd9ca 100644
--- a/usr.bin/ssh/cipher.c
+++ b/usr.bin/ssh/cipher.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cipher.c,v 1.119 2021/04/03 06:18:40 djm Exp $ */
+/* $OpenBSD: cipher.c,v 1.120 2023/10/10 06:49:54 tb Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -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)
{
diff --git a/usr.bin/ssh/cipher.h b/usr.bin/ssh/cipher.h
index 1a591cd7fd4..6533ff2bbde 100644
--- a/usr.bin/ssh/cipher.h
+++ b/usr.bin/ssh/cipher.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cipher.h,v 1.55 2020/01/23 10:24:29 dtucker Exp $ */
+/* $OpenBSD: cipher.h,v 1.56 2023/10/10 06:49:54 tb Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -73,6 +73,5 @@ u_int cipher_ctx_is_plaintext(struct sshcipher_ctx *);
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 */