diff options
author | Brian Carlstrom <bdc@google.com> | 2012-04-27 21:35:35 -0700 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2012-04-27 21:35:35 -0700 |
commit | f42d491ab90c82302b0054c62014c1ee9b638aff (patch) | |
tree | 86e24db1fd4f04984e63566ac28bd19c1559c889 /crypto/evp | |
parent | a1a5710c055e139ea00e785f9eb55b3af3e4dab1 (diff) | |
download | replicant_openssl-f42d491ab90c82302b0054c62014c1ee9b638aff.zip replicant_openssl-f42d491ab90c82302b0054c62014c1ee9b638aff.tar.gz replicant_openssl-f42d491ab90c82302b0054c62014c1ee9b638aff.tar.bz2 |
openssl-1.0.1b upgrade
Change-Id: I4fe854007f774cf7f386cd405a9d21e6ca94e7b6
Diffstat (limited to 'crypto/evp')
-rw-r--r-- | crypto/evp/e_rc4_hmac_md5.c | 13 | ||||
-rw-r--r-- | crypto/evp/evp_enc.c | 6 |
2 files changed, 9 insertions, 10 deletions
diff --git a/crypto/evp/e_rc4_hmac_md5.c b/crypto/evp/e_rc4_hmac_md5.c index 5f1490c..5656319 100644 --- a/crypto/evp/e_rc4_hmac_md5.c +++ b/crypto/evp/e_rc4_hmac_md5.c @@ -103,7 +103,8 @@ static int rc4_hmac_md5_init_key(EVP_CIPHER_CTX *ctx, #if !defined(OPENSSL_NO_ASM) && ( \ defined(__x86_64) || defined(__x86_64__) || \ defined(_M_AMD64) || defined(_M_X64) || \ - defined(__INTEL__) ) + defined(__INTEL__) ) && \ + !(defined(__APPLE__) && defined(__MACH__)) #define STITCHED_CALL #endif @@ -121,7 +122,7 @@ static int rc4_hmac_md5_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, md5_off = MD5_CBLOCK-key->md.num, blocks; unsigned int l; - extern unsigned int OPENSSL_ia32cap_P[]; + extern unsigned int OPENSSL_ia32cap_P[]; #endif size_t plen = key->payload_length; @@ -133,8 +134,8 @@ static int rc4_hmac_md5_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, /* cipher has to "fall behind" */ if (rc4_off>md5_off) md5_off+=MD5_CBLOCK; - if (plen>md5_off && (blocks=(plen-md5_off)/MD5_CBLOCK) && - (OPENSSL_ia32cap_P[0]&(1<<20))==0) { + if (plen>md5_off && (blocks=(plen-md5_off)/MD5_CBLOCK) && + (OPENSSL_ia32cap_P[0]&(1<<20))==0) { MD5_Update(&key->md,in,md5_off); RC4(&key->ks,rc4_off,in,out); @@ -174,8 +175,8 @@ static int rc4_hmac_md5_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, if (md5_off>rc4_off) rc4_off += 2*MD5_CBLOCK; else rc4_off += MD5_CBLOCK; - if (len>rc4_off && (blocks=(len-rc4_off)/MD5_CBLOCK) && - (OPENSSL_ia32cap_P[0]&(1<<20))==0) { + if (len>rc4_off && (blocks=(len-rc4_off)/MD5_CBLOCK) && + (OPENSSL_ia32cap_P[0]&(1<<20))==0) { RC4(&key->ks,rc4_off,in,out); MD5_Update(&key->md,out,md5_off); diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c index 8835d9a..0c54f05 100644 --- a/crypto/evp/evp_enc.c +++ b/crypto/evp/evp_enc.c @@ -172,7 +172,7 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *imp #ifdef OPENSSL_FIPS if (FIPS_mode()) return FIPS_cipherinit(ctx, cipher, key, iv, enc); -#else +#endif ctx->cipher=cipher; if (ctx->cipher->ctx_size) { @@ -197,7 +197,6 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *imp return 0; } } -#endif } else if(!ctx->cipher) { @@ -210,7 +209,7 @@ skip_to_init: #ifdef OPENSSL_FIPS if (FIPS_mode()) return FIPS_cipherinit(ctx, cipher, key, iv, enc); -#else +#endif /* we assume block size is a power of 2 in *cryptUpdate */ OPENSSL_assert(ctx->cipher->block_size == 1 || ctx->cipher->block_size == 8 @@ -257,7 +256,6 @@ skip_to_init: ctx->final_used=0; ctx->block_mask=ctx->cipher->block_size-1; return 1; -#endif } int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, |