'Test that verifying a valid private key works.'

def test_verifyValidPrivateKey(self):

    blob = keys.Key.fromString(keydata.publicRSA_openssh).blob()
    packet = (((((NS('foo') + NS('none')) + NS('publickey')) + '\x00') + NS('ssh-rsa')) + NS(blob))
    d = self.authServer.ssh_USERAUTH_REQUEST(packet)
    def check(ignored):
        self.assertEqual(self.authServer.transport.packets, [(userauth.MSG_USERAUTH_PK_OK, (NS('ssh-rsa') + NS(blob)))])
    return d.addCallback(check)
