Last active
October 14, 2024 19:56
-
-
Save WinLinux1028/6debd8a7a316a19f81675c250fdbfd44 to your computer and use it in GitHub Desktop.
RFC4398 IPGP certificate generator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import base64 | |
args = sys.argv | |
if len(args) != 4 or "--help" in args or "-h" in args: | |
print("./" + args[0] + " " + "FINGERPRINT URL EMAIL_ADDRESS") | |
sys.exit() | |
f = bytes.fromhex(args[1]) | |
url = args[2].encode() | |
email = args[3] | |
cert = base64.b64encode(len(f).to_bytes() + f + url).decode() | |
domain = email.replace("@", ".") + "." | |
print(domain + " 3600 IN CERT 6 0 0 " + cert) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can test DNS CERT record by this command.
gpg -v --debug-level guru --debug-all --auto-key-locate cert --locate-external-keys EMAIL_ADDRESS