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

Adding bindings for X509_digest #65

Closed
schubev opened this issue Jan 1, 2021 · 2 comments
Closed

Adding bindings for X509_digest #65

schubev opened this issue Jan 1, 2021 · 2 comments

Comments

@schubev
Copy link
Contributor

schubev commented Jan 1, 2021

I wish to use ocaml-ssl as part of a piece of server software in which clients connect using client certificates. The server should be able to remember said certificates and it would be quite handy to be able to do that by just saving certificate fingerprints. Unfortunately there currently aren’t any bindings for the X509_digest function which would give me said fingerprint.

Would a pull-request be welcome? I am willing and able to submit one.

As per my use case I would add something along these lines:

(* See EVP_sha1, EVP_sha256 and EVP_sha384 *)
type evp = [`SHA1 | `SHA256 | `SHA384]

(* The string would contain binary data, as opposed to hex or base64. *)
val digest : evp -> certificate -> string
@smimram
Copy link
Member

smimram commented Jan 5, 2021

Yes, such a PR would be very welcome!

@schubev
Copy link
Contributor Author

schubev commented Jan 5, 2021

I opened #66.

@smimram smimram closed this as completed in f8fc490 Feb 1, 2021
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