summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/e_rc4_hmac_md5.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/evp/e_rc4_hmac_md5.c')
-rw-r--r--src/lib/libcrypto/evp/e_rc4_hmac_md5.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/evp/e_rc4_hmac_md5.c b/src/lib/libcrypto/evp/e_rc4_hmac_md5.c
index 1f085af403..39527cafe6 100644
--- a/src/lib/libcrypto/evp/e_rc4_hmac_md5.c
+++ b/src/lib/libcrypto/evp/e_rc4_hmac_md5.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_rc4_hmac_md5.c,v 1.5 2014/08/11 13:29:43 bcook Exp $ */ 1/* $OpenBSD: e_rc4_hmac_md5.c,v 1.6 2016/11/04 17:30:30 miod Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -105,6 +105,7 @@ rc4_hmac_md5_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *inkey,
105 defined(__INTEL__) ) && \ 105 defined(__INTEL__) ) && \
106 !(defined(__APPLE__) && defined(__MACH__)) 106 !(defined(__APPLE__) && defined(__MACH__))
107#define STITCHED_CALL 107#define STITCHED_CALL
108#include "x86_arch.h"
108#endif 109#endif
109 110
110#if !defined(STITCHED_CALL) 111#if !defined(STITCHED_CALL)
@@ -122,7 +123,6 @@ rc4_hmac_md5_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
122 md5_off = MD5_CBLOCK - key->md.num, 123 md5_off = MD5_CBLOCK - key->md.num,
123 blocks; 124 blocks;
124 unsigned int l; 125 unsigned int l;
125 extern unsigned int OPENSSL_ia32cap_P[];
126#endif 126#endif
127 size_t plen = key->payload_length; 127 size_t plen = key->payload_length;
128 128
@@ -139,7 +139,7 @@ rc4_hmac_md5_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
139 139
140 if (plen > md5_off && 140 if (plen > md5_off &&
141 (blocks = (plen - md5_off) / MD5_CBLOCK) && 141 (blocks = (plen - md5_off) / MD5_CBLOCK) &&
142 (OPENSSL_ia32cap_P[0]&(1 << 20)) == 0) { 142 (OPENSSL_cpu_caps() & CPUCAP_MASK_INTELP4) == 0) {
143 MD5_Update(&key->md, in, md5_off); 143 MD5_Update(&key->md, in, md5_off);
144 RC4(&key->ks, rc4_off, in, out); 144 RC4(&key->ks, rc4_off, in, out);
145 145
@@ -187,7 +187,7 @@ rc4_hmac_md5_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
187 rc4_off += MD5_CBLOCK; 187 rc4_off += MD5_CBLOCK;
188 188
189 if (len > rc4_off && (blocks = (len - rc4_off) / MD5_CBLOCK) && 189 if (len > rc4_off && (blocks = (len - rc4_off) / MD5_CBLOCK) &&
190 (OPENSSL_ia32cap_P[0] & (1 << 20)) == 0) { 190 (OPENSSL_cpu_caps() & CPUCAP_MASK_INTELP4) == 0) {
191 RC4(&key->ks, rc4_off, in, out); 191 RC4(&key->ks, rc4_off, in, out);
192 MD5_Update(&key->md, out, md5_off); 192 MD5_Update(&key->md, out, md5_off);
193 193