diff options
Diffstat (limited to 'src/lib/libcrypto/objects')
| -rw-r--r-- | src/lib/libcrypto/objects/Makefile | 130 | ||||
| -rw-r--r-- | src/lib/libcrypto/objects/o_names.c | 2 | ||||
| -rw-r--r-- | src/lib/libcrypto/objects/objects.pl | 13 |
3 files changed, 138 insertions, 7 deletions
diff --git a/src/lib/libcrypto/objects/Makefile b/src/lib/libcrypto/objects/Makefile new file mode 100644 index 0000000000..a8aedbd422 --- /dev/null +++ b/src/lib/libcrypto/objects/Makefile | |||
| @@ -0,0 +1,130 @@ | |||
| 1 | # | ||
| 2 | # OpenSSL/crypto/objects/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= objects | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= -I.. -I$(TOP) -I../../include | ||
| 9 | CFLAG=-g | ||
| 10 | MAKEFILE= Makefile | ||
| 11 | AR= ar r | ||
| 12 | PERL= perl | ||
| 13 | |||
| 14 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 15 | |||
| 16 | GENERAL=Makefile README | ||
| 17 | TEST= | ||
| 18 | APPS= | ||
| 19 | |||
| 20 | LIB=$(TOP)/libcrypto.a | ||
| 21 | LIBSRC= o_names.c obj_dat.c obj_lib.c obj_err.c obj_xref.c | ||
| 22 | LIBOBJ= o_names.o obj_dat.o obj_lib.o obj_err.o obj_xref.o | ||
| 23 | |||
| 24 | SRC= $(LIBSRC) | ||
| 25 | |||
| 26 | EXHEADER= objects.h obj_mac.h | ||
| 27 | HEADER= $(EXHEADER) obj_dat.h obj_xref.h | ||
| 28 | |||
| 29 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 30 | |||
| 31 | top: | ||
| 32 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 33 | |||
| 34 | all: obj_dat.h obj_xref.h lib | ||
| 35 | |||
| 36 | lib: $(LIBOBJ) | ||
| 37 | $(AR) $(LIB) $(LIBOBJ) | ||
| 38 | $(RANLIB) $(LIB) || echo Never mind. | ||
| 39 | @touch lib | ||
| 40 | |||
| 41 | obj_dat.h: obj_dat.pl obj_mac.h | ||
| 42 | $(PERL) obj_dat.pl obj_mac.h obj_dat.h | ||
| 43 | |||
| 44 | # objects.pl both reads and writes obj_mac.num | ||
| 45 | obj_mac.h: objects.pl objects.txt obj_mac.num | ||
| 46 | $(PERL) objects.pl objects.txt obj_mac.num obj_mac.h | ||
| 47 | @sleep 1; touch obj_mac.h; sleep 1 | ||
| 48 | |||
| 49 | obj_xref.h: objxref.pl obj_xref.txt obj_mac.num | ||
| 50 | $(PERL) objxref.pl obj_mac.num obj_xref.txt > obj_xref.h | ||
| 51 | @sleep 1; touch obj_xref.h; sleep 1 | ||
| 52 | |||
| 53 | files: | ||
| 54 | $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO | ||
| 55 | |||
| 56 | links: | ||
| 57 | @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) | ||
| 58 | @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) | ||
| 59 | @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) | ||
| 60 | |||
| 61 | install: | ||
| 62 | @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile... | ||
| 63 | @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ | ||
| 64 | do \ | ||
| 65 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ | ||
| 66 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ | ||
| 67 | done; | ||
| 68 | |||
| 69 | tags: | ||
| 70 | ctags $(SRC) | ||
| 71 | |||
| 72 | tests: | ||
| 73 | |||
| 74 | lint: | ||
| 75 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 76 | |||
| 77 | depend: | ||
| 78 | @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile... | ||
| 79 | $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) | ||
| 80 | |||
| 81 | dclean: | ||
| 82 | $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 83 | mv -f Makefile.new $(MAKEFILE) | ||
| 84 | |||
| 85 | clean: | ||
| 86 | rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 87 | |||
| 88 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
| 89 | |||
| 90 | o_names.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 91 | o_names.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
| 92 | o_names.o: ../../include/openssl/err.h ../../include/openssl/lhash.h | ||
| 93 | o_names.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 94 | o_names.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 95 | o_names.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h | ||
| 96 | o_names.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 97 | o_names.o: o_names.c | ||
| 98 | obj_dat.o: ../../e_os.h ../../include/openssl/asn1.h | ||
| 99 | obj_dat.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | ||
| 100 | obj_dat.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 101 | obj_dat.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 102 | obj_dat.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 103 | obj_dat.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 104 | obj_dat.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 105 | obj_dat.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 106 | obj_dat.o: ../../include/openssl/symhacks.h ../cryptlib.h obj_dat.c obj_dat.h | ||
| 107 | obj_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 108 | obj_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
| 109 | obj_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h | ||
| 110 | obj_err.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 111 | obj_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 112 | obj_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h | ||
| 113 | obj_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 114 | obj_err.o: obj_err.c | ||
| 115 | obj_lib.o: ../../e_os.h ../../include/openssl/asn1.h | ||
| 116 | obj_lib.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
| 117 | obj_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
| 118 | obj_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h | ||
| 119 | obj_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 120 | obj_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 121 | obj_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h | ||
| 122 | obj_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 123 | obj_lib.o: ../cryptlib.h obj_lib.c | ||
| 124 | obj_xref.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 125 | obj_xref.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
| 126 | obj_xref.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 127 | obj_xref.o: ../../include/openssl/opensslconf.h | ||
| 128 | obj_xref.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 129 | obj_xref.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 130 | obj_xref.o: ../../include/openssl/symhacks.h obj_xref.c obj_xref.h | ||
diff --git a/src/lib/libcrypto/objects/o_names.c b/src/lib/libcrypto/objects/o_names.c index 4a548c2ed4..84380a96a9 100644 --- a/src/lib/libcrypto/objects/o_names.c +++ b/src/lib/libcrypto/objects/o_names.c | |||
| @@ -73,7 +73,7 @@ int OBJ_NAME_new_index(unsigned long (*hash_func)(const char *), | |||
| 73 | name_funcs_stack=sk_NAME_FUNCS_new_null(); | 73 | name_funcs_stack=sk_NAME_FUNCS_new_null(); |
| 74 | MemCheck_on(); | 74 | MemCheck_on(); |
| 75 | } | 75 | } |
| 76 | if (name_funcs_stack == NULL) | 76 | if ((name_funcs_stack == NULL)) |
| 77 | { | 77 | { |
| 78 | /* ERROR */ | 78 | /* ERROR */ |
| 79 | return(0); | 79 | return(0); |
diff --git a/src/lib/libcrypto/objects/objects.pl b/src/lib/libcrypto/objects/objects.pl index 15c00bbd52..d2bf659d88 100644 --- a/src/lib/libcrypto/objects/objects.pl +++ b/src/lib/libcrypto/objects/objects.pl | |||
| @@ -110,12 +110,13 @@ print STDERR "Added OID $Cname\n"; | |||
| 110 | } | 110 | } |
| 111 | close IN; | 111 | close IN; |
| 112 | 112 | ||
| 113 | open (NUMOUT,">$ARGV[1]") || die "Can't open output file $ARGV[1]"; | 113 | #XXX don't modify input files |
| 114 | foreach (sort { $a <=> $b } keys %nidn) | 114 | #open (NUMOUT,">$ARGV[1]") || die "Can't open output file $ARGV[1]"; |
| 115 | { | 115 | #foreach (sort { $a <=> $b } keys %nidn) |
| 116 | print NUMOUT $nidn{$_},"\t\t",$_,"\n"; | 116 | # { |
| 117 | } | 117 | # print NUMOUT $nidn{$_},"\t\t",$_,"\n"; |
| 118 | close NUMOUT; | 118 | # } |
| 119 | #close NUMOUT; | ||
| 119 | 120 | ||
| 120 | open (OUT,">$ARGV[2]") || die "Can't open output file $ARGV[2]"; | 121 | open (OUT,">$ARGV[2]") || die "Can't open output file $ARGV[2]"; |
| 121 | print OUT <<'EOF'; | 122 | print OUT <<'EOF'; |
