Conversion from rustls certificate
AurelienFT opened this issue · 1 comments
AurelienFT commented
Hello,
I want to use a rustls certificate to build a SslContext
I found the method set_certificate
that take a X509Cert
but I don't find any way to set a rustls certificate.
I could write it as a temp file and then read it but it seems very suboptimal.
Thanks for reading my message and potentially answer it :)
inikulin commented
Rustls cert is just DER bytes (https://docs.rs/rustls/latest/rustls/struct.Certificate.html) and boring exposes https://docs.rs/boring/latest/boring/x509/struct.X509.html#method.from_der