This repository has been archived on 2026-10-10. You can view files and clone it, but cannot push or open issues or pull requests.
molotov/crates/molotov-bootstrap/tests/apk_test.rs

15 lines
669 B
Rust

// SPDX-License-Identifier: GPL-3.0-or-later
use molotov_bootstrap::apk::{ApkExtractor, ROBLOX_CERT_FINGERPRINT};
#[test]
fn test_verify_cert_fingerprint_mismatch() {
let dummy_fingerprint = "00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff:00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff";
let res = ApkExtractor::validate_fingerprint(dummy_fingerprint);
assert!(res.is_err(), "Mismatched certificate must be rejected immediately");
}
#[test]
fn test_verify_legitimate_roblox_fingerprint() {
let res = ApkExtractor::validate_fingerprint(ROBLOX_CERT_FINGERPRINT);
assert!(res.is_ok(), "Roblox official certificate fingerprint must be accepted");
}