gpg: rename gpg.device into gpg.client

nistp521
Roman Zeyde 8 years ago
parent c2158947c8
commit e74b9c77af
No known key found for this signature in database
GPG Key ID: 87CAE5FA46917CBB

@ -10,7 +10,7 @@ import time
import semver
from . import agent, decode, device, encode, keyring, protocol
from . import agent, decode, client, encode, keyring, protocol
from .. import formats, server, util
log = logging.getLogger(__name__)
@ -29,8 +29,7 @@ def run_create(args):
log.warning('NOTE: in order to re-generate the exact same GPG key later, '
'run this command with "--time=%d" commandline flag (to set '
'the timestamp of the GPG key manually).', args.time)
d = device.HardwareSigner(user_id=args.user_id,
curve_name=args.ecdsa_curve)
d = client.Client(user_id=args.user_id, curve_name=args.ecdsa_curve)
verifying_key = d.pubkey(ecdh=False)
decryption_key = d.pubkey(ecdh=True)

@ -2,7 +2,7 @@
import binascii
import logging
from . import decode, device, keyring, protocol
from . import decode, client, keyring, protocol
from .. import util
log = logging.getLogger(__name__)
@ -51,7 +51,7 @@ def open_connection(keygrip_bytes):
curve_name = protocol.get_curve_name_by_oid(pubkey_dict['curve_oid'])
ecdh = (pubkey_dict['algo'] == protocol.ECDH_ALGO_ID)
conn = device.HardwareSigner(user_id, curve_name=curve_name)
conn = client.Client(user_id, curve_name=curve_name)
pubkey = protocol.PublicKey(
curve_name=curve_name, created=pubkey_dict['created'],
verifying_key=conn.pubkey(ecdh=ecdh), ecdh=ecdh)

@ -7,7 +7,7 @@ from .. import device, formats, util
log = logging.getLogger(__name__)
class HardwareSigner(object):
class Client(object):
"""Sign messages and get public keys from a hardware device."""
def __init__(self, user_id, curve_name):
Loading…
Cancel
Save