diff options
author | djm <> | 2010-10-06 22:57:46 +0000 |
---|---|---|
committer | djm <> | 2010-10-06 22:57:46 +0000 |
commit | 283cf548ed21ec24c99de94f8eb67a99df6a04c0 (patch) | |
tree | 9b04e95e5f06db0c684af0ddf591d406d701cbf2 /src/lib/libcrypto/engine/eng_aesni.c | |
parent | b8e3e6f8657e2f4d97938a5b1b2d0de4dacf8d8f (diff) | |
download | openbsd-283cf548ed21ec24c99de94f8eb67a99df6a04c0.tar.gz openbsd-283cf548ed21ec24c99de94f8eb67a99df6a04c0.tar.bz2 openbsd-283cf548ed21ec24c99de94f8eb67a99df6a04c0.zip |
More OpenSSL fixes:
- Update local engines for the EVP API change (len u_int => size_t)
- Use hw_cryptodev.c instead of eng_cryptodev.c
- Make x86_64-xlate.pl always write to the output file and not stdout,
fixing "make -j" builds (spotted by naddy@)
ok naddy@
Diffstat (limited to 'src/lib/libcrypto/engine/eng_aesni.c')
-rw-r--r-- | src/lib/libcrypto/engine/eng_aesni.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/engine/eng_aesni.c b/src/lib/libcrypto/engine/eng_aesni.c index eeded1eefa..5fdb33bfde 100644 --- a/src/lib/libcrypto/engine/eng_aesni.c +++ b/src/lib/libcrypto/engine/eng_aesni.c | |||
@@ -438,20 +438,20 @@ aesni_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *user_key, | |||
438 | } | 438 | } |
439 | 439 | ||
440 | static int aesni_cipher_ecb(EVP_CIPHER_CTX *ctx, unsigned char *out, | 440 | static int aesni_cipher_ecb(EVP_CIPHER_CTX *ctx, unsigned char *out, |
441 | const unsigned char *in, unsigned int inl) | 441 | const unsigned char *in, size_t inl) |
442 | { AES_KEY *key = AESNI_ALIGN(ctx->cipher_data); | 442 | { AES_KEY *key = AESNI_ALIGN(ctx->cipher_data); |
443 | aesni_ecb_encrypt(in, out, inl, key, ctx->encrypt); | 443 | aesni_ecb_encrypt(in, out, inl, key, ctx->encrypt); |
444 | return 1; | 444 | return 1; |
445 | } | 445 | } |
446 | static int aesni_cipher_cbc(EVP_CIPHER_CTX *ctx, unsigned char *out, | 446 | static int aesni_cipher_cbc(EVP_CIPHER_CTX *ctx, unsigned char *out, |
447 | const unsigned char *in, unsigned int inl) | 447 | const unsigned char *in, size_t inl) |
448 | { AES_KEY *key = AESNI_ALIGN(ctx->cipher_data); | 448 | { AES_KEY *key = AESNI_ALIGN(ctx->cipher_data); |
449 | aesni_cbc_encrypt(in, out, inl, key, | 449 | aesni_cbc_encrypt(in, out, inl, key, |
450 | ctx->iv, ctx->encrypt); | 450 | ctx->iv, ctx->encrypt); |
451 | return 1; | 451 | return 1; |
452 | } | 452 | } |
453 | static int aesni_cipher_cfb(EVP_CIPHER_CTX *ctx, unsigned char *out, | 453 | static int aesni_cipher_cfb(EVP_CIPHER_CTX *ctx, unsigned char *out, |
454 | const unsigned char *in, unsigned int inl) | 454 | const unsigned char *in, size_t inl) |
455 | { AES_KEY *key = AESNI_ALIGN(ctx->cipher_data); | 455 | { AES_KEY *key = AESNI_ALIGN(ctx->cipher_data); |
456 | 456 | ||
457 | aesni_cfb128_encrypt(in, out, inl, key, ctx->iv, | 457 | aesni_cfb128_encrypt(in, out, inl, key, ctx->iv, |
@@ -459,7 +459,7 @@ static int aesni_cipher_cfb(EVP_CIPHER_CTX *ctx, unsigned char *out, | |||
459 | return 1; | 459 | return 1; |
460 | } | 460 | } |
461 | static int aesni_cipher_ofb(EVP_CIPHER_CTX *ctx, unsigned char *out, | 461 | static int aesni_cipher_ofb(EVP_CIPHER_CTX *ctx, unsigned char *out, |
462 | const unsigned char *in, unsigned int inl) | 462 | const unsigned char *in, size_t inl) |
463 | { AES_KEY *key = AESNI_ALIGN(ctx->cipher_data); | 463 | { AES_KEY *key = AESNI_ALIGN(ctx->cipher_data); |
464 | aesni_ofb128_encrypt(in, out, inl, key, ctx->iv, &ctx->num); | 464 | aesni_ofb128_encrypt(in, out, inl, key, ctx->iv, &ctx->num); |
465 | return 1; | 465 | return 1; |