ci: proper Rust+Python CI workflow; cargo fmt + clippy clean
Replace the stale Django CI template with a CI workflow that builds and tests both codebases: cargo fmt/clippy/build/test for the hh client and pytest across Python 3.10-3.12 for the server. Apply cargo fmt and fix all clippy lints so the gates pass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+5
-7
@@ -133,11 +133,7 @@ impl SrpClient {
|
||||
|
||||
/// Process the server challenge (salt, B). Returns (M, K, H_AMK_expected).
|
||||
/// `M` is sent to the server; `h_amk` is compared to the server's reply.
|
||||
pub fn process_challenge(
|
||||
&self,
|
||||
salt: &[u8],
|
||||
b_bytes: &[u8],
|
||||
) -> anyhow::Result<Challenge> {
|
||||
pub fn process_challenge(&self, salt: &[u8], b_bytes: &[u8]) -> anyhow::Result<Challenge> {
|
||||
let n = &self.n;
|
||||
let width = long_to_bytes(n).len();
|
||||
let big_b = bytes_to_long(b_bytes);
|
||||
@@ -218,7 +214,7 @@ mod tests {
|
||||
|
||||
fn a_bytes() -> Vec<u8> {
|
||||
let mut v = vec![0x80u8];
|
||||
v.extend(std::iter::repeat(0x22u8).take(31));
|
||||
v.extend(std::iter::repeat_n(0x22u8, 31));
|
||||
v
|
||||
}
|
||||
|
||||
@@ -245,7 +241,9 @@ mod fernet_interop {
|
||||
#[test]
|
||||
fn rust_decrypts_python_fernet() {
|
||||
let f = fernet::Fernet::new(KEY).unwrap();
|
||||
let pt = f.decrypt(TOK).expect("rust must decrypt python fernet token");
|
||||
let pt = f
|
||||
.decrypt(TOK)
|
||||
.expect("rust must decrypt python fernet token");
|
||||
assert_eq!(pt, b"hello from python fernet");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user