summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorjsing <>2015-09-13 12:34:02 +0000
committerjsing <>2015-09-13 12:34:02 +0000
commit6c2c615af51c09539ff57af17345ed94940fb9ee (patch)
tree2f8c8edc582ece2b06fb7a15af25ae0c82f844fb /src/lib
parentc21ecd46217786d28326bb8c5a074d9b95226b23 (diff)
downloadopenbsd-6c2c615af51c09539ff57af17345ed94940fb9ee.tar.gz
openbsd-6c2c615af51c09539ff57af17345ed94940fb9ee.tar.bz2
openbsd-6c2c615af51c09539ff57af17345ed94940fb9ee.zip
Switch to miod's shiny new OPENSSL_cpu_caps() and we can now also enable
the AES acceleration checking for i386. ok beck@ miod@
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libssl/src/ssl/ssl_ciph.c6
-rw-r--r--src/lib/libssl/ssl_ciph.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libssl/src/ssl/ssl_ciph.c b/src/lib/libssl/src/ssl/ssl_ciph.c
index 42fdaad338..46f1697fec 100644
--- a/src/lib/libssl/src/ssl/ssl_ciph.c
+++ b/src/lib/libssl/src/ssl/ssl_ciph.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_ciph.c,v 1.82 2015/09/13 09:10:01 jsing Exp $ */ 1/* $OpenBSD: ssl_ciph.c,v 1.83 2015/09/13 12:34:02 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -1361,8 +1361,8 @@ ssl_cipher_process_rulestr(const char *rule_str, CIPHER_ORDER **head_p,
1361static inline int 1361static inline int
1362ssl_aes_is_accelerated(void) 1362ssl_aes_is_accelerated(void)
1363{ 1363{
1364#if defined(__x86_64__) 1364#if defined(__i386__) || defined(__x86_64__)
1365 return ((OPENSSL_ia32cap_loc()[0] & (1UL << 57)) != 0); 1365 return ((OPENSSL_cpu_caps() & (1ULL << 57)) != 0);
1366#else 1366#else
1367 return (0); 1367 return (0);
1368#endif 1368#endif
diff --git a/src/lib/libssl/ssl_ciph.c b/src/lib/libssl/ssl_ciph.c
index 42fdaad338..46f1697fec 100644
--- a/src/lib/libssl/ssl_ciph.c
+++ b/src/lib/libssl/ssl_ciph.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_ciph.c,v 1.82 2015/09/13 09:10:01 jsing Exp $ */ 1/* $OpenBSD: ssl_ciph.c,v 1.83 2015/09/13 12:34:02 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -1361,8 +1361,8 @@ ssl_cipher_process_rulestr(const char *rule_str, CIPHER_ORDER **head_p,
1361static inline int 1361static inline int
1362ssl_aes_is_accelerated(void) 1362ssl_aes_is_accelerated(void)
1363{ 1363{
1364#if defined(__x86_64__) 1364#if defined(__i386__) || defined(__x86_64__)
1365 return ((OPENSSL_ia32cap_loc()[0] & (1UL << 57)) != 0); 1365 return ((OPENSSL_cpu_caps() & (1ULL << 57)) != 0);
1366#else 1366#else
1367 return (0); 1367 return (0);
1368#endif 1368#endif