Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry. RedHat has
evidently built all "core system packages" with this option for some time.
This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.
This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros. Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.
Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default. Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 16:06:17 +04:00
|
|
|
# $NetBSD: Makefile,v 1.25 2007/05/28 12:06:29 tls Exp $
|
2001-12-12 15:24:19 +03:00
|
|
|
|
|
|
|
NOMAN= # defined
|
2000-06-16 10:29:40 +04:00
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry. RedHat has
evidently built all "core system packages" with this option for some time.
This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.
This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros. Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.
Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default. Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 16:06:17 +04:00
|
|
|
USE_FORT?= yes # cryptographic software
|
|
|
|
|
2000-06-16 10:29:40 +04:00
|
|
|
# RCSid:
|
Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry. RedHat has
evidently built all "core system packages" with this option for some time.
This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.
This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros. Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.
Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default. Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 16:06:17 +04:00
|
|
|
# $Id: Makefile,v 1.25 2007/05/28 12:06:29 tls Exp $
|
2000-06-16 10:29:40 +04:00
|
|
|
#
|
|
|
|
# @(#) Copyright (c) 1995 Simon J. Gerraty
|
|
|
|
#
|
|
|
|
# This file is provided in the hope that it will
|
|
|
|
# be of use. There is absolutely NO WARRANTY.
|
|
|
|
# Permission to copy, redistribute or otherwise
|
|
|
|
# use this file is hereby granted provided that
|
|
|
|
# the above copyright notice and this notice are
|
|
|
|
# left intact.
|
|
|
|
#
|
|
|
|
# Please send copies of changes and bug-fixes to:
|
|
|
|
# sjg@quick.com.au
|
|
|
|
#
|
|
|
|
|
2000-06-16 10:37:17 +04:00
|
|
|
# XXX There's a bit of work to do before we can enable warnings.
|
|
|
|
WARNS=0
|
|
|
|
|
2000-06-16 10:29:40 +04:00
|
|
|
PROG= openssl
|
|
|
|
|
|
|
|
SRCS= openssl.c
|
2005-11-26 03:36:40 +03:00
|
|
|
SRCS+= apps.c ecparam.c ec.c
|
2001-04-12 11:48:03 +04:00
|
|
|
SRCS+= s_cb.c s_socket.c
|
|
|
|
SRCS+= app_rand.c
|
|
|
|
SRCS+= verify.c asn1pars.c req.c dgst.c dh.c dhparam.c enc.c passwd.c gendh.c errstr.c ca.c \
|
|
|
|
pkcs7.c crl2p7.c crl.c \
|
|
|
|
rsa.c rsautl.c dsa.c dsaparam.c \
|
2005-03-26 01:36:54 +03:00
|
|
|
x509.c genrsa.c gendsa.c prime.c s_server.c s_client.c speed.c \
|
2003-07-24 18:20:59 +04:00
|
|
|
s_time.c version.c sess_id.c \
|
|
|
|
ciphers.c nseq.c pkcs12.c pkcs8.c spkac.c smime.c rand.c engine.c ocsp.c
|
2000-06-16 10:29:40 +04:00
|
|
|
|
2002-08-31 14:46:36 +04:00
|
|
|
CPPFLAGS+= -DMONOLITH -DUSE_SSL -I${OPENSSLSRC}
|
2000-10-02 02:13:37 +04:00
|
|
|
|
2003-08-28 00:18:41 +04:00
|
|
|
# with normal OpenSSL, OPENSSL_NO_{IDEA,MDC2,RC5} changes ABI due to change in
|
2002-09-27 11:08:29 +04:00
|
|
|
# struct/union. we nuked all of them in our header files and it is now safe.
|
2000-10-02 02:13:37 +04:00
|
|
|
.if ${MKCRYPTO_IDEA} == "no"
|
2003-08-28 00:18:41 +04:00
|
|
|
CPPFLAGS+= -DOPENSSL_NO_IDEA
|
2001-01-08 10:49:01 +03:00
|
|
|
.else
|
|
|
|
LDADD+= -lcrypto_idea
|
|
|
|
DPADD+= ${LIBCRYPTO_IDEA}
|
2000-10-02 02:13:37 +04:00
|
|
|
.endif
|
2002-09-26 17:05:54 +04:00
|
|
|
.if ${MKCRYPTO_MDC2} == "no"
|
2003-08-28 00:18:41 +04:00
|
|
|
CPPFLAGS+= -DOPENSSL_NO_MDC2
|
2002-09-26 17:05:54 +04:00
|
|
|
.else
|
|
|
|
LDADD+= -lcrypto_mdc2
|
|
|
|
DPADD+= ${LIBCRYPTO_MDC2}
|
|
|
|
.endif
|
2002-09-27 11:08:29 +04:00
|
|
|
.if ${MKCRYPTO_RC5} == "no"
|
2003-08-28 00:18:41 +04:00
|
|
|
CPPFLAGS+= -DOPENSSL_NO_RC5
|
2002-09-27 11:08:29 +04:00
|
|
|
.else
|
|
|
|
LDADD+= -lcrypto_rc5
|
|
|
|
DPADD+= ${LIBCRYPTO_RC5}
|
|
|
|
.endif
|
2000-10-02 02:13:37 +04:00
|
|
|
|
2001-01-08 10:49:01 +03:00
|
|
|
# this must be _after_ the libcrypto_rc5/libcrypto_idea entries.
|
2005-03-09 06:11:22 +03:00
|
|
|
LDADD+= -lssl -lcrypto -lcrypt
|
|
|
|
DPADD+= ${LIBSSL} ${LIBCRYPTO} ${LIBCRYPT}
|
2001-01-08 10:49:01 +03:00
|
|
|
|
2002-09-18 18:00:33 +04:00
|
|
|
CRYPTODIST= ${NETBSDSRCDIR}/crypto/dist
|
|
|
|
.include "${NETBSDSRCDIR}/crypto/Makefile.openssl"
|
2000-06-16 10:29:40 +04:00
|
|
|
.PATH: ${OPENSSLSRC}/apps
|
|
|
|
|
2003-07-24 18:20:59 +04:00
|
|
|
#LINKS= openssl verify \
|
|
|
|
# openssl asn1pars \
|
2000-06-16 10:29:40 +04:00
|
|
|
# openssl req \
|
|
|
|
# openssl dgst \
|
|
|
|
# openssl dh \
|
2003-07-24 18:20:59 +04:00
|
|
|
# openssl dhparam \
|
2000-06-16 10:29:40 +04:00
|
|
|
# openssl enc \
|
2003-07-24 18:20:59 +04:00
|
|
|
# openssl passwd \
|
2000-06-16 10:29:40 +04:00
|
|
|
# openssl gendh \
|
|
|
|
# openssl errstr \
|
|
|
|
# openssl ca \
|
|
|
|
# openssl crl \
|
2003-07-24 18:20:59 +04:00
|
|
|
# openssl rsa \
|
|
|
|
# openssl rsautl \
|
2000-06-16 10:29:40 +04:00
|
|
|
# openssl dsa \
|
|
|
|
# openssl dsaparam \
|
|
|
|
# openssl x509 \
|
2003-07-24 18:20:59 +04:00
|
|
|
# openssl genrsa \
|
|
|
|
# openssl gendsa \
|
2000-06-16 10:29:40 +04:00
|
|
|
# openssl s_server \
|
|
|
|
# openssl s_client \
|
|
|
|
# openssl speed \
|
|
|
|
# openssl s_time \
|
|
|
|
# openssl version \
|
|
|
|
# openssl pkcs7 \
|
|
|
|
# openssl crl2pkcs7 \
|
2003-07-24 18:20:59 +04:00
|
|
|
# openssl sess_id \
|
|
|
|
# openssl ciphers \
|
|
|
|
# openssl nseq \
|
|
|
|
# openssl pkcs12 \
|
|
|
|
# openssl pkcs8 \
|
|
|
|
# openssl spkac \
|
|
|
|
# openssl smime \
|
|
|
|
# openssl rand \
|
|
|
|
# openssl engine \
|
|
|
|
# openssl ocsp
|
2000-06-16 10:29:40 +04:00
|
|
|
|
|
|
|
.if ${MKSHARE} != "no"
|
2005-03-26 03:32:35 +03:00
|
|
|
FILES= CA.sh CA.pl openssl.cnf
|
2000-06-16 10:29:40 +04:00
|
|
|
FILESDIR=/usr/share/examples/openssl
|
|
|
|
.endif
|
|
|
|
|
2002-04-24 12:18:45 +04:00
|
|
|
.include <bsd.prog.mk>
|