summaryrefslogtreecommitdiff
path: root/hgsshsign/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'hgsshsign/__init__.py')
-rw-r--r--hgsshsign/__init__.py17
1 files changed, 5 insertions, 12 deletions
diff --git a/hgsshsign/__init__.py b/hgsshsign/__init__.py
index 7b3f488..7134ca9 100644
--- a/hgsshsign/__init__.py
+++ b/hgsshsign/__init__.py
@@ -5,27 +5,21 @@ SSH Key Signing
5@author: Mike Crute (mcrute@ag.com) 5@author: Mike Crute (mcrute@ag.com)
6@organization: American Greetings Interactive 6@organization: American Greetings Interactive
7@date: May 03, 2010 7@date: May 03, 2010
8
9Commands to sign and verify revisions with your
10ssh key.
11
12Ponder this, bitches:
13 http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/ssh-rsa.c
14 http://svn.osafoundation.org/m2crypto/trunk/SWIG/_rsa.i
15""" 8"""
16 9
17__version__ = "0.0.1dev" 10__version__ = "0.0.1dev"
18 11
19 12
13import os
14import binascii
15
20import keys 16import keys
21from keymanifest import KeyManifest 17from keymanifest import KeyManifest
22from structutils import bytes_to_int
23from sshagent import SSHAgent 18from sshagent import SSHAgent
24 19
25import os, tempfile, binascii 20from mercurial.i18n import _
26from mercurial import util, commands, match 21from mercurial import util, commands, match
27from mercurial import node as hgnode 22from mercurial import node as hgnode
28from mercurial.i18n import _
29 23
30 24
31class SSHAuthority(object): 25class SSHAuthority(object):
@@ -68,7 +62,7 @@ class SSHAuthority(object):
68 return key.verify(data, signature) 62 return key.verify(data, signature)
69 63
70 def sign(self, data): 64 def sign(self, data):
71 return self.private_key.sign(data) 65 return keys.sign_like_agent(data, self.private_key)
72 66
73 67
74def node2txt(repo, node, ver): 68def node2txt(repo, node, ver):
@@ -167,4 +161,3 @@ cmdtable = {
167 ] + commands.commitopts2, 161 ] + commands.commitopts2,
168 _('hg sign [OPTION]... [REVISION]...')), 162 _('hg sign [OPTION]... [REVISION]...')),
169} 163}
170