GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — crypto: make ALPN the same for OpenSSL 1.0.2 & 1.1.0 · nodejs/node@a5e7255

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • node_crypto.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/node_crypto.cc‎

Copy file name to clipboardExpand all lines: src/node_crypto.cc
+6-14Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2509,20 +2509,12 @@ int SSLWrap<Base>::SelectALPNCallback(SSL* s,
25092509
unsigned alpn_protos_len = Buffer::Length(alpn_buffer);
25102510
int status = SSL_select_next_proto(const_cast<unsigned char**>(out), outlen,
25112511
alpn_protos, alpn_protos_len, in, inlen);
2512-
2513-
switch (status) {
2514-
case OPENSSL_NPN_NO_OVERLAP:
2515-
// According to 3.2. Protocol Selection of RFC7301,
2516-
// fatal no_application_protocol alert shall be sent
2517-
// but current openssl does not support it yet. See
2518-
// https://rt.openssl.org/Ticket/Display.html?id=3463&user=guest&pass=guest
2519-
// Instead, we send a warning alert for now.
2520-
return SSL_TLSEXT_ERR_ALERT_WARNING;
2521-
case OPENSSL_NPN_NEGOTIATED:
2522-
return SSL_TLSEXT_ERR_OK;
2523-
default:
2524-
return SSL_TLSEXT_ERR_ALERT_FATAL;
2525-
}
2512+
// According to 3.2. Protocol Selection of RFC7301, fatal
2513+
// no_application_protocol alert shall be sent but OpenSSL 1.0.2 does not
2514+
// support it yet. See
2515+
// https://rt.openssl.org/Ticket/Display.html?id=3463&user=guest&pass=guest
2516+
return status == OPENSSL_NPN_NEGOTIATED ? SSL_TLSEXT_ERR_OK
2517+
: SSL_TLSEXT_ERR_NOACK;
25262518
}
25272519
#endif // TLSEXT_TYPE_application_layer_protocol_negotiation
25282520

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.