summaryrefslogtreecommitdiffstats
path: root/cipher-ctr.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2010-10-07 22:06:42 +1100
committerDamien Miller <djm@mindrot.org>2010-10-07 22:06:42 +1100
commit9a3d0dc062e4ebcafdc399ed8522df97066b139e (patch)
tree2c6283bf3cf257f610e26d3b0aa8ea78553ac50d /cipher-ctr.c
parent195dbaff7a2c27b371a126d3b87888ba7a71ef7e (diff)
- djm@cvs.openbsd.org 2010/10/01 23:05:32
[cipher-3des1.c cipher-bf1.c cipher-ctr.c openbsd-compat/openssl-compat.h] adapt to API changes in openssl-1.0.0a NB. contains compat code to select correct API for older OpenSSL
Diffstat (limited to 'cipher-ctr.c')
-rw-r--r--cipher-ctr.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/cipher-ctr.c b/cipher-ctr.c
index 3b86cc10..04975b4b 100644
--- a/cipher-ctr.c
+++ b/cipher-ctr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cipher-ctr.c,v 1.10 2006/08/03 03:34:42 deraadt Exp $ */
+/* $OpenBSD: cipher-ctr.c,v 1.11 2010/10/01 23:05:32 djm Exp $ */
/*
* Copyright (c) 2003 Markus Friedl <markus@openbsd.org>
*
@@ -34,7 +34,7 @@
#endif
const EVP_CIPHER *evp_aes_128_ctr(void);
-void ssh_aes_ctr_iv(EVP_CIPHER_CTX *, int, u_char *, u_int);
+void ssh_aes_ctr_iv(EVP_CIPHER_CTX *, int, u_char *, size_t);
struct ssh_aes_ctr_ctx
{
@@ -48,7 +48,7 @@ struct ssh_aes_ctr_ctx
* (LSB at ctr[len-1], MSB at ctr[0])
*/
static void
-ssh_ctr_inc(u_char *ctr, u_int len)
+ssh_ctr_inc(u_char *ctr, size_t len)
{
int i;
@@ -59,10 +59,10 @@ ssh_ctr_inc(u_char *ctr, u_int len)
static int
ssh_aes_ctr(EVP_CIPHER_CTX *ctx, u_char *dest, const u_char *src,
- u_int len)
+ LIBCRYPTO_EVP_INL_TYPE len)
{
struct ssh_aes_ctr_ctx *c;
- u_int n = 0;
+ size_t n = 0;
u_char buf[AES_BLOCK_SIZE];
if (len == 0)
@@ -113,7 +113,7 @@ ssh_aes_ctr_cleanup(EVP_CIPHER_CTX *ctx)
}
void
-ssh_aes_ctr_iv(EVP_CIPHER_CTX *evp, int doset, u_char * iv, u_int len)
+ssh_aes_ctr_iv(EVP_CIPHER_CTX *evp, int doset, u_char * iv, size_t len)
{
struct ssh_aes_ctr_ctx *c;