Skip to content

Commit b971254

Browse files
authored
Fix EC point-at-infinity key loading raising InternalError on AWS-LC (#14652)
1 parent 1c514ef commit b971254

File tree

1 file changed

+2
-1
lines changed
  • src/rust/cryptography-key-parsing/src

1 file changed

+2
-1
lines changed

src/rust/cryptography-key-parsing/src/spki.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ pub fn parse_public_key(data: &[u8]) -> KeyParsingResult<ParsedPublicKey> {
2222
&mut bn_ctx,
2323
)
2424
.map_err(|_| KeyParsingError::InvalidKey)?;
25-
let ec_key = openssl::ec::EcKey::from_public_key(&group, &ec_point)?;
25+
let ec_key = openssl::ec::EcKey::from_public_key(&group, &ec_point)
26+
.map_err(|_| KeyParsingError::InvalidKey)?;
2627
let pkey = openssl::pkey::PKey::from_ec_key(ec_key)?;
2728
Ok(ParsedPublicKey::Pkey(pkey))
2829
}

0 commit comments

Comments
 (0)