summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/cryptlib.h
diff options
context:
space:
mode:
authormiod <>2016-11-04 17:30:30 +0000
committermiod <>2016-11-04 17:30:30 +0000
commit723502d9588ba0e1cc08af1b12654917da74d440 (patch)
tree77b413175d422148cfb0ef7b2062340230aa5413 /src/lib/libcrypto/cryptlib.h
parent391f8ce21bb7929810460a73e2fde2c80540848d (diff)
downloadopenbsd-723502d9588ba0e1cc08af1b12654917da74d440.tar.gz
openbsd-723502d9588ba0e1cc08af1b12654917da74d440.tar.bz2
openbsd-723502d9588ba0e1cc08af1b12654917da74d440.zip
Replace all uses of magic numbers when operating on OPENSSL_ia32_P[] by
meaningful constants in a private header file, so that reviewers can actually get a chance to figure out what the code is attempting to do without knowing all cpuid bits. While there, turn it from an array of two 32-bit ints into a properly aligned 64-bit int. Use of OPENSSL_ia32_P is now restricted to the assembler parts. C code will now always use OPENSSL_cpu_caps() and check for the proper bits in the whole 64-bit word it returns. i386 tests and ok jsing@
Diffstat (limited to 'src/lib/libcrypto/cryptlib.h')
-rw-r--r--src/lib/libcrypto/cryptlib.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/libcrypto/cryptlib.h b/src/lib/libcrypto/cryptlib.h
index ad679dfa8d..d44738bf3c 100644
--- a/src/lib/libcrypto/cryptlib.h
+++ b/src/lib/libcrypto/cryptlib.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: cryptlib.h,v 1.24 2014/07/11 08:44:47 jsing Exp $ */ 1/* $OpenBSD: cryptlib.h,v 1.25 2016/11/04 17:30:30 miod 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 *
@@ -73,7 +73,6 @@ extern "C" {
73#define X509_CERT_FILE_EVP "SSL_CERT_FILE" 73#define X509_CERT_FILE_EVP "SSL_CERT_FILE"
74 74
75void OPENSSL_cpuid_setup(void); 75void OPENSSL_cpuid_setup(void);
76extern unsigned int OPENSSL_ia32cap_P[];
77 76
78#ifdef __cplusplus 77#ifdef __cplusplus
79} 78}