| 920 |
|
|
| 921 |
void AUTH_get_auth_info(PTInstVar pvar, char FAR * dest, int len) |
void AUTH_get_auth_info(PTInstVar pvar, char FAR * dest, int len) |
| 922 |
{ |
{ |
| 923 |
|
char *method = "unknown"; |
| 924 |
|
|
| 925 |
if (pvar->auth_state.user == NULL) { |
if (pvar->auth_state.user == NULL) { |
| 926 |
strncpy(dest, "None", len); |
strncpy(dest, "None", len); |
| 927 |
} else if (pvar->auth_state.cur_cred.method != SSH_AUTH_NONE) { |
} else if (pvar->auth_state.cur_cred.method != SSH_AUTH_NONE) { |
| 931 |
|
|
| 932 |
} else { // SSH2:認証メソッドの判別 (2004.12.23 yutaka) |
} else { // SSH2:認証メソッドの判別 (2004.12.23 yutaka) |
| 933 |
if (pvar->auth_state.cur_cred.method == SSH_AUTH_PASSWORD) { |
if (pvar->auth_state.cur_cred.method == SSH_AUTH_PASSWORD) { |
| 934 |
_snprintf(dest, len, "User '%s', using %s", pvar->auth_state.user, |
// keyboard-interactiveメソッドを追加 (2005.1.24 yutaka) |
| 935 |
get_auth_method_name(pvar->auth_state.cur_cred.method)); |
if (pvar->keyboard_interactive_done == 1) { |
| 936 |
|
method = "keyboard-interactive"; |
| 937 |
|
} else { |
| 938 |
|
method = get_auth_method_name(pvar->auth_state.cur_cred.method); |
| 939 |
|
} |
| 940 |
|
_snprintf(dest, len, "User '%s', using %s", pvar->auth_state.user, method); |
| 941 |
|
|
| 942 |
} else { |
} else { |
|
char *method = "unknown"; |
|
| 943 |
if (pvar->auth_state.cur_cred.key_pair->RSA_key != NULL) { |
if (pvar->auth_state.cur_cred.key_pair->RSA_key != NULL) { |
| 944 |
method = "RSA"; |
method = "RSA"; |
| 945 |
} else if (pvar->auth_state.cur_cred.key_pair->DSA_key != NULL) { |
} else if (pvar->auth_state.cur_cred.key_pair->DSA_key != NULL) { |
| 977 |
|
|
| 978 |
/* |
/* |
| 979 |
* $Log: not supported by cvs2svn $ |
* $Log: not supported by cvs2svn $ |
| 980 |
|
* Revision 1.5 2004/12/27 14:35:41 yutakakn |
| 981 |
|
* SSH2秘密鍵読み込み失敗時のエラーメッセージを強化した。 |
| 982 |
|
* |
| 983 |
* Revision 1.4 2004/12/22 17:28:14 yutakakn |
* Revision 1.4 2004/12/22 17:28:14 yutakakn |
| 984 |
* SSH2公開鍵認証(RSA/DSA)をサポートした。 |
* SSH2公開鍵認証(RSA/DSA)をサポートした。 |
| 985 |
* |
* |