aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPavlos Ratis <dastergon@gentoo.org>2014-07-30 20:17:37 +0300
committerPavlos Ratis <dastergon@gentoo.org>2014-07-30 20:17:37 +0300
commit10dd9249bb181f0cc7fbb289a56cd5bcf58ea784 (patch)
treeb6b0ef04498fa2c004f982b770e40238d5eb4080 /bin
parentMerge pull request #20 from gentoo/keyring (diff)
downloadgentoo-keys-10dd9249bb181f0cc7fbb289a56cd5bcf58ea784.tar.gz
gentoo-keys-10dd9249bb181f0cc7fbb289a56cd5bcf58ea784.tar.bz2
gentoo-keys-10dd9249bb181f0cc7fbb289a56cd5bcf58ea784.zip
add gkey-gen implementation (GLEP 63 openPGP key generator)
Developers and users are now able to create GLEP 63 based GPG keys
Diffstat (limited to 'bin')
-rwxr-xr-xbin/gkey-gen52
1 files changed, 52 insertions, 0 deletions
diff --git a/bin/gkey-gen b/bin/gkey-gen
new file mode 100755
index 0000000..5b8ba10
--- /dev/null
+++ b/bin/gkey-gen
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+'''Gentoo-keys is a gpg key manager for managing
+ gentoo's gpg-signing keys. It is these keys that are
+ used to verify and validate release media, etc..
+
+ Distributed under the terms of the GNU General Public License v2
+
+ Copyright:
+ (c) 2014 Pavlos Ratis
+ Distributed under the terms of the GNU General Public License v2
+
+ Author(s):
+ Pavlos Ratis <dastergon@gentoo.org>
+
+'''
+
+from __future__ import print_function
+
+import os
+import sys
+
+# This block ensures that ^C interrupts are handled quietly.
+try:
+ import signal
+
+ def exithandler(signum,frame):
+ signal.signal(signal.SIGINT, signal.SIG_IGN)
+ signal.signal(signal.SIGTERM, signal.SIG_IGN)
+ print()
+ sys.exit(1)
+
+ signal.signal(signal.SIGINT, exithandler)
+ signal.signal(signal.SIGTERM, exithandler)
+ signal.signal(signal.SIGPIPE, signal.SIG_DFL)
+
+except KeyboardInterrupt:
+ print()
+ sys.exit(1)
+
+
+from gkeygen.cli import Main
+
+root = None
+try:
+ root = os.environ['ROOT']
+except KeyError:
+ pass
+
+main = Main(root=root)
+main()