Closed zoggy closed 6 years ago
The encoder and decoder for PEM-encoded certificates is within the X509.Encoding.Pem.Certificate
https://mirleft.github.io/ocaml-x509/doc/X509.Encoding.Pem.Certificate.html .
Now, it looks to me that of_pem_cstruct1
would suit your usecase rather well, after you Cstruct.of_string pem_cert
. Be aware that the decoding functions can raise an exception atm.
I guess this is just a matter of adding some existing functions of x509_pem to X509 interface ?
I don't understand what you propose exactly here.
Thanks for your quick answer. I did not known about Cstruct and so I thought there was something more to give to parse the string. So no need to add anything.
Hi,
I could not find a way to parse a certificate in pem format from a string (I want to access a certificate in a HTTP header, using apache proxy). I guess this is just a matter of adding some existing functions of x509_pem to X509 interface ?