version 1.24, 2001/02/08 19:30:52 |
version 1.25, 2001/02/08 23:11:43 |
|
|
extern Options options; |
extern Options options; |
extern char *__progname; |
extern char *__progname; |
|
|
|
void |
|
ssh1_put_password(char *password) |
|
{ |
|
int size; |
|
char *padded; |
|
|
|
size = roundup(strlen(password), 32); |
|
padded = xmalloc(size); |
|
strlcpy(padded, password, size); |
|
packet_put_string(padded, size); |
|
memset(padded, 0, size); |
|
xfree(padded); |
|
} |
|
|
/* |
/* |
* Checks if the user has an authentication agent, and if so, tries to |
* Checks if the user has an authentication agent, and if so, tries to |
* authenticate using the agent. |
* authenticate using the agent. |
|
|
break; |
break; |
} |
} |
packet_start(SSH_CMSG_AUTH_TIS_RESPONSE); |
packet_start(SSH_CMSG_AUTH_TIS_RESPONSE); |
packet_put_string(response, strlen(response)); |
ssh1_put_password(response); |
memset(response, 0, strlen(response)); |
memset(response, 0, strlen(response)); |
xfree(response); |
xfree(response); |
packet_send(); |
packet_send(); |
|
|
error("Permission denied, please try again."); |
error("Permission denied, please try again."); |
password = read_passphrase(prompt, 0); |
password = read_passphrase(prompt, 0); |
packet_start(SSH_CMSG_AUTH_PASSWORD); |
packet_start(SSH_CMSG_AUTH_PASSWORD); |
packet_put_string(password, strlen(password)); |
ssh1_put_password(password); |
memset(password, 0, strlen(password)); |
memset(password, 0, strlen(password)); |
xfree(password); |
xfree(password); |
packet_send(); |
packet_send(); |