mirror of
https://github.com/xcat2/confluent.git
synced 2025-01-17 21:23:18 +00:00
Fix more usage mistakes
This commit is contained in:
parent
824253ae8c
commit
774d592eb4
@ -42,7 +42,8 @@ class HostKeyHandler(paramiko.client.MissingHostKeyPolicy):
|
||||
cfg[self.node]['pubkeys.addpolicy'] and
|
||||
cfg[self.node]['pubkeys.addpolicy']['value'] == 'manual'):
|
||||
raise cexc.PubkeyInvalid('New ssh key detected',
|
||||
key, fingerprint, 'pubkeys.ssh')
|
||||
key.asbytes(), fingerprint,
|
||||
'pubkeys.ssh')
|
||||
auditlog = log.Logger('audit')
|
||||
auditlog.log({'node': self.node, 'event': 'sshautoadd',
|
||||
'fingerprint': fingerprint})
|
||||
@ -51,8 +52,9 @@ class HostKeyHandler(paramiko.client.MissingHostKeyPolicy):
|
||||
return True
|
||||
elif cfg[self.node]['pubkeys.ssh']['value'] == fingerprint:
|
||||
return True
|
||||
raise cexc.PubKeyInvalid(
|
||||
'Mismatched SSH host key detected', key, fingerprint, 'pubkeys.ssh'
|
||||
raise cexc.PubkeyInvalid(
|
||||
'Mismatched SSH host key detected', key.asbytes(), fingerprint,
|
||||
'pubkeys.ssh'
|
||||
)
|
||||
|
||||
|
||||
|
@ -93,6 +93,6 @@ class TLSCertVerifier(object):
|
||||
return True
|
||||
elif storedprint[self.node][self.fieldname]['value'] == fingerprint:
|
||||
return True
|
||||
raise cexc.PubKeyInvalid(
|
||||
raise cexc.PubkeyInvalid(
|
||||
'Mismatched certificate detected', certificate, fingerprint,
|
||||
self.fieldname)
|
||||
|
Loading…
x
Reference in New Issue
Block a user