summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander M Pickering <alex@cogarr.net>2024-11-08 13:20:50 -0600
committerAlexander M Pickering <alex@cogarr.net>2024-11-08 13:20:50 -0600
commit67f4fd9e478cebc3ff8e064c598b9b50d1b36bc5 (patch)
tree18e5f2b40b6a1320b5ce99e81eef68f6ff976a25
parentc2b012a90590ab3fa531392fd27003e62c156099 (diff)
downloadbusybox-w32-packaging-67f4fd9e478cebc3ff8e064c598b9b50d1b36bc5.tar.gz
busybox-w32-packaging-67f4fd9e478cebc3ff8e064c598b9b50d1b36bc5.tar.bz2
busybox-w32-packaging-67f4fd9e478cebc3ff8e064c598b9b50d1b36bc5.zip
Try fixing some warnings
-rw-r--r--libressl.patch47
1 files changed, 30 insertions, 17 deletions
diff --git a/libressl.patch b/libressl.patch
index f49ed9d..1cac700 100644
--- a/libressl.patch
+++ b/libressl.patch
@@ -108,27 +108,27 @@ index 6a64836fb..6a82f1fa4 100644
108+static int spawn_https_helper_openssl(const char *host, unsigned port) 108+static int spawn_https_helper_openssl(const char *host, unsigned port)
109+{ 109+{
110+ char* allocated = NULL; 110+ char* allocated = NULL;
111+ int fd1; 111+ int fd1;
112+ char *servername, *p, *cmd; 112+ char *servername, *p, *cmd;
113+ int sp[2]; 113+ int sp[2];
114+ if(!strchr(host,":")) 114+ if(!strchr(host,":"))
115+ host = allocated = xasprintf("%s:%u",host,port); 115+ host = allocated = xasprintf("%s:%u",host,port);
116+ servername = xstrdup(host); 116+ servername = xstrdup(host);
117+ fflush_all(); 117+ fflush_all();
118+ 118+
119+ struct tls *ctx = tls_client(); 119+ tls *ctx = tls_client();
120+ if(ctx == NULL) 120+ if(ctx == NULL)
121+ bb_error_msg_and_die("Out of memory"); 121+ bb_error_msg_and_die("Out of memory");
122+ struct tls_config *config = tls_config_new(); 122+ tls_config *config = tls_config_new();
123+ if(config == NULL) 123+ if(config == NULL)
124+ bb_error_msg_and_die("Out of memory"); 124+ bb_error_msg_and_die("Out of memory");
125+ if(tls_configure(ctx,config) != 0) 125+ if(tls_configure(ctx,config) != 0)
126+ bb_error_msg_and_die("Failed to configure client"); 126+ bb_error_msg_and_die("Failed to configure client");
127+ tls_connect_fds(ctx,sp[0],sp[1],servername); 127+ tls_connect_fds(ctx,sp[0],sp[1],servername);
128+ close(sp[1]); 128+ close(sp[1]);
129+ free(allocated); 129+ free(allocated);
130+ free(servername); 130+ free(servername);
131+ return sp[0]; 131+ return sp[0];
132+} 132+}
133+# endif 133+# endif
134 #endif 134 #endif
@@ -166,3 +166,16 @@ index 87e7ca602..7bad3e4fa 100644
166 166
167 struct passwd *getpwnam(const char *name) 167 struct passwd *getpwnam(const char *name)
168 { 168 {
169diff --git a/networking/ssl_client.c b/networking/ssl_client.c
170index 757745896..72bd4969f 100644
171--- a/networking/ssl_client.c
172+++ b/networking/ssl_client.c
173@@ -24,7 +24,7 @@
174 //usage:#define ssl_client_full_usage ""
175
176 #include "libbb.h"
177-
178+#include <tls.h>
179 int ssl_client_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
180 int ssl_client_main(int argc UNUSED_PARAM, char **argv)
181 {