Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALPN extension support? #37

Closed
bobbypriam opened this issue Jun 14, 2018 · 2 comments
Closed

ALPN extension support? #37

bobbypriam opened this issue Jun 14, 2018 · 2 comments

Comments

@bobbypriam
Copy link
Contributor

Hi there, I'm wondering if there is interest in ALPN support for ssl?

RFC: https://tools.ietf.org/html/rfc7301
Openssl doc: https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_alpn_select_cb.html

ALPN support is one of the requirements for supporting HTTP/2 in OCaml. I'm currently working on an implementation of it in ocaml-tls. I don't mind tackling this issue, but as I am new to writing C bindings in OCaml, I would love some pointers on how to start hacking.

Thanks!

@bobbypriam
Copy link
Contributor Author

In particular, I'm thinking of adding the following functions to the Ssl module:

(** Set the list of supported ALPN protocols for negotiation to the context. *)
val set_context_alpn_protos : context -> string list -> unit

(** Set the callback to allow server to select the preferred protocol from client's available protocols. *)
val set_context_alpn_select_callback : context -> (string list -> string option) -> unit

(** Set the list of supported ALPN protocols for negotiation to the connection. *)
val set_alpn_protos : socket -> string list -> unit

(** Get the negotiated protocol from the connection. *)
val get_negotiated_alpn_protocol : socket -> string option

@smimram
Copy link
Member

smimram commented Jun 14, 2018

Pull requests are welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants