diff options
Diffstat (limited to 'src/lib/libcrypto/conf')
| -rw-r--r-- | src/lib/libcrypto/conf/Makefile | 152 | ||||
| -rw-r--r-- | src/lib/libcrypto/conf/cnf_save.c | 106 | ||||
| -rw-r--r-- | src/lib/libcrypto/conf/conf_mall.c | 1 | ||||
| -rw-r--r-- | src/lib/libcrypto/conf/test.c | 98 |
4 files changed, 356 insertions, 1 deletions
diff --git a/src/lib/libcrypto/conf/Makefile b/src/lib/libcrypto/conf/Makefile new file mode 100644 index 0000000000..78bb324106 --- /dev/null +++ b/src/lib/libcrypto/conf/Makefile | |||
| @@ -0,0 +1,152 @@ | |||
| 1 | # | ||
| 2 | # OpenSSL/crypto/conf/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= conf | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= -I.. -I$(TOP) -I../../include | ||
| 9 | CFLAG=-g | ||
| 10 | MAKEFILE= Makefile | ||
| 11 | AR= ar r | ||
| 12 | |||
| 13 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 14 | |||
| 15 | GENERAL=Makefile | ||
| 16 | TEST= | ||
| 17 | APPS= | ||
| 18 | |||
| 19 | LIB=$(TOP)/libcrypto.a | ||
| 20 | LIBSRC= conf_err.c conf_lib.c conf_api.c conf_def.c conf_mod.c \ | ||
| 21 | conf_mall.c conf_sap.c | ||
| 22 | |||
| 23 | LIBOBJ= conf_err.o conf_lib.o conf_api.o conf_def.o conf_mod.o \ | ||
| 24 | conf_mall.o conf_sap.o | ||
| 25 | |||
| 26 | SRC= $(LIBSRC) | ||
| 27 | |||
| 28 | EXHEADER= conf.h conf_api.h | ||
| 29 | HEADER= conf_def.h $(EXHEADER) | ||
| 30 | |||
| 31 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 32 | |||
| 33 | top: | ||
| 34 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 35 | |||
| 36 | all: lib | ||
| 37 | |||
| 38 | lib: $(LIBOBJ) | ||
| 39 | $(AR) $(LIB) $(LIBOBJ) | ||
| 40 | $(RANLIB) $(LIB) || echo Never mind. | ||
| 41 | @touch lib | ||
| 42 | |||
| 43 | files: | ||
| 44 | $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO | ||
| 45 | |||
| 46 | links: | ||
| 47 | @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) | ||
| 48 | @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) | ||
| 49 | @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) | ||
| 50 | |||
| 51 | install: | ||
| 52 | @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile... | ||
| 53 | @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ | ||
| 54 | do \ | ||
| 55 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ | ||
| 56 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ | ||
| 57 | done; | ||
| 58 | |||
| 59 | tags: | ||
| 60 | ctags $(SRC) | ||
| 61 | |||
| 62 | tests: | ||
| 63 | |||
| 64 | lint: | ||
| 65 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 66 | |||
| 67 | depend: | ||
| 68 | @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile... | ||
| 69 | $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(LIBSRC) | ||
| 70 | |||
| 71 | dclean: | ||
| 72 | $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 73 | mv -f Makefile.new $(MAKEFILE) | ||
| 74 | |||
| 75 | clean: | ||
| 76 | rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 77 | |||
| 78 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
| 79 | |||
| 80 | conf_api.o: ../../e_os.h ../../include/openssl/bio.h | ||
| 81 | conf_api.o: ../../include/openssl/conf.h ../../include/openssl/conf_api.h | ||
| 82 | conf_api.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
| 83 | conf_api.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | ||
| 84 | conf_api.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 85 | conf_api.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 86 | conf_api.o: ../../include/openssl/symhacks.h conf_api.c | ||
| 87 | conf_def.o: ../../e_os.h ../../include/openssl/bio.h | ||
| 88 | conf_def.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h | ||
| 89 | conf_def.o: ../../include/openssl/conf_api.h ../../include/openssl/crypto.h | ||
| 90 | conf_def.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 91 | conf_def.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | ||
| 92 | conf_def.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 93 | conf_def.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 94 | conf_def.o: ../../include/openssl/symhacks.h ../cryptlib.h conf_def.c | ||
| 95 | conf_def.o: conf_def.h | ||
| 96 | conf_err.o: ../../include/openssl/bio.h ../../include/openssl/conf.h | ||
| 97 | conf_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
| 98 | conf_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h | ||
| 99 | conf_err.o: ../../include/openssl/opensslconf.h | ||
| 100 | conf_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 101 | conf_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 102 | conf_err.o: ../../include/openssl/symhacks.h conf_err.c | ||
| 103 | conf_lib.o: ../../include/openssl/bio.h ../../include/openssl/conf.h | ||
| 104 | conf_lib.o: ../../include/openssl/conf_api.h ../../include/openssl/crypto.h | ||
| 105 | conf_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 106 | conf_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | ||
| 107 | conf_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 108 | conf_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 109 | conf_lib.o: ../../include/openssl/symhacks.h conf_lib.c | ||
| 110 | conf_mall.o: ../../e_os.h ../../include/openssl/asn1.h | ||
| 111 | conf_mall.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
| 112 | conf_mall.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | ||
| 113 | conf_mall.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h | ||
| 114 | conf_mall.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h | ||
| 115 | conf_mall.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h | ||
| 116 | conf_mall.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 117 | conf_mall.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 118 | conf_mall.o: ../../include/openssl/objects.h | ||
| 119 | conf_mall.o: ../../include/openssl/opensslconf.h | ||
| 120 | conf_mall.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 121 | conf_mall.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h | ||
| 122 | conf_mall.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 123 | conf_mall.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 124 | conf_mall.o: ../../include/openssl/x509_vfy.h ../cryptlib.h conf_mall.c | ||
| 125 | conf_mod.o: ../../e_os.h ../../include/openssl/asn1.h | ||
| 126 | conf_mod.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
| 127 | conf_mod.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | ||
| 128 | conf_mod.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h | ||
| 129 | conf_mod.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h | ||
| 130 | conf_mod.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h | ||
| 131 | conf_mod.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
| 132 | conf_mod.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 133 | conf_mod.o: ../../include/openssl/opensslconf.h | ||
| 134 | conf_mod.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 135 | conf_mod.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h | ||
| 136 | conf_mod.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 137 | conf_mod.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 138 | conf_mod.o: ../../include/openssl/x509_vfy.h ../cryptlib.h conf_mod.c | ||
| 139 | conf_sap.o: ../../e_os.h ../../include/openssl/asn1.h | ||
| 140 | conf_sap.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
| 141 | conf_sap.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | ||
| 142 | conf_sap.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h | ||
| 143 | conf_sap.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h | ||
| 144 | conf_sap.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h | ||
| 145 | conf_sap.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 146 | conf_sap.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 147 | conf_sap.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 148 | conf_sap.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 149 | conf_sap.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h | ||
| 150 | conf_sap.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 151 | conf_sap.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 152 | conf_sap.o: ../../include/openssl/x509_vfy.h ../cryptlib.h conf_sap.c | ||
diff --git a/src/lib/libcrypto/conf/cnf_save.c b/src/lib/libcrypto/conf/cnf_save.c new file mode 100644 index 0000000000..1439487526 --- /dev/null +++ b/src/lib/libcrypto/conf/cnf_save.c | |||
| @@ -0,0 +1,106 @@ | |||
| 1 | /* crypto/conf/cnf_save.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <openssl/conf.h> | ||
| 61 | |||
| 62 | static void print_conf(CONF_VALUE *cv); | ||
| 63 | static IMPLEMENT_LHASH_DOALL_FN(print_conf, CONF_VALUE *); | ||
| 64 | |||
| 65 | main() | ||
| 66 | { | ||
| 67 | LHASH *conf; | ||
| 68 | long l; | ||
| 69 | |||
| 70 | conf=CONF_load(NULL,"../../apps/openssl.cnf",&l); | ||
| 71 | if (conf == NULL) | ||
| 72 | { | ||
| 73 | fprintf(stderr,"error loading config, line %ld\n",l); | ||
| 74 | exit(1); | ||
| 75 | } | ||
| 76 | |||
| 77 | lh_doall(conf,LHASH_DOALL_FN(print_conf)); | ||
| 78 | } | ||
| 79 | |||
| 80 | |||
| 81 | static void print_conf(CONF_VALUE *cv) | ||
| 82 | { | ||
| 83 | int i; | ||
| 84 | CONF_VALUE *v; | ||
| 85 | char *section; | ||
| 86 | char *name; | ||
| 87 | char *value; | ||
| 88 | STACK *s; | ||
| 89 | |||
| 90 | /* If it is a single entry, return */ | ||
| 91 | |||
| 92 | if (cv->name != NULL) return; | ||
| 93 | |||
| 94 | printf("[ %s ]\n",cv->section); | ||
| 95 | s=(STACK *)cv->value; | ||
| 96 | |||
| 97 | for (i=0; i<sk_num(s); i++) | ||
| 98 | { | ||
| 99 | v=(CONF_VALUE *)sk_value(s,i); | ||
| 100 | section=(v->section == NULL)?"None":v->section; | ||
| 101 | name=(v->name == NULL)?"None":v->name; | ||
| 102 | value=(v->value == NULL)?"None":v->value; | ||
| 103 | printf("%s=%s\n",name,value); | ||
| 104 | } | ||
| 105 | printf("\n"); | ||
| 106 | } | ||
diff --git a/src/lib/libcrypto/conf/conf_mall.c b/src/lib/libcrypto/conf/conf_mall.c index 213890e0c2..c6f4cb2d55 100644 --- a/src/lib/libcrypto/conf/conf_mall.c +++ b/src/lib/libcrypto/conf/conf_mall.c | |||
| @@ -76,6 +76,5 @@ void OPENSSL_load_builtin_modules(void) | |||
| 76 | #ifndef OPENSSL_NO_ENGINE | 76 | #ifndef OPENSSL_NO_ENGINE |
| 77 | ENGINE_add_conf_module(); | 77 | ENGINE_add_conf_module(); |
| 78 | #endif | 78 | #endif |
| 79 | EVP_add_alg_module(); | ||
| 80 | } | 79 | } |
| 81 | 80 | ||
diff --git a/src/lib/libcrypto/conf/test.c b/src/lib/libcrypto/conf/test.c new file mode 100644 index 0000000000..7fab85053e --- /dev/null +++ b/src/lib/libcrypto/conf/test.c | |||
| @@ -0,0 +1,98 @@ | |||
| 1 | /* crypto/conf/test.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <stdlib.h> | ||
| 61 | #include <openssl/conf.h> | ||
| 62 | #include <openssl/err.h> | ||
| 63 | |||
| 64 | main() | ||
| 65 | { | ||
| 66 | LHASH *conf; | ||
| 67 | long eline; | ||
| 68 | char *s,*s2; | ||
| 69 | |||
| 70 | #ifdef USE_WIN32 | ||
| 71 | CONF_set_default_method(CONF_WIN32); | ||
| 72 | #endif | ||
| 73 | conf=CONF_load(NULL,"ssleay.cnf",&eline); | ||
| 74 | if (conf == NULL) | ||
| 75 | { | ||
| 76 | ERR_load_crypto_strings(); | ||
| 77 | printf("unable to load configuration, line %ld\n",eline); | ||
| 78 | ERR_print_errors_fp(stderr); | ||
| 79 | exit(1); | ||
| 80 | } | ||
| 81 | lh_stats(conf,stdout); | ||
| 82 | lh_node_stats(conf,stdout); | ||
| 83 | lh_node_usage_stats(conf,stdout); | ||
| 84 | |||
| 85 | s=CONF_get_string(conf,NULL,"init2"); | ||
| 86 | printf("init2=%s\n",(s == NULL)?"NULL":s); | ||
| 87 | |||
| 88 | s=CONF_get_string(conf,NULL,"cipher1"); | ||
| 89 | printf("cipher1=%s\n",(s == NULL)?"NULL":s); | ||
| 90 | |||
| 91 | s=CONF_get_string(conf,"s_client","cipher1"); | ||
| 92 | printf("s_client:cipher1=%s\n",(s == NULL)?"NULL":s); | ||
| 93 | |||
| 94 | printf("---------------------------- DUMP ------------------------\n"); | ||
| 95 | CONF_dump_fp(conf, stdout); | ||
| 96 | |||
| 97 | exit(0); | ||
| 98 | } | ||
