Won't work for Windows, you need to handle this and none interactive run as well. Anyway, I did not find any replacement to getpass() so I keep using it.
On Thu, Feb 4, 2010 at 9:38 AM, Andreas Jellinghaus <[email protected]> wrote: > > man getpass: > This function is obsolete. Do not use it. > > also this function reads from /dev/tty. why? it would > be much easier if it read from stdin, so we can passwords > from a script. (command line options are visible to other > users and stay in the shell history file, so putting a > secret pin or password in a parameter is not a good idea.) > > and in some bug users complain, that we cannot abort pkcs15-init > with ctrl-c. maybe switching the input code will help here too. > > attached is a patch that replaced getpass with example code > from glibc documentation. it doesn't compile on mingw yet > (mingw doesn't have termios, so we will need some #ifdef), > and I replaced only 3 of 20 getpass() calls so far. > > please have a look and let me know if this is a good direction. > > Regards, Andreas > > _______________________________________________ > opensc-devel mailing list > [email protected] > http://www.opensc-project.org/mailman/listinfo/opensc-devel _______________________________________________ opensc-devel mailing list [email protected] http://www.opensc-project.org/mailman/listinfo/opensc-devel
