summaryrefslogtreecommitdiff
path: root/src/regress/lib
diff options
context:
space:
mode:
authortb <>2023-07-27 07:08:09 +0000
committertb <>2023-07-27 07:08:09 +0000
commit4d5ca32c9d786ed6605324f4bc11f3531911e68a (patch)
treeeb029c1a00915a71f0a38fa1ceb029c51cd4fc0d /src/regress/lib
parent74e29e29a715efa5cc5edec834b19dbf7597aaa3 (diff)
downloadopenbsd-4d5ca32c9d786ed6605324f4bc11f3531911e68a.tar.gz
openbsd-4d5ca32c9d786ed6605324f4bc11f3531911e68a.tar.bz2
openbsd-4d5ca32c9d786ed6605324f4bc11f3531911e68a.zip
Prepare the ssltest for the upcoming bump
This is a hack. The test is in rather poor shape and it is hard to tell whether it still does what it is supposed to be doing. Hopefully somemone will rewrite this in a style that doesn't make me squeal on opening this file...
Diffstat (limited to 'src/regress/lib')
-rw-r--r--src/regress/lib/libssl/ssl/ssltest.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/regress/lib/libssl/ssl/ssltest.c b/src/regress/lib/libssl/ssl/ssltest.c
index f3966e5054..f50824d242 100644
--- a/src/regress/lib/libssl/ssl/ssltest.c
+++ b/src/regress/lib/libssl/ssl/ssltest.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssltest.c,v 1.41 2023/07/04 08:47:01 tb Exp $ */ 1/* $OpenBSD: ssltest.c,v 1.42 2023/07/27 07:08:09 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -140,6 +140,9 @@
140 * OTHERWISE. 140 * OTHERWISE.
141 */ 141 */
142 142
143/* XXX - USE_BIOPAIR code needs updating for BIO_n{read,write}{,0} removal. */
144/* #define USE_BIOPAIR */
145
143#define _BSD_SOURCE 1 /* Or gethostname won't be declared properly 146#define _BSD_SOURCE 1 /* Or gethostname won't be declared properly
144 on Linux and GNU platforms. */ 147 on Linux and GNU platforms. */
145#include <sys/types.h> 148#include <sys/types.h>
@@ -714,10 +717,12 @@ bad:
714 for (i = 0; i < number; i++) { 717 for (i = 0; i < number; i++) {
715 if (!reuse) 718 if (!reuse)
716 SSL_set_session(c_ssl, NULL); 719 SSL_set_session(c_ssl, NULL);
720#ifdef USE_BIOPAIR
717 if (bio_pair) 721 if (bio_pair)
718 ret = doit_biopair(s_ssl, c_ssl, bytes, &s_time, 722 ret = doit_biopair(s_ssl, c_ssl, bytes, &s_time,
719 &c_time); 723 &c_time);
720 else 724 else
725#endif
721 ret = doit(s_ssl, c_ssl, bytes); 726 ret = doit(s_ssl, c_ssl, bytes);
722 } 727 }
723 728
@@ -771,6 +776,7 @@ end:
771 return ret; 776 return ret;
772} 777}
773 778
779#if USE_BIOPAIR
774int 780int
775doit_biopair(SSL *s_ssl, SSL *c_ssl, long count, clock_t *s_time, 781doit_biopair(SSL *s_ssl, SSL *c_ssl, long count, clock_t *s_time,
776 clock_t *c_time) 782 clock_t *c_time)
@@ -1114,6 +1120,7 @@ err:
1114 1120
1115 return ret; 1121 return ret;
1116} 1122}
1123#endif
1117 1124
1118 1125
1119#define W_READ 1 1126#define W_READ 1