Skip to content

Commit 5c0b14d

Browse files
committed
Merge branch 'master' into 'prod'
v0.1.1 See merge request huangjj27/tls_sig_api!10
2 parents 3bbefc5 + 318c891 commit 5c0b14d

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tls_sig_api"
3-
version = "0.1.1-rc.2"
3+
version = "0.1.1"
44
authors = ["huangjj27 <huangjj.27@qq.com>"]
55
edition = "2018"
66
license = "MIT"

src/lib.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ impl TlsSigApiVer2 {
2020
}
2121
}
2222

23+
pub fn appid(&self) -> u64 {
24+
self.sdkappid
25+
}
26+
2327
/// In case that the key is leaked, we want to update the key at runtime.
2428
pub fn update_key(&mut self, key: &str) {
2529
self.secret = key.to_string();
@@ -132,6 +136,12 @@ mod test {
132136
let _ = env_logger::builder().is_test(true).try_init();
133137
}
134138

139+
#[test]
140+
fn test_get_appid() {
141+
let signer = TlsSigApiVer2::new(MOCK_APPID, "");
142+
assert_eq!(signer.appid(), MOCK_APPID);
143+
}
144+
135145
#[test]
136146
fn test_update_key() {
137147
let mut signer = TlsSigApiVer2::new(MOCK_APPID, "");

0 commit comments

Comments
 (0)