Implement ALPN client-side
diff --git a/include/polarssl/ssl.h b/include/polarssl/ssl.h
index e4a8dc7..aa5daf4 100644
--- a/include/polarssl/ssl.h
+++ b/include/polarssl/ssl.h
@@ -348,6 +348,8 @@
#define TLS_EXT_SIG_ALG 13
+#define TLS_EXT_ALPN 16
+
#define TLS_EXT_SESSION_TICKET 35
#define TLS_EXT_RENEGOTIATION_INFO 0xFF01
@@ -1247,8 +1249,10 @@
* \param ssl SSL context
* \param protos NULL-terminated list of supported protocols,
* in decreasing preference order.
+ *
+ * \return 0 on success, or POLARSSL_ERR_SSL_BAD_INPUT_DATA.
*/
-void ssl_set_alpn_protocols( ssl_context *ssl, const char **protos );
+int ssl_set_alpn_protocols( ssl_context *ssl, const char **protos );
/**
* \brief Get the name of the negotiated Application Layer Protocol.