'Test that private key authentication fails when the public key
is invalid.'

def test_failedPrivateKeyAuthenticationWithSignature(self):

    blob = keys.Key.fromString(keydata.publicRSA_openssh).blob()
    obj = keys.Key.fromString(keydata.privateRSA_openssh)
    packet = ((((((NS('foo') + NS('none')) + NS('publickey')) + '\xff') + NS('ssh-rsa')) + NS(blob)) + NS(obj.sign(blob)))
    self.authServer.transport.sessionID = 'test'
    d = self.authServer.ssh_USERAUTH_REQUEST(packet)
    return d.addCallback(self._checkFailed)
