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

Diff for /src/usr.bin/signify/signify.c between version 1.47 and 1.48

version 1.47, 2014/03/06 15:01:58 version 1.48, 2014/03/06 20:04:45
Line 252 
Line 252 
 kdf(uint8_t *salt, size_t saltlen, int rounds, uint8_t *key, size_t keylen)  kdf(uint8_t *salt, size_t saltlen, int rounds, uint8_t *key, size_t keylen)
 {  {
         char pass[1024];          char pass[1024];
           int rppflags = RPP_ECHO_OFF;
   
         if (rounds == 0) {          if (rounds == 0) {
                 memset(key, 0, keylen);                  memset(key, 0, keylen);
                 return;                  return;
         }          }
   
         if (!readpassphrase("passphrase: ", pass, sizeof(pass), RPP_ECHO_OFF))          if (!isatty(STDIN_FILENO))
                   rppflags |= RPP_STDIN;
           if (!readpassphrase("passphrase: ", pass, sizeof(pass), rppflags))
                 errx(1, "unable to read passphrase");                  errx(1, "unable to read passphrase");
         if (strlen(pass) == 0)          if (strlen(pass) == 0)
                 errx(1, "please provide a password");                  errx(1, "please provide a password");

Legend:
Removed from v.1.47  
changed lines
  Added in v.1.48