version 1.12, 2000/10/11 20:27:23 |
version 1.13, 2000/11/12 19:50:37 |
|
|
#include <openssl/pem.h> |
#include <openssl/pem.h> |
|
|
#include "kex.h" |
#include "kex.h" |
|
#include "key.h" |
|
|
#define KEX_COOKIE_LEN 16 |
#define KEX_COOKIE_LEN 16 |
|
|
|
|
void |
void |
choose_hostkeyalg(Kex *k, char *client, char *server) |
choose_hostkeyalg(Kex *k, char *client, char *server) |
{ |
{ |
k->hostkeyalg = get_match(client, server); |
char *hostkeyalg = get_match(client, server); |
if (k->hostkeyalg == NULL) |
if (hostkeyalg == NULL) |
fatal("no hostkey alg"); |
fatal("no hostkey alg"); |
if (strcmp(k->hostkeyalg, KEX_DSS) != 0) |
k->hostkey_type = key_type_from_name(hostkeyalg); |
fatal("bad hostkey alg %s", k->hostkeyalg); |
if (k->hostkey_type == KEY_UNSPEC) |
|
fatal("bad hostkey alg '%s'", hostkeyalg); |
} |
} |
|
|
Kex * |
Kex * |