tag.verify()
返回 SignatureResult:只有签名有效时 ok 才为 True,否则 status 说明原因(无签名、未安装 cryptography、无公钥、无 UID)。
result = tag.verify() # fully autonomous — finds the public key from the bundled DB
result.ok # True only for VALID
result.status # "valid" | "invalid" | "unsigned" | "no_crypto" | "no_key" | "no_uid"
str(result) # "VALID" | "INVALID" | "NOT SIGNED" | "NO CRYPTO — …" | "NO PUBLIC KEY — …" | "NO UID — …"
result.to_dict()# {"status": "valid", "ok": True, "detail": "…"}