gpg: export git-gpg wrapper
should be used as 'gpg.program' in .git/config
This commit is contained in:
parent
0c94363595
commit
6cc3a629a8
1
setup.py
1
setup.py
@ -31,5 +31,6 @@ setup(
|
|||||||
'trezor-agent = trezor_agent.__main__:run_agent',
|
'trezor-agent = trezor_agent.__main__:run_agent',
|
||||||
'trezor-git = trezor_agent.__main__:run_git',
|
'trezor-git = trezor_agent.__main__:run_git',
|
||||||
'trezor-gpg = trezor_agent.gpg.signer:main',
|
'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:
|
if '--verify' in args:
|
||||||
return sp.call(['gpg2'] + args)
|
return sp.call(['gpg2'] + args)
|
||||||
else:
|
else:
|
||||||
command, user_id = args
|
command = args[0]
|
||||||
|
user_id = ' '.join(args[1:])
|
||||||
assert command == '-bsau' # --detach-sign --sign --armor --local-user
|
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()
|
data = sys.stdin.read()
|
||||||
sig = s.sign(data)
|
sig = s.sign(data)
|
Loading…
Reference in New Issue
Block a user