summaryrefslogtreecommitdiffstats
path: root/cipher.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-03-13 13:19:42 +1100
committerDamien Miller <djm@mindrot.org>2002-03-13 13:19:42 +1100
commit3a5b0233306a3db3a5db5b9ddc187c55e9b251f4 (patch)
tree86478addb63771a9a1be0e13cfbdea9f964f963a /cipher.c
parent3225fb454d0e79cf6f824dd00ff478749620277b (diff)
Stupid djm commits experimental code to head instead of branch
revert
Diffstat (limited to 'cipher.c')
-rw-r--r--cipher.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/cipher.c b/cipher.c
index 5ddf819c..9e8f42f5 100644
--- a/cipher.c
+++ b/cipher.c
@@ -541,43 +541,3 @@ evp_rijndael(void)
#endif
return (&rijndal_cbc);
}
-
-/*
- * Exports an IV from the CipherContext required to export the key
- * state back from the unprivileged child to the privileged parent
- * process.
- */
-
-void
-cipher_get_keyiv(CipherContext *cc, u_char *iv, u_int len)
-{
- Cipher *c = cc->cipher;
- u_char *civ = NULL;
- int evplen;
-
- switch (c->number) {
- case SSH_CIPHER_SSH2:
- evplen = EVP_CIPHER_CTX_iv_length(&cc->evp);
- if (evplen == 0)
- return;
- if (evplen != len)
- fatal("%s: wrong iv length %d != %d", __FUNCTION__,
- evplen, len);
-
- if (strncmp(c->name, "aes", 3) == 0) {
- struct ssh_rijndael_ctx *aesc;
-
- aesc = EVP_CIPHER_CTX_get_app_data(&cc->evp);
- if (aesc == NULL)
- fatal("ssh_rijndael_cbc: no context");
- civ = aesc->r_iv;
- } else {
- civ = cc->evp.iv;
- }
- break;
- default:
- fatal("%s: bad cipher %d", __FUNCTION__, c->number);
- }
- memcpy(iv, civ, len);
-}
-