From fb4f3d00291634a28299de3016974d15f7512ea9 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 4 Mar 2021 14:32:07 -0500 Subject: [PATCH] Avoid unwrap() in llcrypto. --- tor-llcrypto/src/pk/rsa.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tor-llcrypto/src/pk/rsa.rs b/tor-llcrypto/src/pk/rsa.rs index 72e35af3d..26d78e556 100644 --- a/tor-llcrypto/src/pk/rsa.rs +++ b/tor-llcrypto/src/pk/rsa.rs @@ -223,7 +223,7 @@ impl PublicKey { } let asn1 = ASN1Block::Sequence(0, vec![to_asn1_int(self.0.n()), to_asn1_int(self.0.e())]); - simple_asn1::to_der(&asn1).unwrap() + simple_asn1::to_der(&asn1).expect("RSA key not encodeable as DER") } /// Compute the RSAIdentity for this public key.