aboutsummaryrefslogtreecommitdiff
path: root/crypto/openssh/cipher.c
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2002-06-29 11:48:59 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2002-06-29 11:48:59 +0000
commita82e551f0fd24a72fde2fc9145eef2c270cda9c0 (patch)
tree038040484c6082020b918a9c208a38e77fd09e7d /crypto/openssh/cipher.c
parentd2a34caedbbbc4693ecb276afb41ffe6c4e05c76 (diff)
downloadsrc-a82e551f0fd24a72fde2fc9145eef2c270cda9c0.tar.gz
src-a82e551f0fd24a72fde2fc9145eef2c270cda9c0.zip
Resolve conflicts.
Sponsored by: DARPA, NAI Labs
Notes
Notes: svn path=/head/; revision=99063
Diffstat (limited to 'crypto/openssh/cipher.c')
-rw-r--r--crypto/openssh/cipher.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/crypto/openssh/cipher.c b/crypto/openssh/cipher.c
index b18c701fb031..288b4d68d994 100644
--- a/crypto/openssh/cipher.c
+++ b/crypto/openssh/cipher.c
@@ -35,7 +35,8 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: cipher.c,v 1.59 2002/06/19 18:01:00 markus Exp $");
+RCSID("$OpenBSD: cipher.c,v 1.60 2002/06/23 03:26:52 deraadt Exp $");
+RCSID("$FreeBSD$");
#include "xmalloc.h"
#include "log.h"
@@ -95,11 +96,13 @@ cipher_blocksize(Cipher *c)
{
return (c->block_size);
}
+
u_int
cipher_keylen(Cipher *c)
{
return (c->key_len);
}
+
u_int
cipher_get_number(Cipher *c)
{
@@ -314,6 +317,7 @@ struct ssh1_3des_ctx
{
EVP_CIPHER_CTX k1, k2, k3;
};
+
static int
ssh1_3des_init(EVP_CIPHER_CTX *ctx, const u_char *key, const u_char *iv,
int enc)
@@ -356,6 +360,7 @@ ssh1_3des_init(EVP_CIPHER_CTX *ctx, const u_char *key, const u_char *iv,
#endif
return (1);
}
+
static int
ssh1_3des_cbc(EVP_CIPHER_CTX *ctx, u_char *dest, const u_char *src, u_int len)
{
@@ -377,6 +382,7 @@ ssh1_3des_cbc(EVP_CIPHER_CTX *ctx, u_char *dest, const u_char *src, u_int len)
#endif
return (1);
}
+
static int
ssh1_3des_cleanup(EVP_CIPHER_CTX *ctx)
{
@@ -389,6 +395,7 @@ ssh1_3des_cleanup(EVP_CIPHER_CTX *ctx)
}
return (1);
}
+
static const EVP_CIPHER *
evp_ssh1_3des(void)
{
@@ -430,7 +437,9 @@ swap_bytes(const u_char *src, u_char *dst, int n)
*dst++ = c[3];
}
}
+
static int (*orig_bf)(EVP_CIPHER_CTX *, u_char *, const u_char *, u_int) = NULL;
+
static int
bf_ssh1_cipher(EVP_CIPHER_CTX *ctx, u_char *out, const u_char *in, u_int len)
{
@@ -441,6 +450,7 @@ bf_ssh1_cipher(EVP_CIPHER_CTX *ctx, u_char *out, const u_char *in, u_int len)
swap_bytes(out, out, len);
return (ret);
}
+
static const EVP_CIPHER *
evp_ssh1_bf(void)
{
@@ -483,6 +493,7 @@ ssh_rijndael_init(EVP_CIPHER_CTX *ctx, const u_char *key, const u_char *iv,
memcpy(c->r_iv, iv, RIJNDAEL_BLOCKSIZE);
return (1);
}
+
static int
ssh_rijndael_cbc(EVP_CIPHER_CTX *ctx, u_char *dest, const u_char *src,
u_int len)
@@ -528,6 +539,7 @@ ssh_rijndael_cbc(EVP_CIPHER_CTX *ctx, u_char *dest, const u_char *src,
}
return (1);
}
+
static int
ssh_rijndael_cleanup(EVP_CIPHER_CTX *ctx)
{
@@ -540,6 +552,7 @@ ssh_rijndael_cleanup(EVP_CIPHER_CTX *ctx)
}
return (1);
}
+
static const EVP_CIPHER *
evp_rijndael(void)
{