From 6c2c615af51c09539ff57af17345ed94940fb9ee Mon Sep 17 00:00:00 2001 From: jsing <> Date: Sun, 13 Sep 2015 12:34:02 +0000 Subject: Switch to miod's shiny new OPENSSL_cpu_caps() and we can now also enable the AES acceleration checking for i386. ok beck@ miod@ --- src/lib/libssl/src/ssl/ssl_ciph.c | 6 +++--- src/lib/libssl/ssl_ciph.c | 6 +++--- 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 @@ -/* $OpenBSD: ssl_ciph.c,v 1.82 2015/09/13 09:10:01 jsing Exp $ */ +/* $OpenBSD: ssl_ciph.c,v 1.83 2015/09/13 12:34:02 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1361,8 +1361,8 @@ ssl_cipher_process_rulestr(const char *rule_str, CIPHER_ORDER **head_p, static inline int ssl_aes_is_accelerated(void) { -#if defined(__x86_64__) - return ((OPENSSL_ia32cap_loc()[0] & (1UL << 57)) != 0); +#if defined(__i386__) || defined(__x86_64__) + return ((OPENSSL_cpu_caps() & (1ULL << 57)) != 0); #else return (0); #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 @@ -/* $OpenBSD: ssl_ciph.c,v 1.82 2015/09/13 09:10:01 jsing Exp $ */ +/* $OpenBSD: ssl_ciph.c,v 1.83 2015/09/13 12:34:02 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1361,8 +1361,8 @@ ssl_cipher_process_rulestr(const char *rule_str, CIPHER_ORDER **head_p, static inline int ssl_aes_is_accelerated(void) { -#if defined(__x86_64__) - return ((OPENSSL_ia32cap_loc()[0] & (1UL << 57)) != 0); +#if defined(__i386__) || defined(__x86_64__) + return ((OPENSSL_cpu_caps() & (1ULL << 57)) != 0); #else return (0); #endif -- cgit v1.2.3-55-g6feb