From 2e662856e86aea51dffae2964e0f84b5a0e58f5c Mon Sep 17 00:00:00 2001 From: Emmanuel Bosquet Date: Mon, 15 Apr 2024 17:54:27 +0200 Subject: [PATCH] correct comments in sozu_command_lib::certificate --- command/src/certificate.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/src/certificate.rs b/command/src/certificate.rs index f99e6ecf3..03ef29d55 100644 --- a/command/src/certificate.rs +++ b/command/src/certificate.rs @@ -47,6 +47,7 @@ pub fn parse_pem(certificate: &[u8]) -> Result { Ok(pem) } +/// parse x509 certificate from PEM bytes pub fn parse_x509(pem_bytes: &[u8]) -> Result { parse_x509_certificate(pem_bytes) .map_err(|nom_e| CertificateError::ParseX509Certificate(nom_e.to_string())) @@ -56,7 +57,7 @@ pub fn parse_x509(pem_bytes: &[u8]) -> Result // ----------------------------------------------------------------------------- // get_cn_and_san_attributes -/// Retrieve from the pem (as bytes) the common name (a.k.a `CN`) and the +/// Retrieve from the x509 the common name (a.k.a `CN`) and the /// subject alternate names (a.k.a `SAN`) pub fn get_cn_and_san_attributes(x509: &X509Certificate) -> Vec { let mut names: Vec = Vec::new();