From 73a97befcbe0fae1ba55b0198b7a4fd382bea0c2 Mon Sep 17 00:00:00 2001 From: Brian Hession Date: Wed, 25 Oct 2023 14:14:45 -0400 Subject: [PATCH] cleaned up some repetitive code and found a nonce generation bug --- x509-ocsp/src/ext.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/x509-ocsp/src/ext.rs b/x509-ocsp/src/ext.rs index 63eeeb63a..3a6fb413e 100644 --- a/x509-ocsp/src/ext.rs +++ b/x509-ocsp/src/ext.rs @@ -75,6 +75,7 @@ impl Nonce { rng.fill_bytes(&mut random); bytes.extend_from_slice(&random); } + bytes.resize(length, 0); Ok(Self(OctetString::new(bytes)?)) } }