[exim-dev] [Bug 2815] 4.95 ALPN callback returns protocol pr…

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: admin
Ημερομηνία:  
Προς: exim-dev
Αντικείμενο: [exim-dev] [Bug 2815] 4.95 ALPN callback returns protocol prefixed with length
https://bugs.exim.org/show_bug.cgi?id=2815

--- Comment #6 from Git Commit <git@???> ---
Git commit:
https://git.exim.org/exim.git/commitdiff/32b11385ddced7eafe68c60eebbb2c81979ce35f

commit 32b11385ddced7eafe68c60eebbb2c81979ce35f
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Sat Oct 16 00:24:07 2021 +0100
Commit:     Jeremy Harris <jgh146exb@???>
CommitDate: Sat Oct 16 00:24:07 2021 +0100


    Fix ALPN/OpenSSL.  Bug 2815


    Broken-by: c4b4086235
---
 doc/doc-txt/ChangeLog | 3 +++
 src/src/tls-openssl.c | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)


diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index 1a29ae5..811d123 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -25,6 +25,9 @@ JH/05 Bug 2819: speed up command-line messages being read in.
 Previously a
       time check was being done for every character; replace that with one
       per buffer.


+JH/06 Bug 2815: Fix ALPN sent by server under OpenSSL.  Previously the string
+      sent was prefixed with a length byte.
+


 Exim version 4.95
 -----------------
diff --git a/src/src/tls-openssl.c b/src/src/tls-openssl.c
index fddad9e..590d271 100644
--- a/src/src/tls-openssl.c
+++ b/src/src/tls-openssl.c
@@ -2182,7 +2182,7 @@ if (  inlen > 1        /* at least one name */
   for (uschar * name; name = string_nextinlist(&list, &sep, NULL, 0); )
     if (Ustrncmp(in+1, name, in[0]) == 0)
       {
-      *out = in;            /* we checked for exactly one, so can just point
to it */
+      *out = in+1;            /* we checked for exactly one, so can just point
to it */
       *outlen = inlen;
       return SSL_TLSEXT_ERR_OK;        /* use ALPN */
       }


--
You are receiving this mail because:
You are on the CC list for the bug.