[Ttssh2-commit] [5542] TTSSHバージョンダイアログに、公開鍵認証の種別に "bcrypt KDF" を追加した。

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2014年 3月 16日 (日) 20:26:31 JST


Revision: 5542
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/5542
Author:   yutakapon
Date:     2014-03-16 20:26:30 +0900 (Sun, 16 Mar 2014)
Log Message:
-----------
TTSSHバージョンダイアログに、公開鍵認証の種別に"bcrypt KDF"を追加した。

Modified Paths:
--------------
    branches/ssh_ed25519/ttssh2/ttxssh/auth.c
    branches/ssh_ed25519/ttssh2/ttxssh/keyfiles.c
    branches/ssh_ed25519/ttssh2/ttxssh/ssh.h

-------------- next part --------------
Modified: branches/ssh_ed25519/ttssh2/ttxssh/auth.c
===================================================================
--- branches/ssh_ed25519/ttssh2/ttxssh/auth.c	2014-03-16 09:27:37 UTC (rev 5541)
+++ branches/ssh_ed25519/ttssh2/ttxssh/auth.c	2014-03-16 11:26:30 UTC (rev 5542)
@@ -1505,6 +1505,7 @@
 void AUTH_get_auth_info(PTInstVar pvar, char FAR * dest, int len)
 {
 	const char *method = "unknown";
+	char buf[256];
 
 	if (pvar->auth_state.user == NULL) {
 		strncpy_s(dest, len, "None", _TRUNCATE);
@@ -1531,7 +1532,13 @@
 
 			} else {
 				if (pvar->auth_state.cur_cred.method == SSH_AUTH_RSA) {
-					method = ssh_key_type(pvar->auth_state.cur_cred.key_pair);
+					Key *k = pvar->auth_state.cur_cred.key_pair;
+					method = ssh_key_type(k);
+					if (k->bcrypt_kdf) {
+						_snprintf_s(buf, sizeof(buf), _TRUNCATE, "%s(bcrypt KDF)", method);
+						method = buf;
+					}
+
 				}
 				else if (pvar->auth_state.cur_cred.method == SSH_AUTH_PAGEANT) {
 					int len = get_uint32_MSBfirst(pvar->pageant_curkey + 4);

Modified: branches/ssh_ed25519/ttssh2/ttxssh/keyfiles.c
===================================================================
--- branches/ssh_ed25519/ttssh2/ttxssh/keyfiles.c	2014-03-16 09:27:37 UTC (rev 5541)
+++ branches/ssh_ed25519/ttssh2/ttxssh/keyfiles.c	2014-03-16 11:26:30 UTC (rev 5542)
@@ -579,6 +579,7 @@
 	}
 
 	/* success */
+	keyfmt->bcrypt_kdf = 1;
 
 error:
 	buffer_free(blob);

Modified: branches/ssh_ed25519/ttssh2/ttxssh/ssh.h
===================================================================
--- branches/ssh_ed25519/ttssh2/ttxssh/ssh.h	2014-03-16 09:27:37 UTC (rev 5541)
+++ branches/ssh_ed25519/ttssh2/ttxssh/ssh.h	2014-03-16 11:26:30 UTC (rev 5542)
@@ -459,6 +459,7 @@
 	// SSH2 ED25519
 	unsigned char *ed25519_sk;
 	unsigned char *ed25519_pk;
+	int bcrypt_kdf;
 } Key;
 
 // fingerprint\x82̎\xED\x95\xCA



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