diff --git a/crypto/openssl/crypto/evp/evp.h b/crypto/openssl/crypto/evp/evp.h index 6fd8e73276e4..39969c2e91a9 100644 --- a/crypto/openssl/crypto/evp/evp.h +++ b/crypto/openssl/crypto/evp/evp.h @@ -95,6 +95,9 @@ extern "C" { #ifndef NO_CAST #include #endif +#ifndef NO_IDEA +#include +#endif #ifndef NO_MDC2 #include #endif @@ -366,6 +369,9 @@ typedef struct evp_cipher_ctx_st des_key_schedule ks3;/* key schedule (for ede3) */ } des_ede; #endif +#ifndef NO_IDEA + IDEA_KEY_SCHEDULE idea_ks;/* key schedule */ +#endif #ifndef NO_RC2 RC2_KEY rc2_ks;/* key schedule */ #endif diff --git a/secure/Makefile.inc b/secure/Makefile.inc index afe5e9772292..faa0bd24a553 100644 --- a/secure/Makefile.inc +++ b/secure/Makefile.inc @@ -15,3 +15,7 @@ CRYPTOBJDIR= ${.CURDIR}/../../lib/libcrypt/obj .else CRYPTOBJDIR= ${.CURDIR}/../../lib/libcrypt .endif + +.if !defined(WITH_IDEA) || ${WITH_IDEA} != YES +CFLAGS+= -DNO_IDEA +.endif diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index 5f5c8538a9c6..55cdfb0fa3bb 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -15,6 +15,10 @@ ${LCRYPTO_SRC}/sha ${LCRYPTO_SRC}/stack ${LCRYPTO_SRC}/txt_db \ ${LCRYPTO_SRC}/x509 ${LCRYPTO_SRC}/x509v3 +.if defined(WITH_IDEA) && ${WITH_IDEA} == YES +.PATH: ${LCRYPTO_SRC}/idea +.endif + LIB= crypto SHLIB_MAJOR= 1 @@ -98,6 +102,11 @@ SRCS+= bio_b64.c bio_enc.c bio_md.c bio_ok.c c_all.c c_allc.c c_alld.c \ # hmac SRCS+= hmac.c +# idea +.if defined(WITH_IDEA) && ${WITH_IDEA} == YES +SRCS+= i_ecb.c i_cbc.c i_cfb64.c i_ofb64.c i_skey.c +.endif + # lhash SRCS+= lh_stats.c lhash.c @@ -176,6 +185,11 @@ HDRS= asn1/asn1.h asn1/asn1_mac.h bio/bio.h bf/blowfish.h bn/bn.h \ sha/sha.h stack/stack.h tmdiff.h txt_db/txt_db.h x509/x509.h \ x509/x509_vfy.h x509v3/x509v3.h +.if defined(WITH_IDEA) && ${WITH_IDEA} == YES +HDRS+= idea/idea.h +.endif + + .for h in ${HDRS} CRYPTO_HDRS+= ${LCRYPTO_SRC}/${h} .endfor diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc index 6197d632a814..319d8098ea65 100644 --- a/secure/lib/libcrypto/Makefile.inc +++ b/secure/lib/libcrypto/Makefile.inc @@ -1,7 +1,10 @@ # $FreeBSD$ LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl/crypto -CFLAGS+= -DTERMIOS -DANSI_SOURCE -DNO_IDEA -I${LCRYPTO_SRC} -I${.OBJDIR} +CFLAGS+= -DTERMIOS -DANSI_SOURCE -I${LCRYPTO_SRC} -I${.OBJDIR} +.if !defined(WITH_IDEA) || ${WITH_IDEA} != YES +CFLAGS+= -DNO_IDEA +.endif .if ${MACHINE_ARCH} == "i386" CFLAGS+= -DL_ENDIAN diff --git a/secure/usr.bin/openssl/Makefile b/secure/usr.bin/openssl/Makefile index 7499cb7e8845..1cde16bdc24e 100644 --- a/secure/usr.bin/openssl/Makefile +++ b/secure/usr.bin/openssl/Makefile @@ -10,7 +10,7 @@ NOMAN= noman OPENSSL_SRC= ${.CURDIR}/../../../crypto/openssl/apps LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl/crypto -CFLAGS+= -DMONOLITH -DNO_IDEA -I${.CURDIR} +CFLAGS+= -DMONOLITH -I${.CURDIR} WITH_RSA?= YES .if ${WITH_RSA} == NO