summaryrefslogtreecommitdiff
path: root/system/openssl/0006-add-ircv3-tls-3.1-extension-support-to-s_client.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-02-20 22:03:34 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-02-20 22:03:34 -0600
commit129370fc1900bc981d529ab7d4a82b6668c72183 (patch)
treef368dd73c0761fe03732d868e857a0161d7ac7f4 /system/openssl/0006-add-ircv3-tls-3.1-extension-support-to-s_client.patch
parent719252b7b29749389730057387d5a43b5516f7fe (diff)
downloadpackages-129370fc1900bc981d529ab7d4a82b6668c72183.tar.gz
packages-129370fc1900bc981d529ab7d4a82b6668c72183.tar.bz2
packages-129370fc1900bc981d529ab7d4a82b6668c72183.tar.xz
packages-129370fc1900bc981d529ab7d4a82b6668c72183.zip
system/openssl: prepare for a new OpenSSL
Diffstat (limited to 'system/openssl/0006-add-ircv3-tls-3.1-extension-support-to-s_client.patch')
-rw-r--r--system/openssl/0006-add-ircv3-tls-3.1-extension-support-to-s_client.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/system/openssl/0006-add-ircv3-tls-3.1-extension-support-to-s_client.patch b/system/openssl/0006-add-ircv3-tls-3.1-extension-support-to-s_client.patch
new file mode 100644
index 000000000..daa6df02f
--- /dev/null
+++ b/system/openssl/0006-add-ircv3-tls-3.1-extension-support-to-s_client.patch
@@ -0,0 +1,68 @@
+From 4785c095dbfb3630ddf6685f23e3a19c7c804cbc Mon Sep 17 00:00:00 2001
+From: William Pitcock <nenolod@dereferenced.org>
+Date: Thu, 5 Feb 2015 09:02:00 +0200
+Subject: [PATCH] add ircv3 tls-3.1 extension support to s_client
+
+---
+ apps/s_client.c | 24 ++++++++++++++++++++++--
+ 1 file changed, 22 insertions(+), 2 deletions(-)
+
+diff --git a/apps/s_client.c b/apps/s_client.c
+index 8aee02a..0a28b89 100644
+--- a/apps/s_client.c
++++ b/apps/s_client.c
+@@ -401,7 +401,7 @@ static void sc_usage(void)
+ BIO_printf(bio_err,
+ " 'prot' defines which one to assume. Currently,\n");
+ BIO_printf(bio_err,
+- " only \"smtp\", \"pop3\", \"imap\", \"ftp\" and \"xmpp\"\n");
++ " only \"smtp\", \"pop3\", \"imap\", \"ftp\", \"xmpp\" and \"ircv3\"\n");
+ BIO_printf(bio_err, " are supported.\n");
+ #ifndef OPENSSL_NO_ENGINE
+ BIO_printf(bio_err,
+@@ -640,7 +640,8 @@ enum {
+ PROTO_POP3,
+ PROTO_IMAP,
+ PROTO_FTP,
+- PROTO_XMPP
++ PROTO_XMPP,
++ PROTO_IRCV3,
+ };
+
+ int MAIN(int, char **);
+@@ -1062,6 +1063,8 @@ int MAIN(int argc, char **argv)
+ starttls_proto = PROTO_FTP;
+ else if (strcmp(*argv, "xmpp") == 0)
+ starttls_proto = PROTO_XMPP;
++ else if (strcmp(*argv, "ircv3") == 0)
++ starttls_proto = PROTO_IRCV3;
+ else
+ goto bad;
+ }
+@@ -1646,6 +1649,23 @@ int MAIN(int argc, char **argv)
+ goto shut;
+ mbuf[0] = 0;
+ }
++ if (starttls_proto == PROTO_IRCV3) {
++ int seen = 0;
++ BIO_printf(sbio,"CAP REQ :tls\r\n");
++
++ while (!strstr(mbuf,"CAP")) {
++ seen = BIO_read(sbio,mbuf,BUFSIZZ);
++ mbuf[seen] = 0;
++ }
++ if (!strstr(mbuf,"ACK"))
++ goto shut;
++ BIO_printf(sbio,"CAP END\r\nSTARTTLS\r\n");
++ while (!strstr(sbuf, "670")) {
++ seen = BIO_read(sbio,sbuf,BUFSIZZ);
++ sbuf[seen] = 0;
++ }
++ mbuf[0] = 0;
++ }
+
+ for (;;) {
+ FD_ZERO(&readfds);
+--
+2.2.2
+