mirror of
https://github.com/fromchat-messenger/web.git
synced 2026-09-22 19:15:08 +03:00
Restructure compliance tools
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
FromChat compliance decryption tool entrypoint.
|
||||
|
||||
Run:
|
||||
python scripts/compliance-decryption/main.py <command> ...
|
||||
python scripts/compliance/decryption/main.py <command> ...
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
+1
-1
@@ -8,7 +8,7 @@ def assets_source_dir() -> Path:
|
||||
Directory that stores static templates (css/js) for report generation.
|
||||
|
||||
Layout:
|
||||
scripts/compliance-decryption/
|
||||
scripts/compliance/decryption/
|
||||
main.py
|
||||
assets/
|
||||
report.css
|
||||
@@ -7,7 +7,7 @@ The private key should be stored offline on an air-gapped machine.
|
||||
Only the public key is provided to the messaging service via COMPLIANCE_PUBLIC_KEY env var.
|
||||
|
||||
Usage:
|
||||
python3 scripts/generate_compliance_keypair.py
|
||||
python3 scripts/compliance/keypair.py
|
||||
|
||||
Output:
|
||||
- Prints the keypair to console
|
||||
@@ -129,7 +129,7 @@ CONFIGURATION:
|
||||
# Handle file saving
|
||||
if args.save:
|
||||
script_dir = Path(__file__).parent
|
||||
project_root = script_dir.parent
|
||||
project_root = script_dir.parent.parent
|
||||
output_file = project_root / "compliance_keypair.txt"
|
||||
|
||||
full_output = f"""COMPLIANCE SYSTEM X25519 KEYPAIR
|
||||
Binary file not shown.
@@ -169,7 +169,7 @@ _do_backup_copy() {
|
||||
run_gen_compliance() {
|
||||
local tmp
|
||||
tmp="$(mktemp "${TMPDIR:-/tmp}/fromchat-compliance.XXXXXX")"
|
||||
"$VENV_PY" scripts/generate_compliance_keypair.py --emit-key-lines </dev/null >"$tmp"
|
||||
"$VENV_PY" scripts/compliance/keypair.py --emit-key-lines </dev/null >"$tmp"
|
||||
{
|
||||
IFS= read -r _COMPLIANCE_PRIVATE_B64
|
||||
IFS= read -r _COMPLIANCE_PUBLIC_B64
|
||||
|
||||
Reference in New Issue
Block a user