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.