Trim leading zeros in serial number

This commit is contained in:
nab138
2026-02-13 09:04:28 -05:00
parent 59985f9b92
commit c49e07f2ff

View File

@@ -62,7 +62,8 @@ impl CertificateIdentity {
} }
pub fn get_serial_number(&self) -> String { pub fn get_serial_number(&self) -> String {
self.certificate.serial_number_asn1().encode_hex() let serial: String = self.certificate.serial_number_asn1().encode_hex();
serial.trim_start_matches('0').to_string()
} }
pub async fn retrieve( pub async fn retrieve(