-/* $OpenBSD: servertest.c,v 1.5 2021/01/22 15:56:17 tb Exp $ */
+/* $OpenBSD: servertest.c,v 1.6 2021/11/20 16:36:55 tb Exp $ */
/*
* Copyright (c) 2015, 2016, 2017 Joel Sing <jsing@openbsd.org>
*
goto failure;
}
- rbio->references = 2;
- wbio->references = 2;
-
+ BIO_up_ref(rbio);
+ BIO_up_ref(wbio);
SSL_set_bio(ssl, rbio, wbio);
if (SSL_accept(ssl) != 0) {
SSL_CTX_free(ssl_ctx);
SSL_free(ssl);
- if (rbio != NULL)
- rbio->references = 1;
- if (wbio != NULL)
- wbio->references = 1;
-
BIO_free(rbio);
BIO_free(wbio);
-/* $OpenBSD: tlslegacytest.c,v 1.4 2021/08/30 17:34:02 tb Exp $ */
+/* $OpenBSD: tlslegacytest.c,v 1.5 2021/11/20 16:36:55 tb Exp $ */
/*
* Copyright (c) 2015, 2016, 2017, 2020 Joel Sing <jsing@openbsd.org>
*
goto failure;
}
- rbio->references = 2;
- wbio->references = 2;
-
+ BIO_up_ref(rbio);
+ BIO_up_ref(wbio);
SSL_set_bio(ssl, rbio, wbio);
if (SSL_connect(ssl) == 1) {
SSL_CTX_free(ssl_ctx);
SSL_free(ssl);
- rbio->references = 1;
- wbio->references = 1;
-
BIO_free(rbio);
BIO_free(wbio);