summaryrefslogtreecommitdiff
path: root/src/lib/libssl/src/ssl/ssltest.c
diff options
context:
space:
mode:
authordjm <>2006-06-27 05:05:40 +0000
committerdjm <>2006-06-27 05:05:40 +0000
commit4f828b924f54507141fb95ebe49dfcd261945e85 (patch)
treef6b05913ca6b34db73a343a7bb36d57ff4105356 /src/lib/libssl/src/ssl/ssltest.c
parent588543a0946f1dbf0f1dd5135f8f6447486dc183 (diff)
downloadopenbsd-4f828b924f54507141fb95ebe49dfcd261945e85.tar.gz
openbsd-4f828b924f54507141fb95ebe49dfcd261945e85.tar.bz2
openbsd-4f828b924f54507141fb95ebe49dfcd261945e85.zip
import of openssl-0.9.7j
Diffstat (limited to 'src/lib/libssl/src/ssl/ssltest.c')
-rw-r--r--src/lib/libssl/src/ssl/ssltest.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/lib/libssl/src/ssl/ssltest.c b/src/lib/libssl/src/ssl/ssltest.c
index 02878981f1..9845ef99ed 100644
--- a/src/lib/libssl/src/ssl/ssltest.c
+++ b/src/lib/libssl/src/ssl/ssltest.c
@@ -119,11 +119,14 @@
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 <ctype.h>
123 122
124#define USE_SOCKETS 123#define USE_SOCKETS
125#include "e_os.h" 124#include "e_os.h"
126 125
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
127#include <openssl/bio.h> 130#include <openssl/bio.h>
128#include <openssl/crypto.h> 131#include <openssl/crypto.h>
129#include <openssl/evp.h> 132#include <openssl/evp.h>
@@ -388,7 +391,6 @@ int main(int argc, char *argv[])
388 COMP_METHOD *cm = NULL; 391 COMP_METHOD *cm = NULL;
389#ifdef OPENSSL_FIPS 392#ifdef OPENSSL_FIPS
390 int fips_mode=0; 393 int fips_mode=0;
391 const char *path=argv[0];
392#endif 394#endif
393 395
394 verbose = 0; 396 verbose = 0;
@@ -591,7 +593,7 @@ bad:
591#ifdef OPENSSL_FIPS 593#ifdef OPENSSL_FIPS
592 if(fips_mode) 594 if(fips_mode)
593 { 595 {
594 if(!FIPS_mode_set(1,path)) 596 if(!FIPS_mode_set(1))
595 { 597 {
596 ERR_load_crypto_strings(); 598 ERR_load_crypto_strings();
597 ERR_print_errors(BIO_new_fp(stderr,BIO_NOCLOSE)); 599 ERR_print_errors(BIO_new_fp(stderr,BIO_NOCLOSE));
@@ -1926,8 +1928,8 @@ static int MS_CALLBACK app_verify_callback(X509_STORE_CTX *ctx, void *arg)
1926 1928
1927 fprintf(stderr, "In app_verify_callback, allowing cert. "); 1929 fprintf(stderr, "In app_verify_callback, allowing cert. ");
1928 fprintf(stderr, "Arg is: %s\n", cb_arg->string); 1930 fprintf(stderr, "Arg is: %s\n", cb_arg->string);
1929 fprintf(stderr, "Finished printing do we have a context? 0x%x a cert? 0x%x\n", 1931 fprintf(stderr, "Finished printing do we have a context? 0x%p a cert? 0x%p\n",
1930 (unsigned int)ctx, (unsigned int)ctx->cert); 1932 (void *)ctx, (void *)ctx->cert);
1931 if (ctx->cert) 1933 if (ctx->cert)
1932 s=X509_NAME_oneline(X509_get_subject_name(ctx->cert),buf,256); 1934 s=X509_NAME_oneline(X509_get_subject_name(ctx->cert),buf,256);
1933 if (s != NULL) 1935 if (s != NULL)
@@ -1975,15 +1977,7 @@ static int MS_CALLBACK app_verify_callback(X509_STORE_CTX *ctx, void *arg)
1975 } 1977 }
1976 1978
1977#ifndef OPENSSL_NO_X509_VERIFY 1979#ifndef OPENSSL_NO_X509_VERIFY
1978# ifdef OPENSSL_FIPS
1979 if(s->version == TLS1_VERSION)
1980 FIPS_allow_md5(1);
1981# endif
1982 ok = X509_verify_cert(ctx); 1980 ok = X509_verify_cert(ctx);
1983# ifdef OPENSSL_FIPS
1984 if(s->version == TLS1_VERSION)
1985 FIPS_allow_md5(0);
1986# endif
1987#endif 1981#endif
1988 1982
1989 if (cb_arg->proxy_auth) 1983 if (cb_arg->proxy_auth)