version 1.203, 2014/01/31 16:39:19 |
version 1.204, 2014/02/02 03:44:32 |
|
|
packet_put_cstring(authctxt->method->name); |
packet_put_cstring(authctxt->method->name); |
packet_put_char(0); |
packet_put_char(0); |
packet_put_cstring(password); |
packet_put_cstring(password); |
memset(password, 0, strlen(password)); |
explicit_bzero(password, strlen(password)); |
free(password); |
free(password); |
packet_add_padding(64); |
packet_add_padding(64); |
packet_send(); |
packet_send(); |
|
|
authctxt->server_user, host); |
authctxt->server_user, host); |
password = read_passphrase(prompt, 0); |
password = read_passphrase(prompt, 0); |
packet_put_cstring(password); |
packet_put_cstring(password); |
memset(password, 0, strlen(password)); |
explicit_bzero(password, strlen(password)); |
free(password); |
free(password); |
password = NULL; |
password = NULL; |
while (password == NULL) { |
while (password == NULL) { |
|
|
authctxt->server_user, host); |
authctxt->server_user, host); |
retype = read_passphrase(prompt, 0); |
retype = read_passphrase(prompt, 0); |
if (strcmp(password, retype) != 0) { |
if (strcmp(password, retype) != 0) { |
memset(password, 0, strlen(password)); |
explicit_bzero(password, strlen(password)); |
free(password); |
free(password); |
logit("Mismatch; try again, EOF to quit."); |
logit("Mismatch; try again, EOF to quit."); |
password = NULL; |
password = NULL; |
} |
} |
memset(retype, 0, strlen(retype)); |
explicit_bzero(retype, strlen(retype)); |
free(retype); |
free(retype); |
} |
} |
packet_put_cstring(password); |
packet_put_cstring(password); |
memset(password, 0, strlen(password)); |
explicit_bzero(password, strlen(password)); |
free(password); |
free(password); |
packet_add_padding(64); |
packet_add_padding(64); |
packet_send(); |
packet_send(); |
|
|
debug2("no passphrase given, try next key"); |
debug2("no passphrase given, try next key"); |
quit = 1; |
quit = 1; |
} |
} |
memset(passphrase, 0, strlen(passphrase)); |
explicit_bzero(passphrase, strlen(passphrase)); |
free(passphrase); |
free(passphrase); |
if (private != NULL || quit) |
if (private != NULL || quit) |
break; |
break; |
|
|
response = read_passphrase(prompt, echo ? RP_ECHO : 0); |
response = read_passphrase(prompt, echo ? RP_ECHO : 0); |
|
|
packet_put_cstring(response); |
packet_put_cstring(response); |
memset(response, 0, strlen(response)); |
explicit_bzero(response, strlen(response)); |
free(response); |
free(response); |
free(prompt); |
free(prompt); |
} |
} |
|
|
packet_put_cstring(chost); |
packet_put_cstring(chost); |
packet_put_cstring(authctxt->local_user); |
packet_put_cstring(authctxt->local_user); |
packet_put_string(signature, slen); |
packet_put_string(signature, slen); |
memset(signature, 's', slen); |
explicit_bzero(signature, slen); |
free(signature); |
free(signature); |
free(chost); |
free(chost); |
free(pkalg); |
free(pkalg); |