mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* g10.c (main), passphrase.c (set_passphrase_from_string): New
--passphrase command line option. Only useful in very special circumstances.
This commit is contained in:
parent
6ce02d4eb5
commit
82bee9c68a
3 changed files with 24 additions and 0 deletions
|
@ -115,6 +115,19 @@ get_last_passphrase()
|
|||
return p;
|
||||
}
|
||||
|
||||
/* Here's an interesting question: since this passphrase was passed in
|
||||
on the command line, is there really any point in using secure
|
||||
memory for it? I'm going with 'yes', since it doesn't hurt, and
|
||||
might help in some small way (swapping). */
|
||||
|
||||
void
|
||||
set_passphrase_from_string(const char *pass)
|
||||
{
|
||||
xfree( fd_passwd );
|
||||
fd_passwd = xmalloc_secure(strlen(pass)+1);
|
||||
strcpy(fd_passwd,pass);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
read_passphrase_from_fd( int fd )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue