15 lines
386 B
Python
15 lines
386 B
Python
import subprocess
|
|
import os
|
|
from pathlib import Path
|
|
|
|
from config import load_config
|
|
|
|
GPGDIR = os.path.expanduser(load_config()["gpg_dir"])
|
|
|
|
def verify_sig(pkg_path: Path, sig_path: Path) -> bool:
|
|
result = subprocess.run([
|
|
"gpg",
|
|
"--homedir", str(GPGDIR),
|
|
"--verify", str(sig_path), str(pkg_path)
|
|
], capture_output=True)
|
|
return result.returncode == 0 |