-
Notifications
You must be signed in to change notification settings - Fork 48
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
Implement verification functions #71
Conversation
@smimram Any chance I can get this reviewed? |
This is really desirable for platforms where the certs are outdated. |
but @Firgeis I think you need to separate the branch there is additional commits besides of the ones mentioned by the PR |
You are right @EduardoRFS, but I think it is worth including and doesn't conflict with the others. |
I've been using this branch in Piaf and it's been working well. Would appreciate a review here and potentially a release. |
CHANGES: - Add a few verification functions (savonet/ocaml-ssl#71): - `add_extra_chain_cert` to send additional chain certificates to the peer. - `add_cert_to_store`: to allow verification of the peer certificate CA. - `set_ip`: sets the expected IP address to be verified on a SSL socket. - Improve `use_certificate_from_string` (savonet/ocaml-ssl#71) to read any type of key (rather than just RSA). - Fix a segmentation fault in the ALPN selection callback under OCaml 5 (savonet/ocaml-ssl#89). - Audit the C FFI and add `CAMLparamX` and `CAMLreturn` calls (savonet/ocaml-ssl#90).
Adds a pair of verification functions that accept a parsed PEM certificate.
add_extra_chain_cert to send additional chain certs to the peer.
add_cert_to_store to allow verification of the peer certificate CA. This function combines libssl SSL_CTX_get_cert_store and X509_STORE_add_cert so as not to expose the internal store unnecessarily.
Also improves use_certificate_from_string to read any type of key instead of just RSA