[BACK]Return to sshconnect2.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/sshconnect2.c between version 1.203 and 1.204

version 1.203, 2014/01/31 16:39:19 version 1.204, 2014/02/02 03:44:32
Line 863 
Line 863 
         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();
Line 909 
Line 909 
             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) {
Line 926 
Line 926 
                     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();
Line 1120 
Line 1120 
                                 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;
Line 1379 
Line 1379 
                 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);
         }          }
Line 1549 
Line 1549 
         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);

Legend:
Removed from v.1.203  
changed lines
  Added in v.1.204