2014-04-09 18:17:23 +02:00
|
|
|
Index: openssl-1.0.1g/apps/s_client.c
|
|
|
|
===================================================================
|
|
|
|
--- openssl-1.0.1g.orig/apps/s_client.c
|
|
|
|
+++ openssl-1.0.1g/apps/s_client.c
|
|
|
|
@@ -1174,12 +1174,19 @@ bad:
|
2013-08-13 11:00:53 +02:00
|
|
|
if (!set_cert_key_stuff(ctx,cert,key))
|
|
|
|
goto end;
|
|
|
|
|
|
|
|
- if ((!SSL_CTX_load_verify_locations(ctx,CAfile,CApath)) ||
|
|
|
|
- (!SSL_CTX_set_default_verify_paths(ctx)))
|
|
|
|
+ if (CAfile == NULL && CApath == NULL)
|
|
|
|
{
|
|
|
|
- /* BIO_printf(bio_err,"error setting default verify locations\n"); */
|
|
|
|
- ERR_print_errors(bio_err);
|
|
|
|
- /* goto end; */
|
|
|
|
+ if (!SSL_CTX_set_default_verify_paths(ctx))
|
|
|
|
+ {
|
|
|
|
+ ERR_print_errors(bio_err);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ if (!SSL_CTX_load_verify_locations(ctx,CAfile,CApath))
|
|
|
|
+ {
|
|
|
|
+ ERR_print_errors(bio_err);
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifndef OPENSSL_NO_TLSEXT
|
2014-04-09 18:17:23 +02:00
|
|
|
Index: openssl-1.0.1g/apps/s_server.c
|
|
|
|
===================================================================
|
|
|
|
--- openssl-1.0.1g.orig/apps/s_server.c
|
|
|
|
+++ openssl-1.0.1g/apps/s_server.c
|
|
|
|
@@ -1572,13 +1572,21 @@ bad:
|
2013-08-13 11:00:53 +02:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
- if ((!SSL_CTX_load_verify_locations(ctx,CAfile,CApath)) ||
|
|
|
|
- (!SSL_CTX_set_default_verify_paths(ctx)))
|
|
|
|
+ if (CAfile == NULL && CApath == NULL)
|
|
|
|
{
|
|
|
|
- /* BIO_printf(bio_err,"X509_load_verify_locations\n"); */
|
|
|
|
- ERR_print_errors(bio_err);
|
|
|
|
- /* goto end; */
|
|
|
|
+ if (!SSL_CTX_set_default_verify_paths(ctx))
|
|
|
|
+ {
|
|
|
|
+ ERR_print_errors(bio_err);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ if (!SSL_CTX_load_verify_locations(ctx,CAfile,CApath))
|
|
|
|
+ {
|
|
|
|
+ ERR_print_errors(bio_err);
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
+
|
|
|
|
if (vpm)
|
|
|
|
SSL_CTX_set1_param(ctx, vpm);
|
|
|
|
|
2014-04-09 18:17:23 +02:00
|
|
|
@@ -1629,8 +1637,11 @@ bad:
|
2013-08-13 11:00:53 +02:00
|
|
|
else
|
|
|
|
SSL_CTX_sess_set_cache_size(ctx2,128);
|
|
|
|
|
|
|
|
- if ((!SSL_CTX_load_verify_locations(ctx2,CAfile,CApath)) ||
|
|
|
|
- (!SSL_CTX_set_default_verify_paths(ctx2)))
|
|
|
|
+ if (!SSL_CTX_load_verify_locations(ctx2,CAfile,CApath))
|
|
|
|
+ {
|
|
|
|
+ ERR_print_errors(bio_err);
|
|
|
|
+ }
|
|
|
|
+ if (!SSL_CTX_set_default_verify_paths(ctx2))
|
|
|
|
{
|
|
|
|
ERR_print_errors(bio_err);
|
|
|
|
}
|
2014-04-09 18:17:23 +02:00
|
|
|
Index: openssl-1.0.1g/apps/s_time.c
|
|
|
|
===================================================================
|
|
|
|
--- openssl-1.0.1g.orig/apps/s_time.c
|
|
|
|
+++ openssl-1.0.1g/apps/s_time.c
|
2013-08-13 11:00:53 +02:00
|
|
|
@@ -373,12 +373,19 @@ int MAIN(int argc, char **argv)
|
|
|
|
|
|
|
|
SSL_load_error_strings();
|
|
|
|
|
|
|
|
- if ((!SSL_CTX_load_verify_locations(tm_ctx,CAfile,CApath)) ||
|
|
|
|
- (!SSL_CTX_set_default_verify_paths(tm_ctx)))
|
|
|
|
+ if (CAfile == NULL && CApath == NULL)
|
|
|
|
{
|
|
|
|
- /* BIO_printf(bio_err,"error setting default verify locations\n"); */
|
|
|
|
- ERR_print_errors(bio_err);
|
|
|
|
- /* goto end; */
|
|
|
|
+ if (!SSL_CTX_set_default_verify_paths(tm_ctx))
|
|
|
|
+ {
|
|
|
|
+ ERR_print_errors(bio_err);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ if (!SSL_CTX_load_verify_locations(tm_ctx,CAfile,CApath))
|
|
|
|
+ {
|
|
|
|
+ ERR_print_errors(bio_err);
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tm_cipher == NULL)
|