diff -urN certbundle-1.0-old/Makefile certbundle-1.0-rh61/Makefile --- certbundle-1.0-old/Makefile Sat Sep 5 13:21:00 1998 +++ certbundle-1.0-rh61/Makefile Sat Nov 20 05:56:27 1999 @@ -5,8 +5,14 @@ V=1.0 -SSLEAY_INC=/sw/pkg/ssleay/include -SSLEAY_LIB=/sw/pkg/ssleay/lib +# You should change the following, `include directories` for OpenSSL +# and the library for DBM (IMPORTANT: You need DBM 1.x support, +# otherwise you will not be able to read cert7.db) +OPENSSL_INC=/usr/local/ssl/include +OPENSSL_LIB=/usr/local/ssl/lib +LIBS=-ldb1 -lcrypto + +# Should not need to change anything down here CC=cc CFLAGS=-pipe -O -g -ggdb3 -Wall -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline @@ -17,17 +23,20 @@ extract: cert_extract ./cert_extract cert7.db ./cert_bundle cert7.db cert.index ca-cert-bundle.pem + @echo + @echo The unbundled CA keys are in ca-cert-bundle.pem cert_extract.o: cert_extract.c - $(CC) $(CFLAGS) -I$(SSLEAY_INC) -ocert_extract.o -c cert_extract.c + $(CC) $(CFLAGS) -I$(OPENSSL_INC) -ocert_extract.o -c cert_extract.c cert_extract: cert_extract.o - $(CC) $(LDFLAGS) -ocert_extract cert_extract.o -L$(SSLEAY_LIB) -lcrypto -ldb + $(CC) $(LDFLAGS) -ocert_extract cert_extract.o -L$(OPENSSL_LIB) $(LIBS) clean: -rm -f cert_extract.o -rm -f cert_extract -rm -f core *.core + -rm -f *.pem *.der *.index distclean: clean -rm -f cert.*.der cert.index diff -urN certbundle-1.0-old/README certbundle-1.0-rh61/README --- certbundle-1.0-old/README Sat Sep 5 13:10:15 1998 +++ certbundle-1.0-rh61/README Sat Nov 20 06:01:30 1999 @@ -10,3 +10,20 @@ Ralf S. Engelschall rse@engelschall.com www.engelschall.com + + +PORTING DETAILS +by Simos Xenitellis + +This program has been modified to compile with RedHat 6.1. +It will possibly compile with other modern variants of Linux. +In case of errors, edit the Makefile and cert_extract.c. +The sections that may need to be customised are denoted. + +Copy your browsers' cert7.db to the working directory of this application +with + cp ~/.netscape/cert7.db . + +To run, type + + make diff -urN certbundle-1.0-old/cert_bundle certbundle-1.0-rh61/cert_bundle --- certbundle-1.0-old/cert_bundle Sat Sep 5 13:19:43 1998 +++ certbundle-1.0-rh61/cert_bundle Sat Nov 20 05:46:43 1999 @@ -36,7 +36,7 @@ foreach $cert (sort(keys(%CERT))) { $file = $CERT{$cert}; print STDERR "Bundling: $cert ($file)\n"; - $text = `ssleay x509 -in $file -inform DER -noout -text`; + $text = `openssl x509 -in $file -inform DER -noout -text`; $text =~ s|\n$||; $text =~ s|^Certificate:|Certificate Ingredients:|; $md5 = `ssleay x509 -in $file -inform DER -fingerprint -noout`; diff -urN certbundle-1.0-old/cert_extract.c certbundle-1.0-rh61/cert_extract.c --- certbundle-1.0-old/cert_extract.c Sat Sep 5 12:44:05 1998 +++ certbundle-1.0-rh61/cert_extract.c Sat Nov 20 05:53:47 1999 @@ -22,10 +22,16 @@ #include #include -#include +/* Most likely, you will need to change the following two sections */ -#include "asn1.h" -#include "x509.h" +/* Location of the DBM 1.75 header files */ +#include + +/* Location of the OpenSSL header files */ +#include +#include + +/* You may not need to change anything below here */ int findoffset(char *dbname); .