agent: raise explicit error when signature fails
This commit is contained in:
parent
9888ef971a
commit
695079e4b9
@ -123,10 +123,11 @@ def sign(sock, keygrip, digest):
|
|||||||
line = _unescape(line)
|
line = _unescape(line)
|
||||||
log.debug('line: %r', line)
|
log.debug('line: %r', line)
|
||||||
prefix, sig = line.split(' ', 1)
|
prefix, sig = line.split(' ', 1)
|
||||||
assert prefix == 'D'
|
if prefix != 'D':
|
||||||
|
raise ValueError(line)
|
||||||
|
|
||||||
sig, leftover = _parse(sig)
|
sig, leftover = _parse(sig)
|
||||||
assert not leftover
|
assert not leftover, leftover
|
||||||
return _parse_sig(sig)
|
return _parse_sig(sig)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user