summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2000-08-20 08:56:56 +0000
committerKris Kennaway <kris@FreeBSD.org>2000-08-20 08:56:56 +0000
commitfffc9555c8deb5038ae602d20d65365b9a6d1bd8 (patch)
treec87a0e8d15eb4101081f67f0d96112e08d8328f3
parent3c1b3e1840b8cbd96c05d29481b22b77d81ea81a (diff)
Notes
-rw-r--r--secure/Makefile.inc4
-rw-r--r--secure/lib/libcrypto/Makefile.inc31
-rw-r--r--secure/lib/libcrypto/opensslconf-i386.h37
-rw-r--r--secure/lib/librsausa/Makefile24
-rw-r--r--secure/usr.bin/openssl/Makefile30
5 files changed, 87 insertions, 39 deletions
diff --git a/secure/Makefile.inc b/secure/Makefile.inc
index afe5e9772292..f4968b896fd4 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(MAKE_IDEA) || ${MAKE_IDEA} != YES
+CFLAGS+= -DNO_IDEA
+.endif
diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc
index 6391c6874019..5df109004b8b 100644
--- a/secure/lib/libcrypto/Makefile.inc
+++ b/secure/lib/libcrypto/Makefile.inc
@@ -1,16 +1,37 @@
# $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(MAKE_IDEA) || ${MAKE_IDEA} != YES
+CFLAGS+= -DNO_IDEA
+.endif
.if ${MACHINE_ARCH} == "i386"
CFLAGS+= -DL_ENDIAN
# -DBN_ASM -DSHA1_ASM -DMD5_ASM -DRMD160_ASM - XXX notyet
-CFLAGS+= -DDEVRANDOM=\"/dev/urandom\"
-.else
-.if ${MACHINE_ARCH} == "alpha"
+.elif ${MACHINE_ARCH} == "alpha"
# no ENDIAN stuff defined for alpha (64-bit)
.endif
-.endif
WITH_RSA?= YES
+
+SRCS+= buildinf.h openssl/opensslconf.h
+CLEANFILES+= buildinf.h openssl/opensslconf.h
+CLEANDIRS+= openssl
+
+buildinf.h:
+ ( echo "#ifndef MK1MF_BUILD"; \
+ echo " /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \
+ echo " #define CFLAGS \"$(CC)\""; \
+ echo " #define PLATFORM \"`uname -s`-`uname -m`\""; \
+ echo " #define DATE \"`LC_TIME=C date`\""; \
+ echo "#endif" ) > ${.TARGET}
+
+# XXX: The openssl/ dependencies are not correct, in that a change in
+# any of ${CRYPTO_HDRS} ${EXTRA_HDRS} will no repopulate openssl/.
+# This deficiency will be fixed in a later commit.
+
+openssl/opensslconf.h: ../libcrypto/opensslconf-${MACHINE_ARCH}.h
+ mkdir -p openssl
+ cp ${.OODATE} ${.TARGET}
+ ${INSTALL} ${COPY} -m 444 ${CRYPTO_HDRS} ${EXTRA_HDRS} openssl
diff --git a/secure/lib/libcrypto/opensslconf-i386.h b/secure/lib/libcrypto/opensslconf-i386.h
index d80b68fc91de..fc3cf0432479 100644
--- a/secure/lib/libcrypto/opensslconf-i386.h
+++ b/secure/lib/libcrypto/opensslconf-i386.h
@@ -1,7 +1,24 @@
/* $FreeBSD$ */
+/* opensslconf.h */
-/* crypto/opensslconf.h */
-/* WARNING: This file is autogenerated by Configure */
+/* WARNING: Generated automatically from opensslconf.h.in by Configure. */
+
+/* OpenSSL was configured with the following options: */
+#ifdef OPENSSL_ALGORITHM_DEFINES
+ /* no ciphers excluded */
+#endif
+#ifdef OPENSSL_THREAD_DEFINES
+# ifndef THREADS
+# define THREADS
+# endif
+#endif
+#ifdef OPENSSL_OTHER_DEFINES
+# ifndef NO_ASM
+# define NO_ASM
+# endif
+#endif
+
+/* crypto/opensslconf.h.in */
/* Generate 80386 code? */
#undef I386_ONLY
@@ -27,11 +44,25 @@
#define RC2_INT unsigned int
#endif
-#if defined(HEADER_RC4_H) && !defined(RC4_INT)
+#if defined(HEADER_RC4_H)
+#if !defined(RC4_INT)
/* using int types make the structure larger but make the code faster
* on most boxes I have tested - up to %20 faster. */
+/*
+ * I don't know what does "most" mean, but declaring "int" is a must on:
+ * - Intel P6 because partial register stalls are very expensive;
+ * - elder Alpha because it lacks byte load/store instructions;
+ */
#define RC4_INT unsigned int
#endif
+#if !defined(RC4_CHUNK)
+/*
+ * This enables code handling data aligned at natural CPU word
+ * boundary. See crypto/rc4/rc4_enc.c for further details.
+ */
+#undef RC4_CHUNK
+#endif
+#endif
#if defined(HEADER_DES_H) && !defined(DES_LONG)
/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
diff --git a/secure/lib/librsausa/Makefile b/secure/lib/librsausa/Makefile
index 6196af920f6a..70dbcb785a8d 100644
--- a/secure/lib/librsausa/Makefile
+++ b/secure/lib/librsausa/Makefile
@@ -2,7 +2,8 @@
.include "../libcrypto/Makefile.inc"
-# Don't blame kris.. -peter
+.PATH: ${LCRYPTO_SRC}/../rsaref
+
MAINTAINER= kris
LIB= rsaUSA
@@ -25,23 +26,8 @@ HDRS= asn1/asn1.h asn1/asn1_mac.h bio/bio.h bf/blowfish.h bn/bn.h \
stack/safestack.h sha/sha.h stack/stack.h tmdiff.h txt_db/txt_db.h \
x509/x509.h x509/x509_vfy.h x509v3/x509v3.h
-beforedepend: headers ${.OBJDIR}/openssl/opensslconf.h
-
-DPADD+= ${.OBJDIR}/openssl/opensslconf.h
-
-CLEANDIRS+= ${.OBJDIR}/openssl
-
-${.OBJDIR}/openssl/opensslconf.h: ../libcrypto/opensslconf-${MACHINE_ARCH}.h
- @test -d ${.OBJDIR}/openssl || mkdir -p ${.OBJDIR}/openssl; \
- cp ${.OODATE} ${.TARGET}
-
-headers:
- @test -d ${.OBJDIR}/openssl || mkdir -p ${.OBJDIR}/openssl; \
- for i in ${HDRS}; do \
- ${INSTALL} ${COPY} -m 444 ${LCRYPTO_SRC}/$$i \
- ${.OBJDIR}/openssl; \
- done
-
-.PATH: ${LCRYPTO_SRC}/../rsaref
+.for h in ${HDRS}
+CRYPTO_HDRS+= ${LCRYPTO_SRC}/${h}
+.endfor
.include <bsd.lib.mk>
diff --git a/secure/usr.bin/openssl/Makefile b/secure/usr.bin/openssl/Makefile
index 93c19d89f6d8..4aea4f09d294 100644
--- a/secure/usr.bin/openssl/Makefile
+++ b/secure/usr.bin/openssl/Makefile
@@ -1,28 +1,34 @@
# $FreeBSD$
+OPENSSL_SRC= ${.CURDIR}/../../../crypto/openssl/apps
+LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl/crypto
+
+.PATH: ${OPENSSL_SRC} ${OPENSSL_SRC}/../doc/apps/
+
PROG= openssl
MAINTAINER= kris
LDADD= -lssl -lcrypto
-NOMAN= noman
-
-OPENSSL_SRC= ${.CURDIR}/../../../crypto/openssl/apps
-LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl/crypto
+MAN1= openssl.1
+MLINKS= openssl.1 ssl.8
-CFLAGS+= -DMONOLITH -DNO_IDEA -I${.CURDIR}
+CFLAGS+= -DMONOLITH -I${.CURDIR}
WITH_RSA?= YES
.if ${WITH_RSA} == NO
CFLAGS+= -DNO_RSA -DNO_SSL2
.endif
-SRCS= apps.c asn1pars.c ca.c ciphers.c crl.c crl2p7.c dgst.c dh.c \
- dsa.c dsaparam.c enc.c errstr.c gendh.c gendsa.c genrsa.c \
- nseq.c openssl.c pkcs12.c pkcs7.c pkcs8.c req.c rsa.c s_cb.c \
- s_client.c s_server.c s_socket.c s_time.c sess_id.c speed.c \
- verify.c version.c x509.c
-
-.PATH: ${OPENSSL_SRC}
+SRCS= app_rand.c apps.c asn1pars.c ca.c ciphers.c crl.c crl2p7.c dgst.c \
+ dh.c dhparam.c dsa.c dsaparam.c enc.c errstr.c gendh.c gendsa.c \
+ genrsa.c nseq.c openssl.c passwd.c pkcs12.c pkcs7.c pkcs8.c rand.c \
+ req.c rsa.c s_cb.c s_client.c s_server.c s_socket.c s_time.c \
+ sess_id.c smime.c speed.c spkac.c verify.c version.c x509.c
.include <bsd.prog.mk>
+
+.SUFFIXES: .out .o .c .cc .cpp .cxx .C .m .y .l .s .S .pod
+
+.pod.1:
+ pod2man ${.IMPSRC} > ${.TARGET}