mirleft / ocaml-x509

X509 (RFC5280) handling in OCaml
BSD 2-Clause "Simplified" License
52 stars 33 forks source link

Add cs_of_distinguished_name #87

Closed reynir closed 8 years ago

reynir commented 8 years ago

This adds X509.Encoding.cs_of_cert_subject which is required for https://github.com/mirleft/ocaml-tls/pull/332

reynir commented 8 years ago

The name cs_of_cert_subject is a bit misleading - It does not take a cert subject as argument. Is subject_cs_of_cert perhaps better?

hannesm commented 8 years ago

what about cs_of_distinguished_name : distinguished_name -> Cstruct.t (you can extract with subject : cert -> distinguished_name the subject from a cert, and cs_of_distinguished_name might be useful in other contexts as well!?!?

reynir commented 8 years ago

Great! I didn't realize the type of Asn_grammars.Name.name_to_cstruct is exactly distinguished_name -> Cstruct.t. I will update later today.

hannesm commented 8 years ago

could you please squash the commits into a single one? (and i'm off for sleep + transrussian flight, don't expect activity from me within the next 36 hours)

hannesm commented 8 years ago

thanks!