mirror of
https://github.com/romanz/amodem.git
synced 2026-04-21 22:06:27 +08:00
minor fixes
This commit is contained in:
@@ -188,7 +188,8 @@ class Signer(object):
|
|||||||
verifying_key=self.conn.pubkey())
|
verifying_key=self.conn.pubkey())
|
||||||
|
|
||||||
log.info('%s GPG public key %s created at %s', curve_name,
|
log.info('%s GPG public key %s created at %s', curve_name,
|
||||||
self.pubkey.hex_short_key_id(), util.time_format(self.pubkey.created))
|
self.pubkey.hex_short_key_id(),
|
||||||
|
util.time_format(self.pubkey.created))
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_public_key(cls, pubkey, user_id):
|
def from_public_key(cls, pubkey, user_id):
|
||||||
@@ -261,16 +262,14 @@ class Signer(object):
|
|||||||
subpacket(16, primary['key_id']), # issuer key id
|
subpacket(16, primary['key_id']), # issuer key id
|
||||||
subpacket(32, back_sign)]
|
subpacket(32, back_sign)]
|
||||||
|
|
||||||
_conn = self.conn
|
conn = AgentSigner(user_id, curve_name=formats.CURVE_NIST256)
|
||||||
self.conn = AgentSigner(user_id, curve_name=formats.CURVE_NIST256)
|
|
||||||
|
|
||||||
# Subkey Binding Signature
|
# Subkey Binding Signature
|
||||||
signature = _make_signature(pubkey=self.pubkey, conn=self.conn,
|
signature = _make_signature(pubkey=self.pubkey, conn=conn,
|
||||||
data_to_sign=data_to_sign,
|
data_to_sign=data_to_sign,
|
||||||
sig_type=0x18,
|
sig_type=0x18,
|
||||||
hashed_subpackets=hashed_subpackets,
|
hashed_subpackets=hashed_subpackets,
|
||||||
unhashed_subpackets=unhashed_subpackets)
|
unhashed_subpackets=unhashed_subpackets)
|
||||||
self.conn = _conn
|
|
||||||
|
|
||||||
sign_packet = packet(tag=2, blob=signature)
|
sign_packet = packet(tag=2, blob=signature)
|
||||||
return subkey_packet + sign_packet
|
return subkey_packet + sign_packet
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# NEVER RUN ON YOUR OWN REAL GPG KEYS!!!!! THEY WILL BE DELETED!!!!!
|
# NEVER RUN ON YOUR OWN REAL GPG KEYS!!!!! THEY WILL BE DELETED!!!!!
|
||||||
set -x -e -u
|
set -x -e -u
|
||||||
(cd ~/.gnupg && rm -rf openpgp-revocs.d/ private-keys-v1.d/ pubring.kbx* trustdb.gpg /tmp/log *.gpg; killall gpg-agent)
|
(cd ~/.gnupg && rm -rf openpgp-revocs.d/ private-keys-v1.d/ pubring.kbx* trustdb.gpg /tmp/log *.gpg; killall gpg-agent || true)
|
||||||
gpg2 --full-gen-key --expert
|
gpg2 --full-gen-key --expert
|
||||||
gpg2 --export > romanz.pub
|
gpg2 --export > romanz.pub
|
||||||
NOW=`date +%s`
|
NOW=`date +%s`
|
||||||
|
|||||||
Reference in New Issue
Block a user