svnno****@sourc*****
svnno****@sourc*****
2015年 10月 20日 (火) 17:27:26 JST
Revision: 6052 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6052 Author: doda Date: 2015-10-20 17:27:26 +0900 (Tue, 20 Oct 2015) Log Message: ----------- SSHFP で ED25519 鍵に対応。[RFC7479] Modified Paths: -------------- trunk/ttssh2/ttxssh/dns.c trunk/ttssh2/ttxssh/dns.h -------------- next part -------------- Modified: trunk/ttssh2/ttxssh/dns.c =================================================================== --- trunk/ttssh2/ttxssh/dns.c 2015-10-20 02:29:21 UTC (rev 6051) +++ trunk/ttssh2/ttxssh/dns.c 2015-10-20 08:27:26 UTC (rev 6052) @@ -80,6 +80,9 @@ case KEY_ECDSA521: hostkey_alg = SSHFP_KEY_ECDSA; break; + case KEY_ED25519: + hostkey_alg = SSHFP_KEY_ED25519; + break; default: // Un-supported algorithm hostkey_alg = SSHFP_KEY_RESERVED; } @@ -97,7 +100,8 @@ switch (t->DigestType) { case SSHFP_HASH_SHA1: if (hostkey_alg != SSHFP_KEY_RSA && hostkey_alg != SSHFP_KEY_DSA) - fp_type = -1; // SHA1 does not allowed to use with ECDSA key + // SHA1 does not allowed to use with ECDSA and ED25519 key + fp_type = -1; else fp_type = SSH_FP_SHA1; break; Modified: trunk/ttssh2/ttxssh/dns.h =================================================================== --- trunk/ttssh2/ttxssh/dns.h 2015-10-20 02:29:21 UTC (rev 6051) +++ trunk/ttssh2/ttxssh/dns.h 2015-10-20 08:27:26 UTC (rev 6052) @@ -32,16 +32,17 @@ #define DNS_TYPE_SSHFP 44 enum sshfp_types { - SSHFP_KEY_RESERVED, - SSHFP_KEY_RSA, - SSHFP_KEY_DSA, - SSHFP_KEY_ECDSA + SSHFP_KEY_RESERVED = 0, // RFC4255 + SSHFP_KEY_RSA = 1, // RFC4255 + SSHFP_KEY_DSA = 2, // RFC4255 + SSHFP_KEY_ECDSA = 3, // RFC6594 + SSHFP_KEY_ED25519 = 4 // RFC7479 }; enum sshfp_hashes { - SSHFP_HASH_RESERVED, - SSHFP_HASH_SHA1, - SSHFP_HASH_SHA256 + SSHFP_HASH_RESERVED = 0, // RFC4255 + SSHFP_HASH_SHA1 = 1, // RFC4255 + SSHFP_HASH_SHA256 = 2 // RFC6594 }; enum verifydns_result {