fix: aws signer does not throw error on unnormalized sig (#1099)

* fix: reverts aws signer fix around sig normalization

* chore: update changelog
This commit is contained in:
Luke Tchang 2022-03-31 10:04:28 -07:00 committed by GitHub
parent f402f134a3
commit b3679fe113
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -4,6 +4,7 @@
### Unreleased ### Unreleased
- Fix aws signer bug which maps un-normalized signature to error if no normalization occurs (in `aws::utils::decode_signature`)
- `Transaction::from` will default to `Address::zero()`. Add `recover_from` and - `Transaction::from` will default to `Address::zero()`. Add `recover_from` and
`recover_from_mut` methods for recovering the sender from signature, and also `recover_from_mut` methods for recovering the sender from signature, and also
setting the same on tx [1075](https://github.com/gakonst/ethers-rs/pull/1075). setting the same on tx [1075](https://github.com/gakonst/ethers-rs/pull/1075).

View File

@ -93,8 +93,6 @@ pub(super) fn decode_signature(resp: SignResponse) -> Result<KSig, AwsSignerErro
.signature .signature
.ok_or_else(|| AwsSignerError::from("Signature not found in response".to_owned()))?; .ok_or_else(|| AwsSignerError::from("Signature not found in response".to_owned()))?;
let sig = KSig::from_der(&raw)? let sig = KSig::from_der(&raw)?;
.normalize_s() Ok(sig.normalize_s().unwrap_or(sig))
.ok_or_else(|| AwsSignerError::from("Could not normalize `s`".to_owned()))?;
Ok(sig)
} }