mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
First set of changes to backport the new card code from 2.0.
For compatibility reasons a few new files had to be added. Also added estream-printf as this is now used in app-openpgp.c and provides a better and generic asprintf implementation than the hack we used for the W32 code in ttyio.c. Card code is not yet finished.
This commit is contained in:
parent
b478389753
commit
3459c6b015
37 changed files with 7385 additions and 1694 deletions
|
@ -3652,6 +3652,7 @@ menu_backsign(KBNODE pub_keyblock,KBNODE sec_keyblock)
|
|||
PKT_public_key *main_pk;
|
||||
PKT_secret_key *main_sk,*sub_sk=NULL;
|
||||
KBNODE node;
|
||||
u32 timestamp;
|
||||
|
||||
assert(pub_keyblock->pkt->pkttype==PKT_PUBLIC_KEY);
|
||||
assert(sec_keyblock->pkt->pkttype==PKT_SECRET_KEY);
|
||||
|
@ -3661,6 +3662,10 @@ menu_backsign(KBNODE pub_keyblock,KBNODE sec_keyblock)
|
|||
main_sk=copy_secret_key(NULL,sec_keyblock->pkt->pkt.secret_key);
|
||||
keyid_from_pk(main_pk,NULL);
|
||||
|
||||
/* We use the same timestamp for all backsigs so that we don't
|
||||
reveal information about the used machine. */
|
||||
timestamp = make_timestamp ();
|
||||
|
||||
for(node=pub_keyblock;node;node=node->next)
|
||||
{
|
||||
PKT_public_key *sub_pk=NULL;
|
||||
|
@ -3748,7 +3753,8 @@ menu_backsign(KBNODE pub_keyblock,KBNODE sec_keyblock)
|
|||
set_next_passphrase(passphrase);
|
||||
xfree(passphrase);
|
||||
|
||||
rc=make_backsig(sig_pk->pkt->pkt.signature,main_pk,sub_pk,sub_sk);
|
||||
rc = make_backsig (sig_pk->pkt->pkt.signature, main_pk, sub_pk, sub_sk,
|
||||
timestamp);
|
||||
if(rc==0)
|
||||
{
|
||||
PKT_signature *newsig;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue