aboutsummaryrefslogtreecommitdiff
path: root/lib/vtls
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-02-07 15:38:45 +0100
committerDaniel Stenberg <daniel@haxx.se>2014-02-07 15:38:45 +0100
commit09d907ee689538b5552411e31f8dc5e37b65e8d2 (patch)
tree1bee01eb93aa0dbf36e9583d3ed8526a775f9cbe /lib/vtls
parentf3a12460ad38e1cec32b039e8bbc66909d8832ec (diff)
nss: support pre-ALPN versions
Diffstat (limited to 'lib/vtls')
-rw-r--r--lib/vtls/nss.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/vtls/nss.c b/lib/vtls/nss.c
index 84e6d98d1..59cc769cf 100644
--- a/lib/vtls/nss.c
+++ b/lib/vtls/nss.c
@@ -632,21 +632,23 @@ static void HandshakeCallback(PRFileDesc *sock, void *arg)
case SSL_NEXT_PROTO_NO_OVERLAP:
infof(conn->data, "TLS, neither ALPN nor NPN succeeded\n");
return;
+#ifdef SSL_NEXT_PROTO_SELECTED
case SSL_NEXT_PROTO_SELECTED:
infof(conn->data, "ALPN, server accepted to use %.*s\n", buflen, buf);
break;
+#endif
case SSL_NEXT_PROTO_NEGOTIATED:
infof(conn->data, "NPN, server accepted to use %.*s\n", buflen, buf);
break;
}
if(buflen == NGHTTP2_PROTO_VERSION_ID_LEN &&
- memcmp(NGHTTP2_PROTO_VERSION_ID, buf, NGHTTP2_PROTO_VERSION_ID_LEN)
- == 0) {
+ memcmp(NGHTTP2_PROTO_VERSION_ID, buf, NGHTTP2_PROTO_VERSION_ID_LEN)
+ == 0) {
conn->negnpn = NPN_HTTP2_DRAFT09;
}
else if(buflen == ALPN_HTTP_1_1_LENGTH && memcmp(ALPN_HTTP_1_1, buf,
- ALPN_HTTP_1_1_LENGTH)) {
+ ALPN_HTTP_1_1_LENGTH)) {
conn->negnpn = NPN_HTTP1_1;
}
}