| 479 |
HMAC_SHA2_512_EtM, |
HMAC_SHA2_512_EtM, |
| 480 |
HMAC_UNKNOWN, |
HMAC_UNKNOWN, |
| 481 |
HMAC_MAX = HMAC_UNKNOWN, |
HMAC_MAX = HMAC_UNKNOWN, |
| 482 |
} hmac_type; |
} SSH2MacId; |
| 483 |
|
|
| 484 |
typedef struct ssh2_mac { |
typedef struct ssh2_mac { |
| 485 |
hmac_type type; |
SSH2MacId id; |
| 486 |
char *name; |
char *name; |
| 487 |
const EVP_MD *(*evp_md)(void); |
const EVP_MD *(*evp_md)(void); |
| 488 |
int truncatebits; |
int truncatebits; |
| 489 |
int etm; |
int etm; |
| 490 |
} ssh2_mac_t; |
} SSH2Mac; |
| 491 |
|
|
| 492 |
static ssh2_mac_t ssh2_macs[] = { |
static SSH2Mac ssh2_macs[] = { |
| 493 |
{HMAC_SHA1, "hmac-sha1", EVP_sha1, 0, 0}, // RFC4253 |
{HMAC_SHA1, "hmac-sha1", EVP_sha1, 0, 0}, // RFC4253 |
| 494 |
{HMAC_MD5, "hmac-md5", EVP_md5, 0, 0}, // RFC4253 |
{HMAC_MD5, "hmac-md5", EVP_md5, 0, 0}, // RFC4253 |
| 495 |
{HMAC_SHA1_96, "hmac-sha1-96", EVP_sha1, 96, 0}, // RFC4253 |
{HMAC_SHA1_96, "hmac-sha1-96", EVP_sha1, 96, 0}, // RFC4253 |
| 781 |
char* get_kex_algorithm_name(kex_algorithm kextype); |
char* get_kex_algorithm_name(kex_algorithm kextype); |
| 782 |
const EVP_CIPHER* get_cipher_EVP_CIPHER(SSH2Cipher *cipher); |
const EVP_CIPHER* get_cipher_EVP_CIPHER(SSH2Cipher *cipher); |
| 783 |
const EVP_MD* get_kex_algorithm_EVP_MD(kex_algorithm kextype); |
const EVP_MD* get_kex_algorithm_EVP_MD(kex_algorithm kextype); |
| 784 |
char* get_ssh2_mac_name(hmac_type type); |
SSH2Mac *get_ssh2_mac(SSH2MacId id); |
| 785 |
const EVP_MD* get_ssh2_mac_EVP_MD(hmac_type type); |
char* get_ssh2_mac_name(SSH2Mac *mac); |
| 786 |
int get_ssh2_mac_truncatebits(hmac_type type); |
char* get_ssh2_mac_name_by_id(SSH2MacId id); |
| 787 |
|
const EVP_MD* get_ssh2_mac_EVP_MD(SSH2Mac *mac); |
| 788 |
|
int get_ssh2_mac_truncatebits(SSH2Mac *mac); |
| 789 |
char* get_ssh2_comp_name(compression_type type); |
char* get_ssh2_comp_name(compression_type type); |
| 790 |
char* get_ssh_keytype_name(ssh_keytype type); |
char* get_ssh_keytype_name(ssh_keytype type); |
| 791 |
char* get_digest_algorithm_name(digest_algorithm id); |
char* get_digest_algorithm_name(digest_algorithm id); |