[Ttssh2-commit] [4425] hmac-sha2 サポート。ドラフトだし、動作確認もまだなので無効化中。

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 4月 8日 (金) 17:31:26 JST


Revision: 4425
          http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=4425
Author:   doda
Date:     2011-04-08 17:31:26 +0900 (Fri, 08 Apr 2011)

Log Message:
-----------
hmac-sha2 サポート。ドラフトだし、動作確認もまだなので無効化中。
http://www.ietf.org/id/draft-dbider-sha2-mac-for-ssh-00.txt

# 気が早すぎ

Modified Paths:
--------------
    trunk/ttssh2/ttxssh/ssh.h
    trunk/ttssh2/ttxssh/ttxssh.c


-------------- next part --------------
Modified: trunk/ttssh2/ttxssh/ssh.h
===================================================================
--- trunk/ttssh2/ttxssh/ssh.h	2011-04-08 07:50:48 UTC (rev 4424)
+++ trunk/ttssh2/ttxssh/ssh.h	2011-04-08 08:31:26 UTC (rev 4425)
@@ -336,6 +336,12 @@
 	HMAC_SHA1_96,
 	HMAC_MD5_96,
 	HMAC_RIPEMD160,
+#if 0	// HMAC-SHA2 support
+	HMAC_SHA2_256,
+	HMAC_SHA2_256_96,
+	HMAC_SHA2_512,
+	HMAC_SHA2_512_96,
+#endif	// HMAC-SHA2 support
 	HMAC_UNKNOWN,
 	HMAC_MAX = HMAC_UNKNOWN,
 } hmac_type;
@@ -348,12 +354,18 @@
 } ssh2_mac_t;
 
 static ssh2_mac_t ssh2_macs[] = {
-	{HMAC_SHA1,      "hmac-sha1",                  EVP_sha1,      0},
-	{HMAC_MD5,       "hmac-md5",                   EVP_md5,       0},
-	{HMAC_SHA1_96,   "hmac-sha1-96",               EVP_sha1,      96},
-	{HMAC_MD5_96,    "hmac-md5-96",                EVP_md5,       96},
-	{HMAC_RIPEMD160, "hmac-****@opens*****", EVP_ripemd160, 0},
-	{HMAC_NONE,      NULL,                         NULL,          0},
+	{HMAC_SHA1,        "hmac-sha1",                  EVP_sha1,      0},
+	{HMAC_MD5,         "hmac-md5",                   EVP_md5,       0},
+	{HMAC_SHA1_96,     "hmac-sha1-96",               EVP_sha1,      96},
+	{HMAC_MD5_96,      "hmac-md5-96",                EVP_md5,       96},
+	{HMAC_RIPEMD160,   "hmac-****@opens*****", EVP_ripemd160, 0},
+#if 0	// HMAC-SHA2 support
+	{HMAC_SHA2_256,    "hmac-sha2-256",              EVP_sha256,    0},
+	{HMAC_SHA2_256_96, "hmac-sha2-256-96",           EVP_sha256,    96},
+	{HMAC_SHA2_512,    "hmac-sha2-512",              EVP_sha512,    0},
+	{HMAC_SHA2_512_96, "hmac-sha2-512-96",           EVP_sha512,    96},
+#endif	// HMAC-SHA2 support
+	{HMAC_NONE,        NULL,                         NULL,          0},
 };
 
 

Modified: trunk/ttssh2/ttxssh/ttxssh.c
===================================================================
--- trunk/ttssh2/ttxssh/ttxssh.c	2011-04-08 07:50:48 UTC (rev 4424)
+++ trunk/ttssh2/ttxssh/ttxssh.c	2011-04-08 08:31:26 UTC (rev 4425)
@@ -297,6 +297,12 @@
 		HMAC_SHA1_96,
 		HMAC_MD5_96,
 		HMAC_NONE,
+#if 0	// HMAC-SHA2 support
+		HMAC_SHA2_256,
+		HMAC_SHA2_256_96,
+		HMAC_SHA2_512,
+		HMAC_SHA2_512_96,
+#endif	// HMAC-SHA2 support
 	};
 
 	normalize_generic_order(buf, default_strings, NUM_ELEM(default_strings));



Ttssh2-commit メーリングリストの案内
Back to archive index