summaryrefslogtreecommitdiff
path: root/cipher.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2018-09-13 12:13:50 +1000
committerDamien Miller <djm@mindrot.org>2018-09-13 12:13:50 +1000
commit48f54b9d12c1c79fba333bc86d455d8f4cda8cfc (patch)
tree216db3d44f6d07262ce4757e65705fcc9fb6b5fa /cipher.c
parent86112951d63d48839f035b5795be62635a463f99 (diff)
adapt -portable to OpenSSL 1.1x API
Polyfill missing API with replacement functions extracted from LibreSSL
Diffstat (limited to 'cipher.c')
-rw-r--r--cipher.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/cipher.c b/cipher.c
index df43826e0..12c598881 100644
--- a/cipher.c
+++ b/cipher.c
@@ -525,41 +525,3 @@ cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv, size_t len)
#endif
return 0;
}
-
-#ifdef WITH_OPENSSL
-#define EVP_X_STATE(evp) (evp)->cipher_data
-#define EVP_X_STATE_LEN(evp) (evp)->cipher->ctx_size
-#endif
-
-int
-cipher_get_keycontext(const struct sshcipher_ctx *cc, u_char *dat)
-{
-#if defined(WITH_OPENSSL) && !defined(OPENSSL_NO_RC4)
- const struct sshcipher *c = cc->cipher;
- int plen = 0;
-
- if (c->evptype == EVP_rc4) {
- plen = EVP_X_STATE_LEN(cc->evp);
- if (dat == NULL)
- return (plen);
- memcpy(dat, EVP_X_STATE(cc->evp), plen);
- }
- return (plen);
-#else
- return 0;
-#endif
-}
-
-void
-cipher_set_keycontext(struct sshcipher_ctx *cc, const u_char *dat)
-{
-#if defined(WITH_OPENSSL) && !defined(OPENSSL_NO_RC4)
- const struct sshcipher *c = cc->cipher;
- int plen;
-
- if (c->evptype == EVP_rc4) {
- plen = EVP_X_STATE_LEN(cc->evp);
- memcpy(EVP_X_STATE(cc->evp), dat, plen);
- }
-#endif
-}