From d75fd186365b74ea6d1283cd78511289ef0e9739 Mon Sep 17 00:00:00 2001 From: bcook Date: Fri, 7 Jul 2023 19:54:36 +0000 Subject: [PATCH] upstream portable fix for ocsp_test --- regress/lib/libcrypto/ocsp/ocsp_test.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/regress/lib/libcrypto/ocsp/ocsp_test.c b/regress/lib/libcrypto/ocsp/ocsp_test.c index 59147298281..a38d2813535 100644 --- a/regress/lib/libcrypto/ocsp/ocsp_test.c +++ b/regress/lib/libcrypto/ocsp/ocsp_test.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ocsp_test.c,v 1.6 2018/07/18 16:24:16 tb Exp $ */ +/* $OpenBSD: ocsp_test.c,v 1.7 2023/07/07 19:54:36 bcook Exp $ */ /* * Copyright (c) 2016 Bob Beck * @@ -35,6 +35,11 @@ tcp_connect(char *host, char *port) hints.ai_family = AF_INET; hints.ai_socktype = SOCK_STREAM; + if (BIO_sock_init() != 1) { + perror("BIO_sock_init()"); + exit(-1); + } + error = getaddrinfo(host, port, &hints, &res); if (error != 0) { perror("getaddrinfo()"); -- 2.20.1