diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-12-05 00:22:34 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-12-05 00:22:34 +0100 |
commit | 18894103fcf337dfa672481ffc6b4906f340adff (patch) | |
tree | d703c56133818df28a6714db9128c647da1c1bc9 /src/test.c | |
parent | m (diff) | |
download | libpassphrase-18894103fcf337dfa672481ffc6b4906f340adff.tar.gz libpassphrase-18894103fcf337dfa672481ffc6b4906f340adff.tar.bz2 libpassphrase-18894103fcf337dfa672481ffc6b4906f340adff.tar.xz |
accept input from any fd
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/test.c')
-rw-r--r-- | src/test.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -33,14 +33,14 @@ int main(int argc, char** argv) char* passphrase_; /* Hide the passphrase */ - passphrase_disable_echo(); + passphrase_disable_echo1(0); /* Do things needed before reading the passphrase */ printf("Passphrase: "); fflush(stdout); /* Read the passphrase */ - passphrase = passphrase_read(); + passphrase = passphrase_read2(0, 0); if (passphrase == NULL) { /* Something went wrong, print what and exit */ @@ -58,7 +58,7 @@ int main(int argc, char** argv) free(passphrase_); /* Stop hiding user input */ - passphrase_reenable_echo(); + passphrase_reenable_echo1(0); /* End of program */ return 0; |