Changeset 342

Show
Ignore:
Timestamp:
01/30/06 13:36:42
Author:
ben
Message:

Give callbacks a preview of secret keys.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openpgpsdk/trunk/examples/packet-dump.c

    r339 r342  
    834834        print_hexdump("IV",content->secret_key.iv, 
    835835                      ops_block_size(content->secret_key.algorithm)); 
     836 
     837        /* no more set if encrypted */ 
     838        if(content_->tag == OPS_PTAG_CT_ENCRYPTED_SECRET_KEY) 
     839            break; 
     840 
    836841        printf("Checksum: %04x\n",content->secret_key.checksum); 
    837842 
  • openpgpsdk/trunk/src/packet-parse.c

    r341 r342  
    18541854            return 0; 
    18551855 
     1856        /* Let callbacks see what they're about to be passphrased for */ 
     1857        CBP(parse_info,OPS_PTAG_CT_ENCRYPTED_SECRET_KEY,&content); 
     1858 
    18561859        passphrase=NULL; 
    18571860        pc.content.passphrase=&passphrase; 
     
    18611864            if(!consume_packet(region,parse_info,ops_false)) 
    18621865               return 0; 
    1863             CBP(parse_info,OPS_PTAG_CT_ENCRYPTED_SECRET_KEY,&content); 
    18641866            return 1; 
    18651867            }