diff options
| author | markus <> | 2002-09-05 12:51:52 +0000 |
|---|---|---|
| committer | markus <> | 2002-09-05 12:51:52 +0000 |
| commit | 5514995a9d5ed91db089875adb509c7781357c0e (patch) | |
| tree | 2484410a46ba6c05ef94c253da36fbceef990b64 /src/lib/libcrypto/conf | |
| parent | fd9566423b542798f5c8b06e68101a9ea5bb9885 (diff) | |
| download | openbsd-5514995a9d5ed91db089875adb509c7781357c0e.tar.gz openbsd-5514995a9d5ed91db089875adb509c7781357c0e.tar.bz2 openbsd-5514995a9d5ed91db089875adb509c7781357c0e.zip | |
import openssl-0.9.7-beta1
Diffstat (limited to 'src/lib/libcrypto/conf')
| -rw-r--r-- | src/lib/libcrypto/conf/cnf_save.c | 12 | ||||
| -rw-r--r-- | src/lib/libcrypto/conf/test.c | 11 |
2 files changed, 15 insertions, 8 deletions
diff --git a/src/lib/libcrypto/conf/cnf_save.c b/src/lib/libcrypto/conf/cnf_save.c index c9018de10e..1439487526 100644 --- a/src/lib/libcrypto/conf/cnf_save.c +++ b/src/lib/libcrypto/conf/cnf_save.c | |||
| @@ -57,28 +57,28 @@ | |||
| 57 | */ | 57 | */ |
| 58 | 58 | ||
| 59 | #include <stdio.h> | 59 | #include <stdio.h> |
| 60 | #include "conf.h" | 60 | #include <openssl/conf.h> |
| 61 | 61 | ||
| 62 | void print_conf(CONF_VALUE *cv); | 62 | static void print_conf(CONF_VALUE *cv); |
| 63 | static IMPLEMENT_LHASH_DOALL_FN(print_conf, CONF_VALUE *); | ||
| 63 | 64 | ||
| 64 | main() | 65 | main() |
| 65 | { | 66 | { |
| 66 | LHASH *conf; | 67 | LHASH *conf; |
| 67 | long l; | 68 | long l; |
| 68 | 69 | ||
| 69 | conf=CONF_load(NULL,"../../apps/ssleay.cnf",&l); | 70 | conf=CONF_load(NULL,"../../apps/openssl.cnf",&l); |
| 70 | if (conf == NULL) | 71 | if (conf == NULL) |
| 71 | { | 72 | { |
| 72 | fprintf(stderr,"error loading config, line %ld\n",l); | 73 | fprintf(stderr,"error loading config, line %ld\n",l); |
| 73 | exit(1); | 74 | exit(1); |
| 74 | } | 75 | } |
| 75 | 76 | ||
| 76 | lh_doall(conf,print_conf); | 77 | lh_doall(conf,LHASH_DOALL_FN(print_conf)); |
| 77 | } | 78 | } |
| 78 | 79 | ||
| 79 | 80 | ||
| 80 | void print_conf(cv) | 81 | static void print_conf(CONF_VALUE *cv) |
| 81 | CONF_VALUE *cv; | ||
| 82 | { | 82 | { |
| 83 | int i; | 83 | int i; |
| 84 | CONF_VALUE *v; | 84 | CONF_VALUE *v; |
diff --git a/src/lib/libcrypto/conf/test.c b/src/lib/libcrypto/conf/test.c index 899ee2a067..7fab85053e 100644 --- a/src/lib/libcrypto/conf/test.c +++ b/src/lib/libcrypto/conf/test.c | |||
| @@ -58,7 +58,8 @@ | |||
| 58 | 58 | ||
| 59 | #include <stdio.h> | 59 | #include <stdio.h> |
| 60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
| 61 | #include "conf.h" | 61 | #include <openssl/conf.h> |
| 62 | #include <openssl/err.h> | ||
| 62 | 63 | ||
| 63 | main() | 64 | main() |
| 64 | { | 65 | { |
| @@ -66,7 +67,10 @@ main() | |||
| 66 | long eline; | 67 | long eline; |
| 67 | char *s,*s2; | 68 | char *s,*s2; |
| 68 | 69 | ||
| 69 | conf=CONF_load(NULL,"ssleay.conf",&eline); | 70 | #ifdef USE_WIN32 |
| 71 | CONF_set_default_method(CONF_WIN32); | ||
| 72 | #endif | ||
| 73 | conf=CONF_load(NULL,"ssleay.cnf",&eline); | ||
| 70 | if (conf == NULL) | 74 | if (conf == NULL) |
| 71 | { | 75 | { |
| 72 | ERR_load_crypto_strings(); | 76 | ERR_load_crypto_strings(); |
| @@ -87,5 +91,8 @@ main() | |||
| 87 | s=CONF_get_string(conf,"s_client","cipher1"); | 91 | s=CONF_get_string(conf,"s_client","cipher1"); |
| 88 | printf("s_client:cipher1=%s\n",(s == NULL)?"NULL":s); | 92 | printf("s_client:cipher1=%s\n",(s == NULL)?"NULL":s); |
| 89 | 93 | ||
| 94 | printf("---------------------------- DUMP ------------------------\n"); | ||
| 95 | CONF_dump_fp(conf, stdout); | ||
| 96 | |||
| 90 | exit(0); | 97 | exit(0); |
| 91 | } | 98 | } |
