Lines Matching refs:server_key
505 Key *host_key, *server_key; in ssh_kex() local
523 if ((server_key = key_new(KEY_RSA1)) == NULL) in ssh_kex()
526 packet_get_bignum(server_key->rsa->e); in ssh_kex()
527 packet_get_bignum(server_key->rsa->n); in ssh_kex()
529 rbits = BN_num_bits(server_key->rsa->n); in ssh_kex()
558 BN_num_bits(server_key->rsa->n), BN_num_bits(host_key->rsa->n)); in ssh_kex()
565 derive_ssh1_session_id(host_key->rsa->n, server_key->rsa->n, cookie, session_id); in ssh_kex()
600 if (BN_cmp(server_key->rsa->n, host_key->rsa->n) < 0) { in ssh_kex()
603 BN_num_bits(server_key->rsa->n) + SSH_KEY_BITS_RESERVED) { in ssh_kex()
607 BN_num_bits(server_key->rsa->n), in ssh_kex()
610 if (rsa_public_encrypt(key, key, server_key->rsa) != 0 || in ssh_kex()
615 if (BN_num_bits(server_key->rsa->n) < in ssh_kex()
619 BN_num_bits(server_key->rsa->n), in ssh_kex()
624 rsa_public_encrypt(key, key, server_key->rsa) != 0) in ssh_kex()
629 key_free(server_key); in ssh_kex()