Support ALPN.
[openssl.git] / ssl / ssl3.h
index d2a5208824933baca05a0163809d017f6dc6cbcf..05317005dec9a36405ad869d806d3ac06c14be98 100644 (file)
@@ -571,7 +571,26 @@ typedef struct ssl3_state_st
         * server echoed our server_authz extension and therefore must send us
         * a supplemental data handshake message. */
        char tlsext_authz_server_promised;
-#endif
+
+       /* tlsext_custom_types contains an array of TLS Extension types which 
+        * were advertised by the client in its ClientHello, which were not 
+        * otherwise handled by OpenSSL, and which the server has registered
+        * a custom_srv_ext_record to handle.
+        * The array does not contain any duplicates, and is in the same order
+        * as the types were received in the client hello. */
+       unsigned short *tlsext_custom_types;
+       size_t tlsext_custom_types_count; /* how many tlsext_custom_types */
+
+       /* ALPN information
+        * (we are in the process of transitioning from NPN to ALPN.) */
+
+       /* In a server these point to the selected ALPN protocol after the
+        * ClientHello has been processed. In a client these contain the
+        * protocol that the server selected once the ServerHello has been
+        * processed. */
+       unsigned char *alpn_selected;
+       unsigned alpn_selected_len;
+#endif /* OPENSSL_NO_TLSEXT */
        } SSL3_STATE;
 
 #endif