File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
anchor/common/ssv_types/src Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,8 @@ pub enum RsaParseError {
1111 #[ error( "Unable to convert decoded PEM data into a string: {0}" ) ]
1212 Utf8Conversion ( #[ from] std:: string:: FromUtf8Error ) ,
1313
14- #[ error( "Failed to parse RSA public key: {source}" ) ]
15- RsaParsing {
16- #[ source]
17- source : openssl:: error:: ErrorStack ,
18- } ,
14+ #[ error( "Failed to parse RSA public key: {0}" ) ]
15+ RsaParsing ( #[ from] openssl:: error:: ErrorStack ) ,
1916}
2017
2118// Parse from a RSA public key string into the associated RSA representation
@@ -35,8 +32,7 @@ pub fn parse_rsa(pem_data: &str) -> Result<Rsa<Public>, RsaParseError> {
3532 . replace ( "-----END RSA PUBLIC KEY-----" , "-----END PUBLIC KEY-----" ) ;
3633
3734 // Parse the PEM string into an RSA public key using PKCS8 format
38- let rsa_pubkey = Rsa :: public_key_from_pem ( pem_string. as_bytes ( ) )
39- . map_err ( |source| RsaParseError :: RsaParsing { source } ) ?;
35+ let rsa_pubkey = Rsa :: public_key_from_pem ( pem_string. as_bytes ( ) ) ?;
4036
4137 Ok ( rsa_pubkey)
4238}
You can’t perform that action at this time.
0 commit comments