Merge lp:~ubuntu-branches/ubuntu/oneiric/openssl/oneiric-201110041452 into lp:ubuntu/oneiric/openssl

Proposed by Ubuntu Package Importer
Status: Needs review
Proposed branch: lp:~ubuntu-branches/ubuntu/oneiric/openssl/oneiric-201110041452
Merge into: lp:ubuntu/oneiric/openssl
Diff against target: 1890 lines (+0/-1866)
5 files modified
Makefile (+0/-640)
Makefile.bak (+0/-640)
apps/CA.pl (+0/-189)
crypto/opensslconf.h (+0/-217)
tools/c_rehash (+0/-180)
To merge this branch: bzr merge lp:~ubuntu-branches/ubuntu/oneiric/openssl/oneiric-201110041452
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+78107@code.launchpad.net

Description of the change

The package importer has detected a possible inconsistency between the package history in the archive and the history in bzr. As the archive is authoritative the importer has made lp:ubuntu/oneiric/openssl reflect what is in the archive and the old bzr branch has been pushed to lp:~ubuntu-branches/ubuntu/oneiric/openssl/oneiric-201110041452. This merge proposal was created so that an Ubuntu developer can review the situations and perform a merge/upload if necessary. There are three typical cases where this can happen.
  1. Where someone pushes a change to bzr and someone else uploads the package without that change. This is the reason that this check is done by the importer. If this appears to be the case then a merge/upload should be done if the changes that were in bzr are still desirable.
  2. The importer incorrectly detected the above situation when someone made a change in bzr and then uploaded it.
  3. The importer incorrectly detected the above situation when someone just uploaded a package and didn't touch bzr.

If this case doesn't appear to be the first situation then set the status of the merge proposal to "Rejected" and help avoid the problem in future by filing a bug at https://bugs.launchpad.net/udd linking to this merge proposal.

(this is an automatically generated message)

To post a comment you must log in.

Unmerged revisions

61. By Colin Watson

releasing version 1.0.0e-2ubuntu3

60. By Colin Watson

merge lp:~anders-kaseorg/ubuntu/oneiric/openssl/spurious-reboot

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== removed file 'Makefile'
--- Makefile 2011-09-14 22:06:03 +0000
+++ Makefile 1970-01-01 00:00:00 +0000
@@ -1,640 +0,0 @@
1### Generated automatically from Makefile.org by Configure.
2
3##
4## Makefile for OpenSSL
5##
6
7VERSION=1.0.0e
8MAJOR=1
9MINOR=0.0
10SHLIB_VERSION_NUMBER=1.0.0
11SHLIB_VERSION_HISTORY=
12SHLIB_MAJOR=1
13SHLIB_MINOR=0.0
14SHLIB_EXT=
15PLATFORM=dist
16OPTIONS= no-gmp no-jpake no-krb5 no-md2 no-rc5 no-rfc3779 no-shared no-store no-zlib no-zlib-dynamic static-engine
17CONFIGURE_ARGS=dist
18SHLIB_TARGET=
19
20# HERE indicates where this Makefile lives. This can be used to indicate
21# where sub-Makefiles are expected to be. Currently has very limited usage,
22# and should probably not be bothered with at all.
23HERE=.
24
25# INSTALL_PREFIX is for package builders so that they can configure
26# for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
27# Normally it is left empty.
28INSTALL_PREFIX=
29INSTALLTOP=/usr/local/ssl
30
31# Do not edit this manually. Use Configure --openssldir=DIR do change this!
32OPENSSLDIR=/usr/local/ssl
33
34# NO_IDEA - Define to build without the IDEA algorithm
35# NO_RC4 - Define to build without the RC4 algorithm
36# NO_RC2 - Define to build without the RC2 algorithm
37# THREADS - Define when building with threads, you will probably also need any
38# system defines as well, i.e. _REENTERANT for Solaris 2.[34]
39# TERMIO - Define the termio terminal subsystem, needed if sgtty is missing.
40# TERMIOS - Define the termios terminal subsystem, Silicon Graphics.
41# LONGCRYPT - Define to use HPUX 10.x's long password modification to crypt(3).
42# DEVRANDOM - Give this the value of the 'random device' if your OS supports
43# one. 32 bytes will be read from this when the random
44# number generator is initalised.
45# SSL_FORBID_ENULL - define if you want the server to be not able to use the
46# NULL encryption ciphers.
47#
48# LOCK_DEBUG - turns on lots of lock debug output :-)
49# REF_CHECK - turn on some xyz_free() assertions.
50# REF_PRINT - prints some stuff on structure free.
51# CRYPTO_MDEBUG - turns on my 'memory leak' detecting stuff
52# MFUNC - Make all Malloc/Free/Realloc calls call
53# CRYPTO_malloc/CRYPTO_free/CRYPTO_realloc which can be setup to
54# call application defined callbacks via CRYPTO_set_mem_functions()
55# MD5_ASM needs to be defined to use the x86 assembler for MD5
56# SHA1_ASM needs to be defined to use the x86 assembler for SHA1
57# RMD160_ASM needs to be defined to use the x86 assembler for RIPEMD160
58# Do not define B_ENDIAN or L_ENDIAN if 'unsigned long' == 8. It must
59# equal 4.
60# PKCS1_CHECK - pkcs1 tests.
61
62CC= cc
63CFLAG= -O
64DEPFLAG= -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_STORE
65PEX_LIBS=
66EX_LIBS=
67EXE_EXT=
68ARFLAGS=
69AR= ar $(ARFLAGS) r
70RANLIB= /usr/bin/ranlib
71NM= nm
72PERL= /usr/bin/perl
73TAR= tar
74TARFLAGS= --no-recursion
75MAKEDEPPROG=makedepend
76LIBDIR=lib
77
78# We let the C compiler driver to take care of .s files. This is done in
79# order to be excused from maintaining a separate set of architecture
80# dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC
81# gcc, then the driver will automatically translate it to -xarch=v8plus
82# and pass it down to assembler.
83AS=$(CC) -c
84ASFLAG=$(CFLAG)
85
86# For x86 assembler: Set PROCESSOR to 386 if you want to support
87# the 80386.
88PROCESSOR=
89
90# CPUID module collects small commonly used assembler snippets
91CPUID_OBJ= mem_clr.o
92BN_ASM= bn_asm.o
93DES_ENC= des_enc.o fcrypt_b.o
94AES_ENC= aes_core.o aes_cbc.o
95BF_ENC= bf_enc.o
96CAST_ENC= c_enc.o
97RC4_ENC= rc4_enc.o rc4_skey.o
98RC5_ENC= rc5_enc.o
99MD5_ASM_OBJ=
100SHA1_ASM_OBJ=
101RMD160_ASM_OBJ=
102WP_ASM_OBJ= wp_block.o
103CMLL_ENC= camellia.o cmll_misc.o cmll_cbc.o
104PERLASM_SCHEME=
105
106# KRB5 stuff
107KRB5_INCLUDES=
108LIBKRB5=
109
110# Zlib stuff
111ZLIB_INCLUDE=
112LIBZLIB=
113
114DIRS= crypto ssl engines apps test tools
115ENGDIRS= ccgost
116SHLIBDIRS= crypto ssl
117
118# dirs in crypto to build
119SDIRS= \
120 objects \
121 md4 md5 sha mdc2 hmac ripemd whrlpool \
122 des aes rc2 rc4 idea bf cast camellia seed modes \
123 bn ec rsa dsa ecdsa dh ecdh dso engine \
124 buffer bio stack lhash rand err \
125 evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \
126 cms pqueue ts
127# keep in mind that the above list is adjusted by ./Configure
128# according to no-xxx arguments...
129
130# tests to perform. "alltests" is a special word indicating that all tests
131# should be performed.
132TESTS = alltests
133
134MAKEFILE= Makefile
135
136MANDIR=$(OPENSSLDIR)/man
137MAN1=1
138MAN3=3
139MANSUFFIX=
140HTMLSUFFIX=html
141HTMLDIR=$(OPENSSLDIR)/html
142SHELL=/bin/sh
143
144TOP= .
145ONEDIRS=out tmp
146EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS
147WDIRS= windows
148LIBS= libcrypto.a libssl.a
149SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
150SHARED_SSL=libssl$(SHLIB_EXT)
151SHARED_LIBS=
152SHARED_LIBS_LINK_EXTS=
153SHARED_LDFLAGS=
154
155GENERAL= Makefile
156BASENAME= openssl
157NAME= $(BASENAME)-$(VERSION)
158TARFILE= $(NAME).tar
159WTARFILE= $(NAME)-win.tar
160EXHEADER= e_os2.h
161HEADER= e_os.h
162
163all: Makefile build_all openssl.pc libssl.pc libcrypto.pc
164
165# as we stick to -e, CLEARENV ensures that local variables in lower
166# Makefiles remain local and variable. $${VAR+VAR} is tribute to Korn
167# shell, which [annoyingly enough] terminates unset with error if VAR
168# is not present:-( TOP= && unset TOP is tribute to HP-UX /bin/sh,
169# which terminates unset with error if no variable was present:-(
170CLEARENV= TOP= && unset TOP $${LIB+LIB} $${LIBS+LIBS} \
171 $${INCLUDE+INCLUDE} $${INCLUDES+INCLUDES} \
172 $${DIR+DIR} $${DIRS+DIRS} $${SRC+SRC} \
173 $${LIBSRC+LIBSRC} $${LIBOBJ+LIBOBJ} $${ALL+ALL} \
174 $${EXHEADER+EXHEADER} $${HEADER+HEADER} \
175 $${GENERAL+GENERAL} $${CFLAGS+CFLAGS} \
176 $${ASFLAGS+ASFLAGS} $${AFLAGS+AFLAGS} \
177 $${LDCMD+LDCMD} $${LDFLAGS+LDFLAGS} \
178 $${SHAREDCMD+SHAREDCMD} $${SHAREDFLAGS+SHAREDFLAGS} \
179 $${SHARED_LIB+SHARED_LIB} $${LIBEXTRAS+LIBEXTRAS}
180
181BUILDENV= PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)' \
182 CC='$(CC)' CFLAG='$(CFLAG)' \
183 AS='$(CC)' ASFLAG='$(CFLAG) -c' \
184 AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)' \
185 CROSS_COMPILE='$(CROSS_COMPILE)' \
186 PERL='$(PERL)' ENGDIRS='$(ENGDIRS)' \
187 SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)' \
188 INSTALL_PREFIX='$(INSTALL_PREFIX)' \
189 INSTALLTOP='$(INSTALLTOP)' OPENSSLDIR='$(OPENSSLDIR)' \
190 LIBDIR='$(LIBDIR)' \
191 MAKEDEPEND='$$$${TOP}/util/domd $$$${TOP} -MD $(MAKEDEPPROG)' \
192 DEPFLAG='-DOPENSSL_NO_DEPRECATED $(DEPFLAG)' \
193 MAKEDEPPROG='$(MAKEDEPPROG)' \
194 SHARED_LDFLAGS='$(SHARED_LDFLAGS)' \
195 KRB5_INCLUDES='$(KRB5_INCLUDES)' LIBKRB5='$(LIBKRB5)' \
196 ZLIB_INCLUDE='$(ZLIB_INCLUDE)' LIBZLIB='$(LIBZLIB)' \
197 EXE_EXT='$(EXE_EXT)' SHARED_LIBS='$(SHARED_LIBS)' \
198 SHLIB_EXT='$(SHLIB_EXT)' SHLIB_TARGET='$(SHLIB_TARGET)' \
199 PEX_LIBS='$(PEX_LIBS)' EX_LIBS='$(EX_LIBS)' \
200 CPUID_OBJ='$(CPUID_OBJ)' \
201 BN_ASM='$(BN_ASM)' DES_ENC='$(DES_ENC)' \
202 AES_ENC='$(AES_ENC)' CMLL_ENC='$(CMLL_ENC)' \
203 BF_ENC='$(BF_ENC)' CAST_ENC='$(CAST_ENC)' \
204 RC4_ENC='$(RC4_ENC)' RC5_ENC='$(RC5_ENC)' \
205 SHA1_ASM_OBJ='$(SHA1_ASM_OBJ)' \
206 MD5_ASM_OBJ='$(MD5_ASM_OBJ)' \
207 RMD160_ASM_OBJ='$(RMD160_ASM_OBJ)' \
208 WP_ASM_OBJ='$(WP_ASM_OBJ)' \
209 PERLASM_SCHEME='$(PERLASM_SCHEME)' \
210 THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES=
211# MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors,
212# which in turn eliminates ambiguities in variable treatment with -e.
213
214# BUILD_CMD is a generic macro to build a given target in a given
215# subdirectory. The target must be given through the shell variable
216# `target' and the subdirectory to build in must be given through `dir'.
217# This macro shouldn't be used directly, use RECURSIVE_BUILD_CMD or
218# BUILD_ONE_CMD instead.
219#
220# BUILD_ONE_CMD is a macro to build a given target in a given
221# subdirectory if that subdirectory is part of $(DIRS). It requires
222# exactly the same shell variables as BUILD_CMD.
223#
224# RECURSIVE_BUILD_CMD is a macro to build a given target in all
225# subdirectories defined in $(DIRS). It requires that the target
226# is given through the shell variable `target'.
227BUILD_CMD= if [ -d "$$dir" ]; then \
228 ( cd $$dir && echo "making $$target in $$dir..." && \
229 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \
230 ) || exit 1; \
231 fi
232RECURSIVE_BUILD_CMD=for dir in $(DIRS); do $(BUILD_CMD); done
233BUILD_ONE_CMD=\
234 if expr " $(DIRS) " : ".* $$dir " >/dev/null 2>&1; then \
235 $(BUILD_CMD); \
236 fi
237
238reflect:
239 @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV)
240
241sub_all: build_all
242build_all: build_libs build_apps build_tests build_tools
243
244build_libs: build_crypto build_ssl build_engines
245
246build_crypto:
247 @dir=crypto; target=all; $(BUILD_ONE_CMD)
248build_ssl:
249 @dir=ssl; target=all; $(BUILD_ONE_CMD)
250build_engines:
251 @dir=engines; target=all; $(BUILD_ONE_CMD)
252build_apps:
253 @dir=apps; target=all; $(BUILD_ONE_CMD)
254build_tests:
255 @dir=test; target=all; $(BUILD_ONE_CMD)
256build_tools:
257 @dir=tools; target=all; $(BUILD_ONE_CMD)
258
259all_testapps: build_libs build_testapps
260build_testapps:
261 @dir=crypto; target=testapps; $(BUILD_ONE_CMD)
262
263libcrypto$(SHLIB_EXT): libcrypto.a
264 @if [ "$(SHLIB_TARGET)" != "" ]; then \
265 $(MAKE) SHLIBDIRS=crypto build-shared; \
266 else \
267 echo "There's no support for shared libraries on this platform" >&2; \
268 exit 1; \
269 fi
270
271libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
272 @if [ "$(SHLIB_TARGET)" != "" ]; then \
273 $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
274 else \
275 echo "There's no support for shared libraries on this platform" >&2; \
276 exit 1; \
277 fi
278
279clean-shared:
280 @set -e; for i in $(SHLIBDIRS); do \
281 if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
282 tmp="$(SHARED_LIBS_LINK_EXTS)"; \
283 for j in $${tmp:-x}; do \
284 ( set -x; rm -f lib$$i$$j ); \
285 done; \
286 fi; \
287 ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
288 if [ "$(PLATFORM)" = "Cygwin" ]; then \
289 ( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
290 fi; \
291 done
292
293link-shared:
294 @ set -e; for i in $(SHLIBDIRS); do \
295 $(MAKE) -f $(HERE)/Makefile.shared -e $(BUILDENV) \
296 LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
297 LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
298 symlink.$(SHLIB_TARGET); \
299 libs="$$libs -l$$i"; \
300 done
301
302build-shared: do_$(SHLIB_TARGET) link-shared
303
304do_$(SHLIB_TARGET):
305 @ set -e; libs='-L. $(SHLIBDEPS)'; for i in $(SHLIBDIRS); do \
306 if [ "$$i" = "ssl" -a -n "$(LIBKRB5)" ]; then \
307 libs="$(LIBKRB5) $$libs"; \
308 fi; \
309 $(CLEARENV) && $(MAKE) -f Makefile.shared -e $(BUILDENV) \
310 LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
311 LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
312 LIBDEPS="$$libs $(EX_LIBS)" \
313 link_a.$(SHLIB_TARGET); \
314 libs="-l$$i $$libs"; \
315 done
316
317libcrypto.pc: Makefile
318 @ ( echo 'prefix=$(INSTALLTOP)'; \
319 echo 'exec_prefix=$${prefix}'; \
320 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
321 echo 'includedir=$${prefix}/include'; \
322 echo ''; \
323 echo 'Name: OpenSSL-libcrypto'; \
324 echo 'Description: OpenSSL cryptography library'; \
325 echo 'Version: '$(VERSION); \
326 echo 'Requires: '; \
327 echo 'Libs: -L$${libdir} -lcrypto $(EX_LIBS)'; \
328 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
329
330libssl.pc: Makefile
331 @ ( echo 'prefix=$(INSTALLTOP)'; \
332 echo 'exec_prefix=$${prefix}'; \
333 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
334 echo 'includedir=$${prefix}/include'; \
335 echo ''; \
336 echo 'Name: OpenSSL'; \
337 echo 'Description: Secure Sockets Layer and cryptography libraries'; \
338 echo 'Version: '$(VERSION); \
339 echo 'Requires: '; \
340 echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
341 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
342
343openssl.pc: Makefile
344 @ ( echo 'prefix=$(INSTALLTOP)'; \
345 echo 'exec_prefix=$${prefix}'; \
346 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
347 echo 'includedir=$${prefix}/include'; \
348 echo ''; \
349 echo 'Name: OpenSSL'; \
350 echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
351 echo 'Version: '$(VERSION); \
352 echo 'Requires: '; \
353 echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
354 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
355
356Makefile: Makefile.org Configure config
357 @echo "Makefile is older than Makefile.org, Configure or config."
358 @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
359 @false
360
361libclean:
362 rm -f *.map *.so *.so.* *.dll engines/*.so engines/*.dll *.a engines/*.a */lib */*/lib
363
364clean: libclean
365 rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
366 @set -e; target=clean; $(RECURSIVE_BUILD_CMD)
367 rm -f $(LIBS)
368 rm -f openssl.pc libssl.pc libcrypto.pc
369 rm -f speed.* .pure
370 rm -f $(TARFILE)
371 @set -e; for i in $(ONEDIRS) ;\
372 do \
373 rm -fr $$i/*; \
374 done
375
376makefile.one: files
377 $(PERL) util/mk1mf.pl >makefile.one; \
378 sh util/do_ms.sh
379
380files:
381 $(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
382 @set -e; target=files; $(RECURSIVE_BUILD_CMD)
383
384links:
385 @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
386 @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
387 @set -e; target=links; $(RECURSIVE_BUILD_CMD)
388
389gentests:
390 @(cd test && echo "generating dummy tests (if needed)..." && \
391 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on generate );
392
393dclean:
394 rm -rf *.bak include/openssl certs/.0
395 @set -e; target=dclean; $(RECURSIVE_BUILD_CMD)
396
397rehash: rehash.time
398rehash.time: certs apps
399 @if [ -z "$(CROSS_COMPILE)" ]; then \
400 (OPENSSL="`pwd`/util/opensslwrap.sh"; \
401 [ -x "apps/openssl.exe" ] && OPENSSL="apps/openssl.exe" || :; \
402 OPENSSL_DEBUG_MEMORY=on; \
403 export OPENSSL OPENSSL_DEBUG_MEMORY; \
404 $(PERL) tools/c_rehash certs) && \
405 touch rehash.time; \
406 else :; fi
407
408test: tests
409
410tests: rehash
411 @(cd test && echo "testing..." && \
412 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests );
413 OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a
414
415report:
416 @$(PERL) util/selftest.pl
417
418depend:
419 @set -e; target=depend; $(RECURSIVE_BUILD_CMD)
420
421lint:
422 @set -e; target=lint; $(RECURSIVE_BUILD_CMD)
423
424tags:
425 rm -f TAGS
426 find . -name '[^.]*.[ch]' | xargs etags -a
427
428errors:
429 $(PERL) util/mkerr.pl -recurse -write
430 (cd engines; $(MAKE) PERL=$(PERL) errors)
431 $(PERL) util/ck_errf.pl */*.c */*/*.c
432
433stacks:
434 $(PERL) util/mkstack.pl -write
435
436util/libeay.num::
437 $(PERL) util/mkdef.pl crypto update
438
439util/ssleay.num::
440 $(PERL) util/mkdef.pl ssl update
441
442crypto/objects/obj_dat.h: crypto/objects/obj_dat.pl crypto/objects/obj_mac.h
443 $(PERL) crypto/objects/obj_dat.pl crypto/objects/obj_mac.h crypto/objects/obj_dat.h
444crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num
445 $(PERL) crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h
446crypto/objects/obj_xref.h: crypto/objects/objxref.pl crypto/objects/obj_xref.txt crypto/objects/obj_mac.num
447 $(PERL) crypto/objects/objxref.pl crypto/objects/obj_mac.num crypto/objects/obj_xref.txt >crypto/objects/obj_xref.h
448
449apps/openssl-vms.cnf: apps/openssl.cnf
450 $(PERL) VMS/VMSify-conf.pl < apps/openssl.cnf > apps/openssl-vms.cnf
451
452crypto/bn/bn_prime.h: crypto/bn/bn_prime.pl
453 $(PERL) crypto/bn/bn_prime.pl >crypto/bn/bn_prime.h
454
455
456TABLE: Configure
457 (echo 'Output of `Configure TABLE'"':"; \
458 $(PERL) Configure TABLE) > TABLE
459
460update: errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h crypto/objects/obj_xref.h apps/openssl-vms.cnf crypto/bn/bn_prime.h TABLE depend
461
462# Build distribution tar-file. As the list of files returned by "find" is
463# pretty long, on several platforms a "too many arguments" error or similar
464# would occur. Therefore the list of files is temporarily stored into a file
465# and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
466# tar does not support the --files-from option.
467tar:
468 find . -type d -print | xargs chmod 755
469 find . -type f -print | xargs chmod a+r
470 find . -type f -perm -0100 -print | xargs chmod a+x
471 find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort > ../$(TARFILE).list; \
472 $(TAR) $(TARFLAGS) --files-from ../$(TARFILE).list -cvf - | \
473 tardy --user_number=0 --user_name=openssl \
474 --group_number=0 --group_name=openssl \
475 --prefix=openssl-$(VERSION) - |\
476 gzip --best >../$(TARFILE).gz; \
477 rm -f ../$(TARFILE).list; \
478 ls -l ../$(TARFILE).gz
479
480tar-snap:
481 @$(TAR) $(TARFLAGS) -cvf - \
482 `find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE \! -name '*.o' \! -name '*.a' \! -name '*.so' \! -name '*.so.*' \! -name 'openssl' \! -name '*test' \! -name '.#*' \! -name '*~' | sort` |\
483 tardy --user_number=0 --user_name=openssl \
484 --group_number=0 --group_name=openssl \
485 --prefix=openssl-$(VERSION) - > ../$(TARFILE);\
486 ls -l ../$(TARFILE)
487
488dist:
489 $(PERL) Configure dist
490 @$(MAKE) dist_pem_h
491 @$(MAKE) SDIRS='$(SDIRS)' clean
492 @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' tar
493
494dist_pem_h:
495 (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean)
496
497install: all install_docs install_sw
498
499install_sw:
500 @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
501 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
502 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
503 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \
504 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
505 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
506 $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
507 $(INSTALL_PREFIX)$(OPENSSLDIR)/private
508 @set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\
509 do \
510 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
511 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
512 done;
513 @set -e; target=install; $(RECURSIVE_BUILD_CMD)
514 @set -e; for i in $(LIBS) ;\
515 do \
516 if [ -f "$$i" ]; then \
517 ( echo installing $$i; \
518 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
519 $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
520 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
521 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i ); \
522 fi; \
523 done;
524 @set -e; if [ -n "$(SHARED_LIBS)" ]; then \
525 tmp="$(SHARED_LIBS)"; \
526 for i in $${tmp:-x}; \
527 do \
528 if [ -f "$$i" -o -f "$$i.a" ]; then \
529 ( echo installing $$i; \
530 if [ "$(PLATFORM)" != "Cygwin" ]; then \
531 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
532 chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
533 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
534 else \
535 c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
536 cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
537 chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
538 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
539 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
540 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
541 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
542 fi ); \
543 if expr $(PLATFORM) : 'mingw' > /dev/null; then \
544 ( case $$i in \
545 *crypto*) i=libeay32.dll;; \
546 *ssl*) i=ssleay32.dll;; \
547 esac; \
548 echo installing $$i; \
549 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
550 chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
551 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
552 fi; \
553 fi; \
554 done; \
555 ( here="`pwd`"; \
556 cd $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR); \
557 $(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \
558 if [ "$(INSTALLTOP)" != "/usr" ]; then \
559 echo 'OpenSSL shared libraries have been installed in:'; \
560 echo ' $(INSTALLTOP)'; \
561 echo ''; \
562 sed -e '1,/^$$/d' doc/openssl-shared.txt; \
563 fi; \
564 fi
565 cp libcrypto.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
566 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
567 cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
568 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
569 cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
570 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
571
572install_html_docs:
573 here="`pwd`"; \
574 for subdir in apps crypto ssl; do \
575 mkdir -p $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
576 for i in doc/$$subdir/*.pod; do \
577 fn=`basename $$i .pod`; \
578 echo "installing html/$$fn.$(HTMLSUFFIX)"; \
579 cat $$i \
580 | sed -r 's/L<([^)]*)(\([0-9]\))?\|([^)]*)(\([0-9]\))?>/L<\1|\3>/g' \
581 | pod2html --podroot=doc --htmlroot=.. --podpath=apps:crypto:ssl \
582 | sed -r 's/<!DOCTYPE.*//g' \
583 > $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \
584 $(PERL) util/extract-names.pl < $$i | \
585 grep -v $$filecase "^$$fn\$$" | \
586 (cd $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
587 while read n; do \
588 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$(HTMLSUFFIX) "$$n".$(HTMLSUFFIX); \
589 done); \
590 done; \
591 done
592
593install_docs:
594 @$(PERL) $(TOP)/util/mkdir-p.pl \
595 $(INSTALL_PREFIX)$(MANDIR)/man1 \
596 $(INSTALL_PREFIX)$(MANDIR)/man3 \
597 $(INSTALL_PREFIX)$(MANDIR)/man5 \
598 $(INSTALL_PREFIX)$(MANDIR)/man7
599 @pod2man="`cd ./util; ./pod2mantest $(PERL)`"; \
600 here="`pwd`"; \
601 filecase=; \
602 if [ "$(PLATFORM)" = "DJGPP" -o "$(PLATFORM)" = "Cygwin" -o "$(PLATFORM)" = "mingw" ]; then \
603 filecase=-i; \
604 fi; \
605 set -e; for i in doc/apps/*.pod; do \
606 fn=`basename $$i .pod`; \
607 sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
608 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
609 (cd `$(PERL) util/dirname.pl $$i`; \
610 sh -c "$$pod2man \
611 --section=$$sec --center=OpenSSL \
612 --release=$(VERSION) `basename $$i`") \
613 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
614 $(PERL) util/extract-names.pl < $$i | \
615 (grep -v $$filecase "^$$fn\$$"; true) | \
616 (grep -v "[ ]"; true) | \
617 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
618 while read n; do \
619 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
620 done); \
621 done; \
622 set -e; for i in doc/crypto/*.pod doc/ssl/*.pod; do \
623 fn=`basename $$i .pod`; \
624 sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
625 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
626 (cd `$(PERL) util/dirname.pl $$i`; \
627 sh -c "$$pod2man \
628 --section=$$sec --center=OpenSSL \
629 --release=$(VERSION) `basename $$i`") \
630 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
631 $(PERL) util/extract-names.pl < $$i | \
632 (grep -v $$filecase "^$$fn\$$"; true) | \
633 (grep -v "[ ]"; true) | \
634 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
635 while read n; do \
636 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
637 done); \
638 done
639
640# DO NOT DELETE THIS LINE -- make depend depends on it.
6410
=== removed file 'Makefile.bak'
--- Makefile.bak 2011-09-10 12:03:13 +0000
+++ Makefile.bak 1970-01-01 00:00:00 +0000
@@ -1,640 +0,0 @@
1### Generated automatically from Makefile.org by Configure.
2
3##
4## Makefile for OpenSSL
5##
6
7VERSION=1.0.0e
8MAJOR=1
9MINOR=0.0
10SHLIB_VERSION_NUMBER=1.0.0
11SHLIB_VERSION_HISTORY=
12SHLIB_MAJOR=1
13SHLIB_MINOR=0.0
14SHLIB_EXT=
15PLATFORM=dist
16OPTIONS= no-gmp no-jpake no-krb5 no-md2 no-rc5 no-rfc3779 no-shared no-store no-zlib no-zlib-dynamic static-engine
17CONFIGURE_ARGS=dist
18SHLIB_TARGET=
19
20# HERE indicates where this Makefile lives. This can be used to indicate
21# where sub-Makefiles are expected to be. Currently has very limited usage,
22# and should probably not be bothered with at all.
23HERE=.
24
25# INSTALL_PREFIX is for package builders so that they can configure
26# for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
27# Normally it is left empty.
28INSTALL_PREFIX=
29INSTALLTOP=/usr/local/ssl
30
31# Do not edit this manually. Use Configure --openssldir=DIR do change this!
32OPENSSLDIR=/usr/local/ssl
33
34# NO_IDEA - Define to build without the IDEA algorithm
35# NO_RC4 - Define to build without the RC4 algorithm
36# NO_RC2 - Define to build without the RC2 algorithm
37# THREADS - Define when building with threads, you will probably also need any
38# system defines as well, i.e. _REENTERANT for Solaris 2.[34]
39# TERMIO - Define the termio terminal subsystem, needed if sgtty is missing.
40# TERMIOS - Define the termios terminal subsystem, Silicon Graphics.
41# LONGCRYPT - Define to use HPUX 10.x's long password modification to crypt(3).
42# DEVRANDOM - Give this the value of the 'random device' if your OS supports
43# one. 32 bytes will be read from this when the random
44# number generator is initalised.
45# SSL_FORBID_ENULL - define if you want the server to be not able to use the
46# NULL encryption ciphers.
47#
48# LOCK_DEBUG - turns on lots of lock debug output :-)
49# REF_CHECK - turn on some xyz_free() assertions.
50# REF_PRINT - prints some stuff on structure free.
51# CRYPTO_MDEBUG - turns on my 'memory leak' detecting stuff
52# MFUNC - Make all Malloc/Free/Realloc calls call
53# CRYPTO_malloc/CRYPTO_free/CRYPTO_realloc which can be setup to
54# call application defined callbacks via CRYPTO_set_mem_functions()
55# MD5_ASM needs to be defined to use the x86 assembler for MD5
56# SHA1_ASM needs to be defined to use the x86 assembler for SHA1
57# RMD160_ASM needs to be defined to use the x86 assembler for RIPEMD160
58# Do not define B_ENDIAN or L_ENDIAN if 'unsigned long' == 8. It must
59# equal 4.
60# PKCS1_CHECK - pkcs1 tests.
61
62CC= cc
63CFLAG= -O
64DEPFLAG= -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_STORE
65PEX_LIBS=
66EX_LIBS=
67EXE_EXT=
68ARFLAGS=
69AR= ar $(ARFLAGS) r
70RANLIB= /usr/bin/ranlib
71NM= nm
72PERL= /usr/bin/perl
73TAR= tar
74TARFLAGS= --no-recursion
75MAKEDEPPROG=makedepend
76LIBDIR=lib
77
78# We let the C compiler driver to take care of .s files. This is done in
79# order to be excused from maintaining a separate set of architecture
80# dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC
81# gcc, then the driver will automatically translate it to -xarch=v8plus
82# and pass it down to assembler.
83AS=$(CC) -c
84ASFLAG=$(CFLAG)
85
86# For x86 assembler: Set PROCESSOR to 386 if you want to support
87# the 80386.
88PROCESSOR=
89
90# CPUID module collects small commonly used assembler snippets
91CPUID_OBJ= mem_clr.o
92BN_ASM= bn_asm.o
93DES_ENC= des_enc.o fcrypt_b.o
94AES_ENC= aes_core.o aes_cbc.o
95BF_ENC= bf_enc.o
96CAST_ENC= c_enc.o
97RC4_ENC= rc4_enc.o rc4_skey.o
98RC5_ENC= rc5_enc.o
99MD5_ASM_OBJ=
100SHA1_ASM_OBJ=
101RMD160_ASM_OBJ=
102WP_ASM_OBJ= wp_block.o
103CMLL_ENC= camellia.o cmll_misc.o cmll_cbc.o
104PERLASM_SCHEME=
105
106# KRB5 stuff
107KRB5_INCLUDES=
108LIBKRB5=
109
110# Zlib stuff
111ZLIB_INCLUDE=
112LIBZLIB=
113
114DIRS= crypto ssl engines apps test tools
115ENGDIRS= ccgost
116SHLIBDIRS= crypto ssl
117
118# dirs in crypto to build
119SDIRS= \
120 objects \
121 md4 md5 sha mdc2 hmac ripemd whrlpool \
122 des aes rc2 rc4 idea bf cast camellia seed modes \
123 bn ec rsa dsa ecdsa dh ecdh dso engine \
124 buffer bio stack lhash rand err \
125 evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \
126 cms pqueue ts
127# keep in mind that the above list is adjusted by ./Configure
128# according to no-xxx arguments...
129
130# tests to perform. "alltests" is a special word indicating that all tests
131# should be performed.
132TESTS = alltests
133
134MAKEFILE= Makefile
135
136MANDIR=$(OPENSSLDIR)/man
137MAN1=1
138MAN3=3
139MANSUFFIX=
140HTMLSUFFIX=html
141HTMLDIR=$(OPENSSLDIR)/html
142SHELL=/bin/sh
143
144TOP= .
145ONEDIRS=out tmp
146EDIRS= times doc bugs util include certs ms shlib mt demos perl sf dep VMS
147WDIRS= windows
148LIBS= libcrypto.a libssl.a
149SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
150SHARED_SSL=libssl$(SHLIB_EXT)
151SHARED_LIBS=
152SHARED_LIBS_LINK_EXTS=
153SHARED_LDFLAGS=
154
155GENERAL= Makefile
156BASENAME= openssl
157NAME= $(BASENAME)-$(VERSION)
158TARFILE= $(NAME).tar
159WTARFILE= $(NAME)-win.tar
160EXHEADER= e_os2.h
161HEADER= e_os.h
162
163all: Makefile build_all openssl.pc libssl.pc libcrypto.pc
164
165# as we stick to -e, CLEARENV ensures that local variables in lower
166# Makefiles remain local and variable. $${VAR+VAR} is tribute to Korn
167# shell, which [annoyingly enough] terminates unset with error if VAR
168# is not present:-( TOP= && unset TOP is tribute to HP-UX /bin/sh,
169# which terminates unset with error if no variable was present:-(
170CLEARENV= TOP= && unset TOP $${LIB+LIB} $${LIBS+LIBS} \
171 $${INCLUDE+INCLUDE} $${INCLUDES+INCLUDES} \
172 $${DIR+DIR} $${DIRS+DIRS} $${SRC+SRC} \
173 $${LIBSRC+LIBSRC} $${LIBOBJ+LIBOBJ} $${ALL+ALL} \
174 $${EXHEADER+EXHEADER} $${HEADER+HEADER} \
175 $${GENERAL+GENERAL} $${CFLAGS+CFLAGS} \
176 $${ASFLAGS+ASFLAGS} $${AFLAGS+AFLAGS} \
177 $${LDCMD+LDCMD} $${LDFLAGS+LDFLAGS} \
178 $${SHAREDCMD+SHAREDCMD} $${SHAREDFLAGS+SHAREDFLAGS} \
179 $${SHARED_LIB+SHARED_LIB} $${LIBEXTRAS+LIBEXTRAS}
180
181BUILDENV= PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)' \
182 CC='$(CC)' CFLAG='$(CFLAG)' \
183 AS='$(CC)' ASFLAG='$(CFLAG) -c' \
184 AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)' \
185 CROSS_COMPILE='$(CROSS_COMPILE)' \
186 PERL='$(PERL)' ENGDIRS='$(ENGDIRS)' \
187 SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)' \
188 INSTALL_PREFIX='$(INSTALL_PREFIX)' \
189 INSTALLTOP='$(INSTALLTOP)' OPENSSLDIR='$(OPENSSLDIR)' \
190 LIBDIR='$(LIBDIR)' \
191 MAKEDEPEND='$$$${TOP}/util/domd $$$${TOP} -MD $(MAKEDEPPROG)' \
192 DEPFLAG='-DOPENSSL_NO_DEPRECATED $(DEPFLAG)' \
193 MAKEDEPPROG='$(MAKEDEPPROG)' \
194 SHARED_LDFLAGS='$(SHARED_LDFLAGS)' \
195 KRB5_INCLUDES='$(KRB5_INCLUDES)' LIBKRB5='$(LIBKRB5)' \
196 ZLIB_INCLUDE='$(ZLIB_INCLUDE)' LIBZLIB='$(LIBZLIB)' \
197 EXE_EXT='$(EXE_EXT)' SHARED_LIBS='$(SHARED_LIBS)' \
198 SHLIB_EXT='$(SHLIB_EXT)' SHLIB_TARGET='$(SHLIB_TARGET)' \
199 PEX_LIBS='$(PEX_LIBS)' EX_LIBS='$(EX_LIBS)' \
200 CPUID_OBJ='$(CPUID_OBJ)' \
201 BN_ASM='$(BN_ASM)' DES_ENC='$(DES_ENC)' \
202 AES_ENC='$(AES_ENC)' CMLL_ENC='$(CMLL_ENC)' \
203 BF_ENC='$(BF_ENC)' CAST_ENC='$(CAST_ENC)' \
204 RC4_ENC='$(RC4_ENC)' RC5_ENC='$(RC5_ENC)' \
205 SHA1_ASM_OBJ='$(SHA1_ASM_OBJ)' \
206 MD5_ASM_OBJ='$(MD5_ASM_OBJ)' \
207 RMD160_ASM_OBJ='$(RMD160_ASM_OBJ)' \
208 WP_ASM_OBJ='$(WP_ASM_OBJ)' \
209 PERLASM_SCHEME='$(PERLASM_SCHEME)' \
210 THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES=
211# MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors,
212# which in turn eliminates ambiguities in variable treatment with -e.
213
214# BUILD_CMD is a generic macro to build a given target in a given
215# subdirectory. The target must be given through the shell variable
216# `target' and the subdirectory to build in must be given through `dir'.
217# This macro shouldn't be used directly, use RECURSIVE_BUILD_CMD or
218# BUILD_ONE_CMD instead.
219#
220# BUILD_ONE_CMD is a macro to build a given target in a given
221# subdirectory if that subdirectory is part of $(DIRS). It requires
222# exactly the same shell variables as BUILD_CMD.
223#
224# RECURSIVE_BUILD_CMD is a macro to build a given target in all
225# subdirectories defined in $(DIRS). It requires that the target
226# is given through the shell variable `target'.
227BUILD_CMD= if [ -d "$$dir" ]; then \
228 ( cd $$dir && echo "making $$target in $$dir..." && \
229 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. DIR=$$dir $$target \
230 ) || exit 1; \
231 fi
232RECURSIVE_BUILD_CMD=for dir in $(DIRS); do $(BUILD_CMD); done
233BUILD_ONE_CMD=\
234 if expr " $(DIRS) " : ".* $$dir " >/dev/null 2>&1; then \
235 $(BUILD_CMD); \
236 fi
237
238reflect:
239 @[ -n "$(THIS)" ] && $(CLEARENV) && $(MAKE) $(THIS) -e $(BUILDENV)
240
241sub_all: build_all
242build_all: build_libs build_apps build_tests build_tools
243
244build_libs: build_crypto build_ssl build_engines
245
246build_crypto:
247 @dir=crypto; target=all; $(BUILD_ONE_CMD)
248build_ssl:
249 @dir=ssl; target=all; $(BUILD_ONE_CMD)
250build_engines:
251 @dir=engines; target=all; $(BUILD_ONE_CMD)
252build_apps:
253 @dir=apps; target=all; $(BUILD_ONE_CMD)
254build_tests:
255 @dir=test; target=all; $(BUILD_ONE_CMD)
256build_tools:
257 @dir=tools; target=all; $(BUILD_ONE_CMD)
258
259all_testapps: build_libs build_testapps
260build_testapps:
261 @dir=crypto; target=testapps; $(BUILD_ONE_CMD)
262
263libcrypto$(SHLIB_EXT): libcrypto.a
264 @if [ "$(SHLIB_TARGET)" != "" ]; then \
265 $(MAKE) SHLIBDIRS=crypto build-shared; \
266 else \
267 echo "There's no support for shared libraries on this platform" >&2; \
268 exit 1; \
269 fi
270
271libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
272 @if [ "$(SHLIB_TARGET)" != "" ]; then \
273 $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
274 else \
275 echo "There's no support for shared libraries on this platform" >&2; \
276 exit 1; \
277 fi
278
279clean-shared:
280 @set -e; for i in $(SHLIBDIRS); do \
281 if [ -n "$(SHARED_LIBS_LINK_EXTS)" ]; then \
282 tmp="$(SHARED_LIBS_LINK_EXTS)"; \
283 for j in $${tmp:-x}; do \
284 ( set -x; rm -f lib$$i$$j ); \
285 done; \
286 fi; \
287 ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
288 if [ "$(PLATFORM)" = "Cygwin" ]; then \
289 ( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
290 fi; \
291 done
292
293link-shared:
294 @ set -e; for i in $(SHLIBDIRS); do \
295 $(MAKE) -f $(HERE)/Makefile.shared -e $(BUILDENV) \
296 LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
297 LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
298 symlink.$(SHLIB_TARGET); \
299 libs="$$libs -l$$i"; \
300 done
301
302build-shared: do_$(SHLIB_TARGET) link-shared
303
304do_$(SHLIB_TARGET):
305 @ set -e; libs='-L. $(SHLIBDEPS)'; for i in $(SHLIBDIRS); do \
306 if [ "$$i" = "ssl" -a -n "$(LIBKRB5)" ]; then \
307 libs="$(LIBKRB5) $$libs"; \
308 fi; \
309 $(CLEARENV) && $(MAKE) -f Makefile.shared -e $(BUILDENV) \
310 LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
311 LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
312 LIBDEPS="$$libs $(EX_LIBS)" \
313 link_a.$(SHLIB_TARGET); \
314 libs="-l$$i $$libs"; \
315 done
316
317libcrypto.pc: Makefile
318 @ ( echo 'prefix=$(INSTALLTOP)'; \
319 echo 'exec_prefix=$${prefix}'; \
320 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
321 echo 'includedir=$${prefix}/include'; \
322 echo ''; \
323 echo 'Name: OpenSSL-libcrypto'; \
324 echo 'Description: OpenSSL cryptography library'; \
325 echo 'Version: '$(VERSION); \
326 echo 'Requires: '; \
327 echo 'Libs: -L$${libdir} -lcrypto $(EX_LIBS)'; \
328 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
329
330libssl.pc: Makefile
331 @ ( echo 'prefix=$(INSTALLTOP)'; \
332 echo 'exec_prefix=$${prefix}'; \
333 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
334 echo 'includedir=$${prefix}/include'; \
335 echo ''; \
336 echo 'Name: OpenSSL'; \
337 echo 'Description: Secure Sockets Layer and cryptography libraries'; \
338 echo 'Version: '$(VERSION); \
339 echo 'Requires: '; \
340 echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
341 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
342
343openssl.pc: Makefile
344 @ ( echo 'prefix=$(INSTALLTOP)'; \
345 echo 'exec_prefix=$${prefix}'; \
346 echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
347 echo 'includedir=$${prefix}/include'; \
348 echo ''; \
349 echo 'Name: OpenSSL'; \
350 echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
351 echo 'Version: '$(VERSION); \
352 echo 'Requires: '; \
353 echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
354 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
355
356Makefile: Makefile.org Configure config
357 @echo "Makefile is older than Makefile.org, Configure or config."
358 @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please."
359 @false
360
361libclean:
362 rm -f *.map *.so *.so.* *.dll engines/*.so engines/*.dll *.a engines/*.a */lib */*/lib
363
364clean: libclean
365 rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
366 @set -e; target=clean; $(RECURSIVE_BUILD_CMD)
367 rm -f $(LIBS)
368 rm -f openssl.pc libssl.pc libcrypto.pc
369 rm -f speed.* .pure
370 rm -f $(TARFILE)
371 @set -e; for i in $(ONEDIRS) ;\
372 do \
373 rm -fr $$i/*; \
374 done
375
376makefile.one: files
377 $(PERL) util/mk1mf.pl >makefile.one; \
378 sh util/do_ms.sh
379
380files:
381 $(PERL) $(TOP)/util/files.pl Makefile > $(TOP)/MINFO
382 @set -e; target=files; $(RECURSIVE_BUILD_CMD)
383
384links:
385 @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
386 @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
387 @set -e; target=links; $(RECURSIVE_BUILD_CMD)
388
389gentests:
390 @(cd test && echo "generating dummy tests (if needed)..." && \
391 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on generate );
392
393dclean:
394 rm -rf *.bak include/openssl certs/.0
395 @set -e; target=dclean; $(RECURSIVE_BUILD_CMD)
396
397rehash: rehash.time
398rehash.time: certs apps
399 @if [ -z "$(CROSS_COMPILE)" ]; then \
400 (OPENSSL="`pwd`/util/opensslwrap.sh"; \
401 [ -x "apps/openssl.exe" ] && OPENSSL="apps/openssl.exe" || :; \
402 OPENSSL_DEBUG_MEMORY=on; \
403 export OPENSSL OPENSSL_DEBUG_MEMORY; \
404 $(PERL) tools/c_rehash certs) && \
405 touch rehash.time; \
406 else :; fi
407
408test: tests
409
410tests: rehash
411 @(cd test && echo "testing..." && \
412 $(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests );
413 OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a
414
415report:
416 @$(PERL) util/selftest.pl
417
418depend:
419 @set -e; target=depend; $(RECURSIVE_BUILD_CMD)
420
421lint:
422 @set -e; target=lint; $(RECURSIVE_BUILD_CMD)
423
424tags:
425 rm -f TAGS
426 find . -name '[^.]*.[ch]' | xargs etags -a
427
428errors:
429 $(PERL) util/mkerr.pl -recurse -write
430 (cd engines; $(MAKE) PERL=$(PERL) errors)
431 $(PERL) util/ck_errf.pl */*.c */*/*.c
432
433stacks:
434 $(PERL) util/mkstack.pl -write
435
436util/libeay.num::
437 $(PERL) util/mkdef.pl crypto update
438
439util/ssleay.num::
440 $(PERL) util/mkdef.pl ssl update
441
442crypto/objects/obj_dat.h: crypto/objects/obj_dat.pl crypto/objects/obj_mac.h
443 $(PERL) crypto/objects/obj_dat.pl crypto/objects/obj_mac.h crypto/objects/obj_dat.h
444crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num
445 $(PERL) crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h
446crypto/objects/obj_xref.h: crypto/objects/objxref.pl crypto/objects/obj_xref.txt crypto/objects/obj_mac.num
447 $(PERL) crypto/objects/objxref.pl crypto/objects/obj_mac.num crypto/objects/obj_xref.txt >crypto/objects/obj_xref.h
448
449apps/openssl-vms.cnf: apps/openssl.cnf
450 $(PERL) VMS/VMSify-conf.pl < apps/openssl.cnf > apps/openssl-vms.cnf
451
452crypto/bn/bn_prime.h: crypto/bn/bn_prime.pl
453 $(PERL) crypto/bn/bn_prime.pl >crypto/bn/bn_prime.h
454
455
456TABLE: Configure
457 (echo 'Output of `Configure TABLE'"':"; \
458 $(PERL) Configure TABLE) > TABLE
459
460update: errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h crypto/objects/obj_xref.h apps/openssl-vms.cnf crypto/bn/bn_prime.h TABLE depend
461
462# Build distribution tar-file. As the list of files returned by "find" is
463# pretty long, on several platforms a "too many arguments" error or similar
464# would occur. Therefore the list of files is temporarily stored into a file
465# and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
466# tar does not support the --files-from option.
467tar:
468 find . -type d -print | xargs chmod 755
469 find . -type f -print | xargs chmod a+r
470 find . -type f -perm -0100 -print | xargs chmod a+x
471 find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort > ../$(TARFILE).list; \
472 $(TAR) $(TARFLAGS) --files-from ../$(TARFILE).list -cvf - | \
473 tardy --user_number=0 --user_name=openssl \
474 --group_number=0 --group_name=openssl \
475 --prefix=openssl-$(VERSION) - |\
476 gzip --best >../$(TARFILE).gz; \
477 rm -f ../$(TARFILE).list; \
478 ls -l ../$(TARFILE).gz
479
480tar-snap:
481 @$(TAR) $(TARFLAGS) -cvf - \
482 `find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE \! -name '*.o' \! -name '*.a' \! -name '*.so' \! -name '*.so.*' \! -name 'openssl' \! -name '*test' \! -name '.#*' \! -name '*~' | sort` |\
483 tardy --user_number=0 --user_name=openssl \
484 --group_number=0 --group_name=openssl \
485 --prefix=openssl-$(VERSION) - > ../$(TARFILE);\
486 ls -l ../$(TARFILE)
487
488dist:
489 $(PERL) Configure dist
490 @$(MAKE) dist_pem_h
491 @$(MAKE) SDIRS='$(SDIRS)' clean
492 @$(MAKE) TAR='$(TAR)' TARFLAGS='$(TARFLAGS)' tar
493
494dist_pem_h:
495 (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean)
496
497install: all install_docs install_sw
498
499install_sw:
500 @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
501 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
502 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
503 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \
504 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
505 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
506 $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
507 $(INSTALL_PREFIX)$(OPENSSLDIR)/private
508 @set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\
509 do \
510 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
511 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
512 done;
513 @set -e; target=install; $(RECURSIVE_BUILD_CMD)
514 @set -e; for i in $(LIBS) ;\
515 do \
516 if [ -f "$$i" ]; then \
517 ( echo installing $$i; \
518 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
519 $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
520 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
521 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i ); \
522 fi; \
523 done;
524 @set -e; if [ -n "$(SHARED_LIBS)" ]; then \
525 tmp="$(SHARED_LIBS)"; \
526 for i in $${tmp:-x}; \
527 do \
528 if [ -f "$$i" -o -f "$$i.a" ]; then \
529 ( echo installing $$i; \
530 if [ "$(PLATFORM)" != "Cygwin" ]; then \
531 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
532 chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
533 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
534 else \
535 c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
536 cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
537 chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
538 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
539 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
540 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
541 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
542 fi ); \
543 if expr $(PLATFORM) : 'mingw' > /dev/null; then \
544 ( case $$i in \
545 *crypto*) i=libeay32.dll;; \
546 *ssl*) i=ssleay32.dll;; \
547 esac; \
548 echo installing $$i; \
549 cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
550 chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
551 mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
552 fi; \
553 fi; \
554 done; \
555 ( here="`pwd`"; \
556 cd $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR); \
557 $(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \
558 if [ "$(INSTALLTOP)" != "/usr" ]; then \
559 echo 'OpenSSL shared libraries have been installed in:'; \
560 echo ' $(INSTALLTOP)'; \
561 echo ''; \
562 sed -e '1,/^$$/d' doc/openssl-shared.txt; \
563 fi; \
564 fi
565 cp libcrypto.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
566 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
567 cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
568 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc
569 cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
570 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/openssl.pc
571
572install_html_docs:
573 here="`pwd`"; \
574 for subdir in apps crypto ssl; do \
575 mkdir -p $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
576 for i in doc/$$subdir/*.pod; do \
577 fn=`basename $$i .pod`; \
578 echo "installing html/$$fn.$(HTMLSUFFIX)"; \
579 cat $$i \
580 | sed -r 's/L<([^)]*)(\([0-9]\))?\|([^)]*)(\([0-9]\))?>/L<\1|\3>/g' \
581 | pod2html --podroot=doc --htmlroot=.. --podpath=apps:crypto:ssl \
582 | sed -r 's/<!DOCTYPE.*//g' \
583 > $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \
584 $(PERL) util/extract-names.pl < $$i | \
585 grep -v $$filecase "^$$fn\$$" | \
586 (cd $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
587 while read n; do \
588 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$(HTMLSUFFIX) "$$n".$(HTMLSUFFIX); \
589 done); \
590 done; \
591 done
592
593install_docs:
594 @$(PERL) $(TOP)/util/mkdir-p.pl \
595 $(INSTALL_PREFIX)$(MANDIR)/man1 \
596 $(INSTALL_PREFIX)$(MANDIR)/man3 \
597 $(INSTALL_PREFIX)$(MANDIR)/man5 \
598 $(INSTALL_PREFIX)$(MANDIR)/man7
599 @pod2man="`cd ./util; ./pod2mantest $(PERL)`"; \
600 here="`pwd`"; \
601 filecase=; \
602 if [ "$(PLATFORM)" = "DJGPP" -o "$(PLATFORM)" = "Cygwin" -o "$(PLATFORM)" = "mingw" ]; then \
603 filecase=-i; \
604 fi; \
605 set -e; for i in doc/apps/*.pod; do \
606 fn=`basename $$i .pod`; \
607 sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
608 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
609 (cd `$(PERL) util/dirname.pl $$i`; \
610 sh -c "$$pod2man \
611 --section=$$sec --center=OpenSSL \
612 --release=$(VERSION) `basename $$i`") \
613 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
614 $(PERL) util/extract-names.pl < $$i | \
615 (grep -v $$filecase "^$$fn\$$"; true) | \
616 (grep -v "[ ]"; true) | \
617 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
618 while read n; do \
619 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
620 done); \
621 done; \
622 set -e; for i in doc/crypto/*.pod doc/ssl/*.pod; do \
623 fn=`basename $$i .pod`; \
624 sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
625 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
626 (cd `$(PERL) util/dirname.pl $$i`; \
627 sh -c "$$pod2man \
628 --section=$$sec --center=OpenSSL \
629 --release=$(VERSION) `basename $$i`") \
630 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
631 $(PERL) util/extract-names.pl < $$i | \
632 (grep -v $$filecase "^$$fn\$$"; true) | \
633 (grep -v "[ ]"; true) | \
634 (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
635 while read n; do \
636 PLATFORM=$(PLATFORM) $$here/util/point.sh $$fn.$${sec}$(MANSUFFIX) "$$n".$${sec}$(MANSUFFIX); \
637 done); \
638 done
639
640# DO NOT DELETE THIS LINE -- make depend depends on it.
6410
=== removed file 'apps/CA.pl'
--- apps/CA.pl 2010-06-14 09:08:29 +0000
+++ apps/CA.pl 1970-01-01 00:00:00 +0000
@@ -1,189 +0,0 @@
1#!/usr/bin/perl
2#
3# CA - wrapper around ca to make it easier to use ... basically ca requires
4# some setup stuff to be done before you can use it and this makes
5# things easier between now and when Eric is convinced to fix it :-)
6#
7# CA -newca ... will setup the right stuff
8# CA -newreq[-nodes] ... will generate a certificate request
9# CA -sign ... will sign the generated request and output
10#
11# At the end of that grab newreq.pem and newcert.pem (one has the key
12# and the other the certificate) and cat them together and that is what
13# you want/need ... I'll make even this a little cleaner later.
14#
15#
16# 12-Jan-96 tjh Added more things ... including CA -signcert which
17# converts a certificate to a request and then signs it.
18# 10-Jan-96 eay Fixed a few more bugs and added the SSLEAY_CONFIG
19# environment variable so this can be driven from
20# a script.
21# 25-Jul-96 eay Cleaned up filenames some more.
22# 11-Jun-96 eay Fixed a few filename missmatches.
23# 03-May-96 eay Modified to use 'ssleay cmd' instead of 'cmd'.
24# 18-Apr-96 tjh Original hacking
25#
26# Tim Hudson
27# tjh@cryptsoft.com
28#
29
30# 27-Apr-98 snh Translation into perl, fix existing CA bug.
31#
32#
33# Steve Henson
34# shenson@bigfoot.com
35
36# default openssl.cnf file has setup as per the following
37# demoCA ... where everything is stored
38
39my $openssl;
40if(defined $ENV{OPENSSL}) {
41 $openssl = $ENV{OPENSSL};
42} else {
43 $openssl = "openssl";
44 $ENV{OPENSSL} = $openssl;
45}
46
47$SSLEAY_CONFIG=$ENV{"SSLEAY_CONFIG"};
48$DAYS="-days 365"; # 1 year
49$CADAYS="-days 1095"; # 3 years
50$REQ="$openssl req $SSLEAY_CONFIG";
51$CA="$openssl ca $SSLEAY_CONFIG";
52$VERIFY="$openssl verify";
53$X509="$openssl x509";
54$PKCS12="$openssl pkcs12";
55
56$CATOP="./demoCA";
57$CAKEY="cakey.pem";
58$CAREQ="careq.pem";
59$CACERT="cacert.pem";
60
61$DIRMODE = 0777;
62
63$RET = 0;
64
65foreach (@ARGV) {
66 if ( /^(-\?|-h|-help)$/ ) {
67 print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
68 exit 0;
69 } elsif (/^-newcert$/) {
70 # create a certificate
71 system ("$REQ -new -x509 -keyout newkey.pem -out newcert.pem $DAYS");
72 $RET=$?;
73 print "Certificate is in newcert.pem, private key is in newkey.pem\n"
74 } elsif (/^-newreq$/) {
75 # create a certificate request
76 system ("$REQ -new -keyout newkey.pem -out newreq.pem $DAYS");
77 $RET=$?;
78 print "Request is in newreq.pem, private key is in newkey.pem\n";
79 } elsif (/^-newreq-nodes$/) {
80 # create a certificate request
81 system ("$REQ -new -nodes -keyout newkey.pem -out newreq.pem $DAYS");
82 $RET=$?;
83 print "Request is in newreq.pem, private key is in newkey.pem\n";
84 } elsif (/^-newca$/) {
85 # if explicitly asked for or it doesn't exist then setup the
86 # directory structure that Eric likes to manage things
87 $NEW="1";
88 if ( "$NEW" || ! -f "${CATOP}/serial" ) {
89 # create the directory hierarchy
90 mkdir $CATOP, $DIRMODE;
91 mkdir "${CATOP}/certs", $DIRMODE;
92 mkdir "${CATOP}/crl", $DIRMODE ;
93 mkdir "${CATOP}/newcerts", $DIRMODE;
94 mkdir "${CATOP}/private", $DIRMODE;
95 open OUT, ">${CATOP}/index.txt";
96 close OUT;
97 open OUT, ">${CATOP}/crlnumber";
98 print OUT "01\n";
99 close OUT;
100 }
101 if ( ! -f "${CATOP}/private/$CAKEY" ) {
102 print "CA certificate filename (or enter to create)\n";
103 $FILE = <STDIN>;
104
105 chop $FILE;
106
107 # ask user for existing CA certificate
108 if ($FILE) {
109 cp_pem($FILE,"${CATOP}/private/$CAKEY", "PRIVATE");
110 cp_pem($FILE,"${CATOP}/$CACERT", "CERTIFICATE");
111 $RET=$?;
112 } else {
113 print "Making CA certificate ...\n";
114 system ("$REQ -new -keyout " .
115 "${CATOP}/private/$CAKEY -out ${CATOP}/$CAREQ");
116 system ("$CA -create_serial " .
117 "-out ${CATOP}/$CACERT $CADAYS -batch " .
118 "-keyfile ${CATOP}/private/$CAKEY -selfsign " .
119 "-extensions v3_ca " .
120 "-infiles ${CATOP}/$CAREQ ");
121 $RET=$?;
122 }
123 }
124 } elsif (/^-pkcs12$/) {
125 my $cname = $ARGV[1];
126 $cname = "My Certificate" unless defined $cname;
127 system ("$PKCS12 -in newcert.pem -inkey newkey.pem " .
128 "-certfile ${CATOP}/$CACERT -out newcert.p12 " .
129 "-export -name \"$cname\"");
130 $RET=$?;
131 print "PKCS #12 file is in newcert.p12\n";
132 exit $RET;
133 } elsif (/^-xsign$/) {
134 system ("$CA -policy policy_anything -infiles newreq.pem");
135 $RET=$?;
136 } elsif (/^(-sign|-signreq)$/) {
137 system ("$CA -policy policy_anything -out newcert.pem " .
138 "-infiles newreq.pem");
139 $RET=$?;
140 print "Signed certificate is in newcert.pem\n";
141 } elsif (/^(-signCA)$/) {
142 system ("$CA -policy policy_anything -out newcert.pem " .
143 "-extensions v3_ca -infiles newreq.pem");
144 $RET=$?;
145 print "Signed CA certificate is in newcert.pem\n";
146 } elsif (/^-signcert$/) {
147 system ("$X509 -x509toreq -in newreq.pem -signkey newreq.pem " .
148 "-out tmp.pem");
149 system ("$CA -policy policy_anything -out newcert.pem " .
150 "-infiles tmp.pem");
151 $RET = $?;
152 print "Signed certificate is in newcert.pem\n";
153 } elsif (/^-verify$/) {
154 if (shift) {
155 foreach $j (@ARGV) {
156 system ("$VERIFY -CAfile $CATOP/$CACERT $j");
157 $RET=$? if ($? != 0);
158 }
159 exit $RET;
160 } else {
161 system ("$VERIFY -CAfile $CATOP/$CACERT newcert.pem");
162 $RET=$?;
163 exit 0;
164 }
165 } else {
166 print STDERR "Unknown arg $_\n";
167 print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
168 exit 1;
169 }
170}
171
172exit $RET;
173
174sub cp_pem {
175my ($infile, $outfile, $bound) = @_;
176open IN, $infile;
177open OUT, ">$outfile";
178my $flag = 0;
179while (<IN>) {
180 $flag = 1 if (/^-----BEGIN.*$bound/) ;
181 print OUT $_ if ($flag);
182 if (/^-----END.*$bound/) {
183 close IN;
184 close OUT;
185 return;
186 }
187}
188}
189
1900
=== removed file 'crypto/opensslconf.h'
--- crypto/opensslconf.h 2011-05-01 23:51:53 +0000
+++ crypto/opensslconf.h 1970-01-01 00:00:00 +0000
@@ -1,217 +0,0 @@
1/* opensslconf.h */
2/* WARNING: Generated automatically from opensslconf.h.in by Configure. */
3
4/* OpenSSL was configured with the following options: */
5#ifndef OPENSSL_DOING_MAKEDEPEND
6
7
8#ifndef OPENSSL_NO_GMP
9# define OPENSSL_NO_GMP
10#endif
11#ifndef OPENSSL_NO_JPAKE
12# define OPENSSL_NO_JPAKE
13#endif
14#ifndef OPENSSL_NO_KRB5
15# define OPENSSL_NO_KRB5
16#endif
17#ifndef OPENSSL_NO_MD2
18# define OPENSSL_NO_MD2
19#endif
20#ifndef OPENSSL_NO_RC5
21# define OPENSSL_NO_RC5
22#endif
23#ifndef OPENSSL_NO_RFC3779
24# define OPENSSL_NO_RFC3779
25#endif
26#ifndef OPENSSL_NO_STORE
27# define OPENSSL_NO_STORE
28#endif
29
30#endif /* OPENSSL_DOING_MAKEDEPEND */
31
32#ifndef OPENSSL_NO_DYNAMIC_ENGINE
33# define OPENSSL_NO_DYNAMIC_ENGINE
34#endif
35
36/* The OPENSSL_NO_* macros are also defined as NO_* if the application
37 asks for it. This is a transient feature that is provided for those
38 who haven't had the time to do the appropriate changes in their
39 applications. */
40#ifdef OPENSSL_ALGORITHM_DEFINES
41# if defined(OPENSSL_NO_GMP) && !defined(NO_GMP)
42# define NO_GMP
43# endif
44# if defined(OPENSSL_NO_JPAKE) && !defined(NO_JPAKE)
45# define NO_JPAKE
46# endif
47# if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5)
48# define NO_KRB5
49# endif
50# if defined(OPENSSL_NO_MD2) && !defined(NO_MD2)
51# define NO_MD2
52# endif
53# if defined(OPENSSL_NO_RC5) && !defined(NO_RC5)
54# define NO_RC5
55# endif
56# if defined(OPENSSL_NO_RFC3779) && !defined(NO_RFC3779)
57# define NO_RFC3779
58# endif
59# if defined(OPENSSL_NO_STORE) && !defined(NO_STORE)
60# define NO_STORE
61# endif
62#endif
63
64/* crypto/opensslconf.h.in */
65
66/* Generate 80386 code? */
67#undef I386_ONLY
68
69#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
70#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
71#define ENGINESDIR "/usr/local/ssl/lib/engines"
72#define OPENSSLDIR "/usr/local/ssl"
73#endif
74#endif
75
76#undef OPENSSL_UNISTD
77#define OPENSSL_UNISTD <unistd.h>
78
79#undef OPENSSL_EXPORT_VAR_AS_FUNCTION
80
81#if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
82#define IDEA_INT unsigned int
83#endif
84
85#if defined(HEADER_MD2_H) && !defined(MD2_INT)
86#define MD2_INT unsigned int
87#endif
88
89#if defined(HEADER_RC2_H) && !defined(RC2_INT)
90/* I need to put in a mod for the alpha - eay */
91#define RC2_INT unsigned int
92#endif
93
94#if defined(HEADER_RC4_H)
95#if !defined(RC4_INT)
96/* using int types make the structure larger but make the code faster
97 * on most boxes I have tested - up to %20 faster. */
98/*
99 * I don't know what does "most" mean, but declaring "int" is a must on:
100 * - Intel P6 because partial register stalls are very expensive;
101 * - elder Alpha because it lacks byte load/store instructions;
102 */
103#define RC4_INT unsigned int
104#endif
105#if !defined(RC4_CHUNK)
106/*
107 * This enables code handling data aligned at natural CPU word
108 * boundary. See crypto/rc4/rc4_enc.c for further details.
109 */
110#undef RC4_CHUNK
111#endif
112#endif
113
114#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG)
115/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
116 * %20 speed up (longs are 8 bytes, int's are 4). */
117#ifndef DES_LONG
118#define DES_LONG unsigned long
119#endif
120#endif
121
122#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
123#define CONFIG_HEADER_BN_H
124#undef BN_LLONG
125
126/* Should we define BN_DIV2W here? */
127
128/* Only one for the following should be defined */
129#undef SIXTY_FOUR_BIT_LONG
130#undef SIXTY_FOUR_BIT
131#define THIRTY_TWO_BIT
132#endif
133
134#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
135#define CONFIG_HEADER_RC4_LOCL_H
136/* if this is defined data[i] is used instead of *data, this is a %20
137 * speedup on x86 */
138#undef RC4_INDEX
139#endif
140
141#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
142#define CONFIG_HEADER_BF_LOCL_H
143#undef BF_PTR
144#endif /* HEADER_BF_LOCL_H */
145
146#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
147#define CONFIG_HEADER_DES_LOCL_H
148#ifndef DES_DEFAULT_OPTIONS
149/* the following is tweaked from a config script, that is why it is a
150 * protected undef/define */
151#ifndef DES_PTR
152#undef DES_PTR
153#endif
154
155/* This helps C compiler generate the correct code for multiple functional
156 * units. It reduces register dependancies at the expense of 2 more
157 * registers */
158#ifndef DES_RISC1
159#undef DES_RISC1
160#endif
161
162#ifndef DES_RISC2
163#undef DES_RISC2
164#endif
165
166#if defined(DES_RISC1) && defined(DES_RISC2)
167YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
168#endif
169
170/* Unroll the inner loop, this sometimes helps, sometimes hinders.
171 * Very mucy CPU dependant */
172#ifndef DES_UNROLL
173#undef DES_UNROLL
174#endif
175
176/* These default values were supplied by
177 * Peter Gutman <pgut001@cs.auckland.ac.nz>
178 * They are only used if nothing else has been defined */
179#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL)
180/* Special defines which change the way the code is built depending on the
181 CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find
182 even newer MIPS CPU's, but at the moment one size fits all for
183 optimization options. Older Sparc's work better with only UNROLL, but
184 there's no way to tell at compile time what it is you're running on */
185
186#if defined( sun ) /* Newer Sparc's */
187# define DES_PTR
188# define DES_RISC1
189# define DES_UNROLL
190#elif defined( __ultrix ) /* Older MIPS */
191# define DES_PTR
192# define DES_RISC2
193# define DES_UNROLL
194#elif defined( __osf1__ ) /* Alpha */
195# define DES_PTR
196# define DES_RISC2
197#elif defined ( _AIX ) /* RS6000 */
198 /* Unknown */
199#elif defined( __hpux ) /* HP-PA */
200 /* Unknown */
201#elif defined( __aux ) /* 68K */
202 /* Unknown */
203#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */
204# define DES_UNROLL
205#elif defined( __sgi ) /* Newer MIPS */
206# define DES_PTR
207# define DES_RISC2
208# define DES_UNROLL
209#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */
210# define DES_PTR
211# define DES_RISC1
212# define DES_UNROLL
213#endif /* Systems-specific speed defines */
214#endif
215
216#endif /* DES_DEFAULT_OPTIONS */
217#endif /* HEADER_DES_LOCL_H */
2180
=== removed file 'tools/c_rehash'
--- tools/c_rehash 2010-12-12 15:37:21 +0000
+++ tools/c_rehash 1970-01-01 00:00:00 +0000
@@ -1,180 +0,0 @@
1#!/usr/bin/perl
2
3
4# Perl c_rehash script, scan all files in a directory
5# and add symbolic links to their hash values.
6
7my $openssl;
8
9my $dir = "/usr/local/ssl";
10my $prefix = "/usr/local/ssl";
11
12if(defined $ENV{OPENSSL}) {
13 $openssl = $ENV{OPENSSL};
14} else {
15 $openssl = "openssl";
16 $ENV{OPENSSL} = $openssl;
17}
18
19my $pwd;
20eval "require Cwd";
21if (defined(&Cwd::getcwd)) {
22 $pwd=Cwd::getcwd();
23} else {
24 $pwd=`pwd`; chomp($pwd);
25}
26my $path_delim = ($pwd =~ /^[a-z]\:/i) ? ';' : ':'; # DOS/Win32 or Unix delimiter?
27
28$ENV{PATH} = "$prefix/bin" . ($ENV{PATH} ? $path_delim . $ENV{PATH} : ""); # prefix our path
29
30if(! -x $openssl) {
31 my $found = 0;
32 foreach (split /$path_delim/, $ENV{PATH}) {
33 if(-x "$_/$openssl") {
34 $found = 1;
35 $openssl = "$_/$openssl";
36 last;
37 }
38 }
39 if($found == 0) {
40 print STDERR "c_rehash: rehashing skipped ('openssl' program not available)\n";
41 exit 0;
42 }
43}
44
45if(@ARGV) {
46 @dirlist = @ARGV;
47} elsif($ENV{SSL_CERT_DIR}) {
48 @dirlist = split /$path_delim/, $ENV{SSL_CERT_DIR};
49} else {
50 $dirlist[0] = "$dir/certs";
51}
52
53if (-d $dirlist[0]) {
54 chdir $dirlist[0];
55 $openssl="$pwd/$openssl" if (!-x $openssl);
56 chdir $pwd;
57}
58
59foreach (@dirlist) {
60 if(-d $_ and -w $_) {
61 hash_dir($_);
62 }
63}
64
65sub hash_dir {
66 my %hashlist;
67 print "Doing $_[0]\n";
68 chdir $_[0];
69 opendir(DIR, ".");
70 my @flist = readdir(DIR);
71 # Delete any existing symbolic links
72 foreach (grep {/^[\da-f]+\.r{0,1}\d+$/} @flist) {
73 if(-l $_) {
74 unlink $_;
75 }
76 }
77 closedir DIR;
78 FILE: foreach $fname (grep {/\.pem$/} @flist) {
79 # Check to see if certificates and/or CRLs present.
80 my ($cert, $crl) = check_file($fname);
81 if(!$cert && !$crl) {
82 print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
83 next;
84 }
85 link_hash_cert($fname) if($cert);
86 link_hash_crl($fname) if($crl);
87 }
88}
89
90sub check_file {
91 my ($is_cert, $is_crl) = (0,0);
92 my $fname = $_[0];
93 open IN, $fname;
94 while(<IN>) {
95 if(/^-----BEGIN (.*)-----/) {
96 my $hdr = $1;
97 if($hdr =~ /^(X509 |TRUSTED |)CERTIFICATE$/) {
98 $is_cert = 1;
99 last if($is_crl);
100 } elsif($hdr eq "X509 CRL") {
101 $is_crl = 1;
102 last if($is_cert);
103 }
104 }
105 }
106 close IN;
107 return ($is_cert, $is_crl);
108}
109
110
111# Link a certificate to its subject name hash value, each hash is of
112# the form <hash>.<n> where n is an integer. If the hash value already exists
113# then we need to up the value of n, unless its a duplicate in which
114# case we skip the link. We check for duplicates by comparing the
115# certificate fingerprints
116
117sub link_hash_cert {
118 my $fname = $_[0];
119 $fname =~ s/'/'\\''/g;
120 my ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in "$fname"`;
121 chomp $hash;
122 chomp $fprint;
123 $fprint =~ s/^.*=//;
124 $fprint =~ tr/://d;
125 my $suffix = 0;
126 # Search for an unused hash filename
127 while(exists $hashlist{"$hash.$suffix"}) {
128 # Hash matches: if fingerprint matches its a duplicate cert
129 if($hashlist{"$hash.$suffix"} eq $fprint) {
130 print STDERR "WARNING: Skipping duplicate certificate $fname\n";
131 return;
132 }
133 $suffix++;
134 }
135 $hash .= ".$suffix";
136 print "$fname => $hash\n";
137 $symlink_exists=eval {symlink("",""); 1};
138 if ($symlink_exists) {
139 symlink $fname, $hash;
140 } else {
141 open IN,"<$fname" or die "can't open $fname for read";
142 open OUT,">$hash" or die "can't open $hash for write";
143 print OUT <IN>; # does the job for small text files
144 close OUT;
145 close IN;
146 }
147 $hashlist{$hash} = $fprint;
148}
149
150# Same as above except for a CRL. CRL links are of the form <hash>.r<n>
151
152sub link_hash_crl {
153 my $fname = $_[0];
154 $fname =~ s/'/'\\''/g;
155 my ($hash, $fprint) = `"$openssl" crl -hash -fingerprint -noout -in '$fname'`;
156 chomp $hash;
157 chomp $fprint;
158 $fprint =~ s/^.*=//;
159 $fprint =~ tr/://d;
160 my $suffix = 0;
161 # Search for an unused hash filename
162 while(exists $hashlist{"$hash.r$suffix"}) {
163 # Hash matches: if fingerprint matches its a duplicate cert
164 if($hashlist{"$hash.r$suffix"} eq $fprint) {
165 print STDERR "WARNING: Skipping duplicate CRL $fname\n";
166 return;
167 }
168 $suffix++;
169 }
170 $hash .= ".r$suffix";
171 print "$fname => $hash\n";
172 $symlink_exists=eval {symlink("",""); 1};
173 if ($symlink_exists) {
174 symlink $fname, $hash;
175 } else {
176 system ("cp", $fname, $hash);
177 }
178 $hashlist{$hash} = $fprint;
179}
180

Subscribers

People subscribed via source and target branches

to all changes: