gpg: export git-gpg wrapper
should be used as 'gpg.program' in .git/config
This commit is contained in:
1
setup.py
1
setup.py
@@ -31,5 +31,6 @@ setup(
|
||||
'trezor-agent = trezor_agent.__main__:run_agent',
|
||||
'trezor-git = trezor_agent.__main__:run_git',
|
||||
'trezor-gpg = trezor_agent.gpg.signer:main',
|
||||
'trezor-git-gpg-wrapper = trezor_agent.gpg.git_wrapper:main',
|
||||
]},
|
||||
)
|
||||
|
||||
@@ -17,9 +17,11 @@ def main():
|
||||
if '--verify' in args:
|
||||
return sp.call(['gpg2'] + args)
|
||||
else:
|
||||
command, user_id = args
|
||||
command = args[0]
|
||||
user_id = ' '.join(args[1:])
|
||||
assert command == '-bsau' # --detach-sign --sign --armor --local-user
|
||||
s = signer.load_from_gpg(user_id)
|
||||
pubkey = signer.load_from_gpg(user_id)
|
||||
s = signer.Signer.from_public_key(user_id=user_id, pubkey=pubkey)
|
||||
|
||||
data = sys.stdin.read()
|
||||
sig = s.sign(data)
|
||||
Reference in New Issue
Block a user