summaryrefslogtreecommitdiff
path: root/cipher-ctr.c
diff options
context:
space:
mode:
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 3b86cc10b..04975b4b6 100644
--- a/cipher-ctr.c
+++ b/cipher-ctr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: cipher-ctr.c,v 1.10 2006/08/03 03:34:42 deraadt Exp $ */ 1/* $OpenBSD: cipher-ctr.c,v 1.11 2010/10/01 23:05:32 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2003 Markus Friedl <markus@openbsd.org> 3 * Copyright (c) 2003 Markus Friedl <markus@openbsd.org>
4 * 4 *
@@ -34,7 +34,7 @@
34#endif 34#endif
35 35
36const EVP_CIPHER *evp_aes_128_ctr(void); 36const EVP_CIPHER *evp_aes_128_ctr(void);
37void ssh_aes_ctr_iv(EVP_CIPHER_CTX *, int, u_char *, u_int); 37void ssh_aes_ctr_iv(EVP_CIPHER_CTX *, int, u_char *, size_t);
38 38
39struct ssh_aes_ctr_ctx 39struct ssh_aes_ctr_ctx
40{ 40{
@@ -48,7 +48,7 @@ struct ssh_aes_ctr_ctx
48 * (LSB at ctr[len-1], MSB at ctr[0]) 48 * (LSB at ctr[len-1], MSB at ctr[0])
49 */ 49 */
50static void 50static void
51ssh_ctr_inc(u_char *ctr, u_int len) 51ssh_ctr_inc(u_char *ctr, size_t len)
52{ 52{
53 int i; 53 int i;
54 54
@@ -59,10 +59,10 @@ ssh_ctr_inc(u_char *ctr, u_int len)
59 59
60static int 60static int
61ssh_aes_ctr(EVP_CIPHER_CTX *ctx, u_char *dest, const u_char *src, 61ssh_aes_ctr(EVP_CIPHER_CTX *ctx, u_char *dest, const u_char *src,
62 u_int len) 62 LIBCRYPTO_EVP_INL_TYPE len)
63{ 63{
64 struct ssh_aes_ctr_ctx *c; 64 struct ssh_aes_ctr_ctx *c;
65 u_int n = 0; 65 size_t n = 0;
66 u_char buf[AES_BLOCK_SIZE]; 66 u_char buf[AES_BLOCK_SIZE];
67 67
68 if (len == 0) 68 if (len == 0)
@@ -113,7 +113,7 @@ ssh_aes_ctr_cleanup(EVP_CIPHER_CTX *ctx)
113} 113}
114 114
115void 115void
116ssh_aes_ctr_iv(EVP_CIPHER_CTX *evp, int doset, u_char * iv, u_int len) 116ssh_aes_ctr_iv(EVP_CIPHER_CTX *evp, int doset, u_char * iv, size_t len)
117{ 117{
118 struct ssh_aes_ctr_ctx *c; 118 struct ssh_aes_ctr_ctx *c;
119 119