diff options
Diffstat (limited to 'src/lib/libssl/src/ssl/ssltest.c')
-rw-r--r-- | src/lib/libssl/src/ssl/ssltest.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/lib/libssl/src/ssl/ssltest.c b/src/lib/libssl/src/ssl/ssltest.c index 9845ef99ed..3a0db0cb51 100644 --- a/src/lib/libssl/src/ssl/ssltest.c +++ b/src/lib/libssl/src/ssl/ssltest.c | |||
@@ -119,14 +119,12 @@ | |||
119 | #include <stdlib.h> | 119 | #include <stdlib.h> |
120 | #include <string.h> | 120 | #include <string.h> |
121 | #include <time.h> | 121 | #include <time.h> |
122 | #include <inttypes.h> | ||
123 | #include <ctype.h> | ||
122 | 124 | ||
123 | #define USE_SOCKETS | 125 | #define USE_SOCKETS |
124 | #include "e_os.h" | 126 | #include "e_os.h" |
125 | 127 | ||
126 | #define _XOPEN_SOURCE 500 /* Or isascii won't be declared properly on | ||
127 | VMS (at least with DECompHP C). */ | ||
128 | #include <ctype.h> | ||
129 | |||
130 | #include <openssl/bio.h> | 128 | #include <openssl/bio.h> |
131 | #include <openssl/crypto.h> | 129 | #include <openssl/crypto.h> |
132 | #include <openssl/evp.h> | 130 | #include <openssl/evp.h> |
@@ -391,6 +389,7 @@ int main(int argc, char *argv[]) | |||
391 | COMP_METHOD *cm = NULL; | 389 | COMP_METHOD *cm = NULL; |
392 | #ifdef OPENSSL_FIPS | 390 | #ifdef OPENSSL_FIPS |
393 | int fips_mode=0; | 391 | int fips_mode=0; |
392 | const char *path=argv[0]; | ||
394 | #endif | 393 | #endif |
395 | 394 | ||
396 | verbose = 0; | 395 | verbose = 0; |
@@ -593,7 +592,7 @@ bad: | |||
593 | #ifdef OPENSSL_FIPS | 592 | #ifdef OPENSSL_FIPS |
594 | if(fips_mode) | 593 | if(fips_mode) |
595 | { | 594 | { |
596 | if(!FIPS_mode_set(1)) | 595 | if(!FIPS_mode_set(1,path)) |
597 | { | 596 | { |
598 | ERR_load_crypto_strings(); | 597 | ERR_load_crypto_strings(); |
599 | ERR_print_errors(BIO_new_fp(stderr,BIO_NOCLOSE)); | 598 | ERR_print_errors(BIO_new_fp(stderr,BIO_NOCLOSE)); |
@@ -1928,8 +1927,8 @@ static int MS_CALLBACK app_verify_callback(X509_STORE_CTX *ctx, void *arg) | |||
1928 | 1927 | ||
1929 | fprintf(stderr, "In app_verify_callback, allowing cert. "); | 1928 | fprintf(stderr, "In app_verify_callback, allowing cert. "); |
1930 | fprintf(stderr, "Arg is: %s\n", cb_arg->string); | 1929 | fprintf(stderr, "Arg is: %s\n", cb_arg->string); |
1931 | fprintf(stderr, "Finished printing do we have a context? 0x%p a cert? 0x%p\n", | 1930 | fprintf(stderr, "Finished printing do we have a context? 0x%x a cert? 0x%x\n", |
1932 | (void *)ctx, (void *)ctx->cert); | 1931 | (unsigned int)ctx, (unsigned int)ctx->cert); |
1933 | if (ctx->cert) | 1932 | if (ctx->cert) |
1934 | s=X509_NAME_oneline(X509_get_subject_name(ctx->cert),buf,256); | 1933 | s=X509_NAME_oneline(X509_get_subject_name(ctx->cert),buf,256); |
1935 | if (s != NULL) | 1934 | if (s != NULL) |
@@ -1977,7 +1976,15 @@ static int MS_CALLBACK app_verify_callback(X509_STORE_CTX *ctx, void *arg) | |||
1977 | } | 1976 | } |
1978 | 1977 | ||
1979 | #ifndef OPENSSL_NO_X509_VERIFY | 1978 | #ifndef OPENSSL_NO_X509_VERIFY |
1979 | # ifdef OPENSSL_FIPS | ||
1980 | if(s->version == TLS1_VERSION) | ||
1981 | FIPS_allow_md5(1); | ||
1982 | # endif | ||
1980 | ok = X509_verify_cert(ctx); | 1983 | ok = X509_verify_cert(ctx); |
1984 | # ifdef OPENSSL_FIPS | ||
1985 | if(s->version == TLS1_VERSION) | ||
1986 | FIPS_allow_md5(0); | ||
1987 | # endif | ||
1981 | #endif | 1988 | #endif |
1982 | 1989 | ||
1983 | if (cb_arg->proxy_auth) | 1990 | if (cb_arg->proxy_auth) |