diff options
author | Ben Laurie <ben@openssl.org> | 2008-11-01 16:40:37 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 2008-11-01 16:40:37 +0000 |
commit | 5e4430e70df0020f5f1517249851696cb9ac4ad2 (patch) | |
tree | 95dcbc73bcd99b725664324db882b4a388d0d4cb /crypto/evp/evp_enc.c | |
parent | 4d6e1e4f29de455b5e644ea9cae5d5f5a2dbef33 (diff) |
More size_tification.
Diffstat (limited to 'crypto/evp/evp_enc.c')
-rw-r--r-- | crypto/evp/evp_enc.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c index 6e582c458d..586756bfd1 100644 --- a/crypto/evp/evp_enc.c +++ b/crypto/evp/evp_enc.c @@ -209,7 +209,8 @@ skip_to_init: OPENSSL_assert(EVP_CIPHER_CTX_iv_length(ctx) <= (int)sizeof(ctx->iv)); - if(iv) memcpy(ctx->oiv, iv, EVP_CIPHER_CTX_iv_length(ctx)); + if(iv) memcpy(ctx->oiv, iv, + EVP_CIPHER_CTX_iv_length(ctx)); memcpy(ctx->iv, ctx->oiv, EVP_CIPHER_CTX_iv_length(ctx)); break; @@ -229,7 +230,7 @@ skip_to_init: } int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, - const unsigned char *in, int inl) + const unsigned char *in, size_t inl) { if (ctx->encrypt) return EVP_EncryptUpdate(ctx,out,outl,in,inl); @@ -275,9 +276,11 @@ int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *im } int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, - const unsigned char *in, int inl) + const unsigned char *in, size_t inl) { - int i,j,bl; + size_t i; + size_t bl; + size_t j; if (inl <= 0) { @@ -381,7 +384,7 @@ int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) } int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, - const unsigned char *in, int inl) + const unsigned char *in, size_t inl) { int fix_len; unsigned int b; @@ -515,10 +518,10 @@ int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *c) return 1; } -int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *c, int keylen) +int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *c, size_t keylen) { if(c->cipher->flags & EVP_CIPH_CUSTOM_KEY_LENGTH) - return EVP_CIPHER_CTX_ctrl(c, EVP_CTRL_SET_KEY_LENGTH, keylen, NULL); + return EVP_CIPHER_CTX_ctrl(c, EVP_CTRL_SET_KEY_LENGTH, (int)keylen, NULL); if(c->key_len == keylen) return 1; if((keylen > 0) && (c->cipher->flags & EVP_CIPH_VARIABLE_LENGTH)) { |