Skip to content

Commit

Permalink
Merge pull request #87 from cryptape/bump-to-0.19.2
Browse files Browse the repository at this point in the history
Bump to 0.19.2
  • Loading branch information
TheWaWaR authored Oct 30, 2018
2 parents 2daa7c5 + 539e336 commit cbbd252
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cita-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cita-cli"
version = "0.19.1"
version = "0.19.2"
authors = ["piaoliu <[email protected]>", "Qian Linfeng <[email protected]>"]
build = "build.rs"

Expand Down
2 changes: 1 addition & 1 deletion cita-cli/src/interactive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ impl GlobalConfig {
}

pub fn set_url(&mut self, value: String) {
if value.starts_with("http") {
if value.starts_with("http://") || value.starts_with("https://") {
self.url = value;
} else {
self.url = "http://".to_owned() + &value;
Expand Down
2 changes: 1 addition & 1 deletion cita-tool/src/crypto/cita_ed25519.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl Ed25519Signature {
if !is_valid {
Err(Error::InvalidSignature)
} else {
Ok(Ed25519PubKey::from_slice(&pubkey))
Ok(Ed25519PubKey::from(&*pubkey))
}
}

Expand Down
10 changes: 5 additions & 5 deletions cita-tool/src/crypto/cita_secp256k1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,19 @@ impl Secp256k1Signature {

/// Check if this is a "low" signature.
pub fn is_low_s(&self) -> bool {
H256::from_slice(self.s())
H256::from(self.s())
<= "7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0".into()
}

/// Check if each component of the signature is in range.
pub fn is_valid(&self) -> bool {
self.v() <= 1
&& H256::from_slice(self.r())
&& H256::from(self.r())
< "fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141".into()
&& H256::from_slice(self.r()) >= 1.into()
&& H256::from_slice(self.s())
&& H256::from(self.r()) >= 1.into()
&& H256::from(self.s())
< "fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141".into()
&& H256::from_slice(self.s()) >= 1.into()
&& H256::from(self.s()) >= 1.into()
}

/// Recover public key
Expand Down

0 comments on commit cbbd252

Please sign in to comment.