Pull up following revision(s) (requested by riastradh in ticket #832): crypto/external/bsd/openssl/lib/libcrypto/evp.inc: revision 1.5 crypto/external/bsd/openssl/lib/libcrypto/modes.inc: revision 1.3 crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aes.inc: revision 1.3 Fix build goo for OpenSSL AES-NI support. OpenSSL now supports AES-NI in evp, not in an engine. We can now get rid of the no longer maintained aesni engine, which was broken last summer. Not only can OpenSSL now use AES-NI for everything it did before we broke it last summer, but it can also use AES-NI for more encryption modes than before, such as CTR. Tested on amd64, both vanilla and in an i386 chroot. ok christosdiff -r1.2.4.1.4.2 -r1.2.4.1.4.3 src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc
(snj)
--- src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc 2015/04/02 17:58:49 1.2.4.1.4.2
+++ src/crypto/external/bsd/openssl/lib/libcrypto/evp.inc 2015/04/15 04:30:11 1.2.4.1.4.3
@@ -1,27 +1,38 @@ | @@ -1,27 +1,38 @@ | |||
1 | # $NetBSD: evp.inc,v 1.2.4.1.4.2 2015/04/02 17:58:49 snj Exp $ | 1 | # $NetBSD: evp.inc,v 1.2.4.1.4.3 2015/04/15 04:30:11 snj Exp $ | |
2 | # | 2 | # | |
3 | # @(#) Copyright (c) 1995 Simon J. Gerraty | 3 | # @(#) Copyright (c) 1995 Simon J. Gerraty | |
4 | # | 4 | # | |
5 | # SRCS extracted from src/crypto/dist/openssl/crypto/evp/Makefile | 5 | # SRCS extracted from src/crypto/dist/openssl/crypto/evp/Makefile | |
6 | # | 6 | # | |
7 | 7 | |||
8 | .PATH: ${OPENSSLSRC}/crypto/evp | 8 | .PATH: ${OPENSSLSRC}/crypto/evp | |
9 | 9 | |||
10 | 10 | |||
11 | EVP_SRCS = encode.c digest.c evp_enc.c evp_key.c evp_acnf.c \ | 11 | EVP_SRCS = encode.c digest.c evp_enc.c evp_key.c evp_acnf.c \ | |
12 | e_des.c e_bf.c e_idea.c e_des3.c \ | 12 | e_des.c e_bf.c e_idea.c e_des3.c \ | |
13 | e_rc4.c e_aes.c names.c e_camellia.c \ | 13 | e_rc4.c e_aes.c names.c e_camellia.c \ | |
14 | e_xcbc_d.c e_rc2.c e_cast.c e_rc5.c \ | 14 | e_xcbc_d.c e_rc2.c e_cast.c e_rc5.c \ | |
15 | m_null.c m_md2.c m_md4.c m_md5.c m_sha.c m_sha1.c \ | 15 | m_null.c m_md2.c m_md4.c m_md5.c m_sha.c m_sha1.c \ | |
16 | m_dss.c m_dss1.c m_mdc2.c m_ripemd.c \ | 16 | m_dss.c m_dss1.c m_mdc2.c m_ripemd.c \ | |
17 | p_open.c p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c p_dec.c \ | 17 | p_open.c p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c p_dec.c \ | |
18 | bio_md.c bio_b64.c bio_enc.c evp_cnf.c evp_err.c e_null.c \ | 18 | bio_md.c bio_b64.c bio_enc.c evp_cnf.c evp_err.c e_null.c \ | |
19 | c_all.c c_allc.c c_alld.c evp_lib.c bio_ok.c \ | 19 | c_all.c c_allc.c c_alld.c evp_lib.c bio_ok.c \ | |
20 | evp_pkey.c evp_pbe.c p5_crpt.c p5_crpt2.c m_ecdsa.c pmeth_lib.c \ | 20 | evp_pkey.c evp_pbe.c p5_crpt.c p5_crpt2.c m_ecdsa.c pmeth_lib.c \ | |
21 | pmeth_fn.c m_sigver.c m_wp.c pmeth_gn.c evp_fips.c \ | 21 | pmeth_fn.c m_sigver.c m_wp.c pmeth_gn.c evp_fips.c \ | |
22 | e_aes_cbc_hmac_sha1.c e_rc4_hmac_md5.c | 22 | e_aes_cbc_hmac_sha1.c e_rc4_hmac_md5.c | |
23 | SRCS += ${EVP_SRCS} | 23 | SRCS += ${EVP_SRCS} | |
24 | 24 | |||
25 | .for cryptosrc in ${EVP_SRCS} | 25 | .for cryptosrc in ${EVP_SRCS} | |
26 | CPPFLAGS.${cryptosrc} = -I${OPENSSLSRC}/crypto/evp | 26 | CPPFLAGS.${cryptosrc} = -I${OPENSSLSRC}/crypto/evp | |
27 | .endfor | 27 | .endfor | |
28 | ||||
29 | EVP_AES_SRCS = e_aes.c | |||
30 | ||||
31 | # XXX Should do this too, but it requires some other asm changes. | |||
32 | #EVP_AES_SRCS += e_aes_cbc_hmac_sha1.c | |||
33 | ||||
34 | .for cryptosrc in ${EVP_AES_SRCS} | |||
35 | CPPFLAGS.${cryptosrc} += ${AESCPPFLAGS} | |||
36 | .endfor | |||
37 | ||||
38 | CPPFLAGS.e_aes.c += -I${OPENSSLSRC}/crypto/modes |
--- src/crypto/external/bsd/openssl/lib/libcrypto/modes.inc 2015/04/02 17:58:49 1.1.8.1.4.2
+++ src/crypto/external/bsd/openssl/lib/libcrypto/modes.inc 2015/04/15 04:30:11 1.1.8.1.4.3
@@ -1,19 +1,18 @@ | @@ -1,19 +1,18 @@ | |||
1 | # $NetBSD: modes.inc,v 1.1.8.1.4.2 2015/04/02 17:58:49 snj Exp $ | 1 | # $NetBSD: modes.inc,v 1.1.8.1.4.3 2015/04/15 04:30:11 snj Exp $ | |
2 | # | 2 | # | |
3 | # @(#) Copyright (c) 1995 Simon J. Gerraty | 3 | # @(#) Copyright (c) 1995 Simon J. Gerraty | |
4 | # | 4 | # | |
5 | # SRCS extracted from src/crypto/dist/openssl/crypto/modes/Makefile | 5 | # SRCS extracted from src/crypto/dist/openssl/crypto/modes/Makefile | |
6 | # | 6 | # | |
7 | 7 | |||
8 | .PATH: ${OPENSSLSRC}/crypto/modes | 8 | .PATH: ${OPENSSLSRC}/crypto/modes | |
9 | 9 | |||
10 | MODES_SRCS += cbc128.c ctr128.c cts128.c cfb128.c ofb128.c gcm128.c \ | 10 | MODES_SRCS += cbc128.c ctr128.c cts128.c cfb128.c ofb128.c gcm128.c \ | |
11 | ccm128.c xts128.c | 11 | ccm128.c xts128.c | |
12 | 12 | |||
13 | 13 | |||
14 | SRCS += ${MODES_SRCS} | 14 | SRCS += ${MODES_SRCS} | |
15 | 15 | |||
16 | .for cryptosrc in ${MODES_SRCS} | 16 | .for cryptosrc in ${MODES_SRCS} | |
17 | CPPFLAGS.${cryptosrc} = -I${OPENSSLSRC}/crypto/modes ${MODESCPPFLAGS} | 17 | CPPFLAGS.${cryptosrc} = -I${OPENSSLSRC}/crypto/modes ${MODESCPPFLAGS} | |
18 | .endfor | 18 | .endfor | |
19 | CPPFLAGS.e_aes.c = -I${OPENSSLSRC}/crypto/modes |
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aes.inc 2011/07/05 16:53:58 1.2
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/aes.inc 2015/04/15 04:30:11 1.2.10.1
@@ -1,5 +1,5 @@ | @@ -1,5 +1,5 @@ | |||
1 | .PATH.S: ${.PARSEDIR} | 1 | .PATH.S: ${.PARSEDIR} | |
2 | AES_SRCS = aes-586.S aesni-586.S | 2 | AES_SRCS = aes-586.S aesni-x86.S | |
3 | AESNI = yes | 3 | AESNI = yes | |
4 | AESCPPFLAGS = -DAES_ASM -DOPENSSL_IA32_SSE2 | 4 | AESCPPFLAGS = -DAES_ASM -DOPENSSL_IA32_SSE2 | |
5 | .include "../../aes.inc" | 5 | .include "../../aes.inc" |