Index: doc/tls.html
==================================================================
--- doc/tls.html
+++ doc/tls.html
@@ -557,18 +557,18 @@
-
- alpn protocol
+ alpn protocol match
-
For servers, this form of callback is invoked when the client ALPN
- extension is received. Where protocol is the first
- -alpn specified protocol common to the both the client and
- server. If none, the first client specified protocol is used.
- Called after hello and ALPN callbacks.
+ extension is received. If match is true, protocol
+ is the first -alpn specified protocol common to the both the
+ client and server. If not, the first client specified protocol is
+ used. Called after hello and ALPN callbacks.
-
Index: generic/tls.c
==================================================================
--- generic/tls.c
+++ generic/tls.c
@@ -682,10 +682,11 @@
/* Create command to eval */
cmdPtr = Tcl_DuplicateObj(statePtr->vcmd);
Tcl_ListObjAppendElement(interp, cmdPtr, Tcl_NewStringObj("alpn", -1));
Tcl_ListObjAppendElement(interp, cmdPtr, Tcl_NewStringObj(*out, -1));
+ Tcl_ListObjAppendElement(interp, cmdPtr, Tcl_NewBooleanObj(res == SSL_TLSEXT_ERR_OK));
/* Eval callback command */
Tcl_IncrRefCount(cmdPtr);
if ((code = EvalCallback(interp, statePtr, cmdPtr)) > 1) {
res = SSL_TLSEXT_ERR_NOACK;