1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-12 08:43:53 -05:00

Make lots more algorithm structures globally visible.

Previously, lots of individual ssh2_cipheralg structures were declared
static, and only available to the rest of the code via a smaller
number of 'ssh2_ciphers' objects that wrapped them into lists. But I'm
going to want to access individual ciphers directly in the testing
system I'm currently working on, so I'm giving all those objects
external linkage and declaring them in ssh.h.

Also, I've made up an entirely new one, namely exposing MD5 as an
instance of the general ssh_hashalg abstraction, which it has no need
to be for the purposes of actually using it in SSH. But, again, this
will let me treat it the same as all the other hashes in the test
system.

No functional change, for the moment.
This commit is contained in:
Simon Tatham
2018-12-31 13:55:46 +00:00
parent f3295e0fb5
commit 84f98c5bf9
7 changed files with 92 additions and 18 deletions

21
ssh.h
View File

@ -864,12 +864,28 @@ struct ssh2_userkey {
extern const struct ssh1_cipheralg ssh1_3des;
extern const struct ssh1_cipheralg ssh1_des;
extern const struct ssh1_cipheralg ssh1_blowfish;
extern const struct ssh2_cipheralg ssh_3des_ssh2_ctr;
extern const struct ssh2_cipheralg ssh_3des_ssh2;
extern const struct ssh2_cipheralg ssh_des_ssh2;
extern const struct ssh2_cipheralg ssh_des_sshcom_ssh2;
extern const struct ssh2_cipheralg ssh_aes256_ctr;
extern const struct ssh2_cipheralg ssh_aes256;
extern const struct ssh2_cipheralg ssh_aes192_ctr;
extern const struct ssh2_cipheralg ssh_aes192;
extern const struct ssh2_cipheralg ssh_aes128_ctr;
extern const struct ssh2_cipheralg ssh_aes128;
extern const struct ssh2_cipheralg ssh_blowfish_ssh2_ctr;
extern const struct ssh2_cipheralg ssh_blowfish_ssh2;
extern const struct ssh2_cipheralg ssh_arcfour256_ssh2;
extern const struct ssh2_cipheralg ssh_arcfour128_ssh2;
extern const struct ssh2_cipheralg ssh2_chacha20_poly1305;
extern const struct ssh2_ciphers ssh2_3des;
extern const struct ssh2_ciphers ssh2_des;
extern const struct ssh2_ciphers ssh2_aes;
extern const struct ssh2_ciphers ssh2_blowfish;
extern const struct ssh2_ciphers ssh2_arcfour;
extern const struct ssh2_ciphers ssh2_ccp;
extern const struct ssh_hashalg ssh_md5;
extern const struct ssh_hashalg ssh_sha1;
extern const struct ssh_hashalg ssh_sha256;
extern const struct ssh_hashalg ssh_sha384;
@ -879,6 +895,10 @@ extern const struct ssh_kexes ssh_diffiehellman_group14;
extern const struct ssh_kexes ssh_diffiehellman_gex;
extern const struct ssh_kexes ssh_gssk5_sha1_kex;
extern const struct ssh_kexes ssh_rsa_kex;
extern const struct ssh_kex ssh_ec_kex_curve25519;
extern const struct ssh_kex ssh_ec_kex_nistp256;
extern const struct ssh_kex ssh_ec_kex_nistp384;
extern const struct ssh_kex ssh_ec_kex_nistp521;
extern const struct ssh_kexes ssh_ecdh_kex;
extern const ssh_keyalg ssh_dss;
extern const ssh_keyalg ssh_rsa;
@ -892,6 +912,7 @@ extern const struct ssh2_macalg ssh_hmac_sha1_buggy;
extern const struct ssh2_macalg ssh_hmac_sha1_96;
extern const struct ssh2_macalg ssh_hmac_sha1_96_buggy;
extern const struct ssh2_macalg ssh_hmac_sha256;
extern const struct ssh2_macalg ssh2_poly1305;
extern const struct ssh_compression_alg ssh_zlib;
typedef struct AESContext AESContext;