Changeset 523

Show
Ignore:
Timestamp:
12/10/07 15:43:20
Author:
rachel
Message:

Signature/verification now interoperates with GPG

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openpgpsdk/trunk/tests/test_common.c

    r521 r523  
    1616 
    1717char dir[MAXBUF+1]; 
     18char gpgcmd[MAXBUF+1]; 
    1819ops_keyring_t pub_keyring; 
    1920ops_keyring_t sec_keyring; 
     
    3940const ops_key_data_t *decrypter=NULL; 
    4041 
    41 void setup_test_keys() 
     42static void setup_test_keys(); 
     43 
     44void setup() 
     45    { 
     46    // Create temp directory 
     47    if (!mktmpdir()) 
     48        return; 
     49 
     50    assert(strlen(dir)); 
     51    snprintf(gpgcmd,MAXBUF,"gpg --quiet --no-tty --homedir=%s",dir); 
     52 
     53    setup_test_keys(); 
     54    } 
     55 
     56static void setup_test_keys() 
    4257    { 
    4358    char keydetails[MAXBUF+1]; 
     
    4964    char *rsa_pass="Key-Type: RSA\nKey-Usage: encrypt, sign\nName-Real: Bravo\nName-Comment: RSA, passphrase\nName-Email: bravo@test.com\nPassphrase: hello\nKey-Length: 1024\n"; 
    5065 
    51     // Create temp directory 
    52     if (!mktmpdir()) 
    53         return; 
    54  
    5566    /* 
    5667     * Create a RSA keypair with no passphrase 
     
    7283    close(fd); 
    7384 
    74     snprintf(cmd,MAXBUF,"gpg --quiet --no-tty --openpgp --quiet --gen-key --s2k-cipher-algo \"AES\" --expert --homedir=%s --batch %s",dir,keydetails); 
     85    snprintf(cmd,MAXBUF,"%s --openpgp --gen-key --s2k-cipher-algo \"AES\" --expert --batch %s",gpgcmd,keydetails); 
    7586    system(cmd); 
    7687 
     
    94105    close(fd); 
    95106 
    96     snprintf(cmd,MAXBUF,"gpg --quiet --no-tty --openpgp --quiet --gen-key --s2k-cipher-algo \"AES\" --expert --homedir=%s --batch %s",dir,keydetails); 
     107    snprintf(cmd,MAXBUF,"%s --openpgp --gen-key --s2k-cipher-algo \"AES\" --expert --batch %s",gpgcmd,keydetails); 
    97108    system(cmd); 
    98109     
     
    249260callback_general(const ops_parser_content_t *content_,ops_parse_cb_info_t *cbinfo) 
    250261    { 
     262    int debug=0; 
     263 
    251264    ops_parser_content_union_t* content=(ops_parser_content_union_t *)&content_->content; 
    252265     
     
    262275         
    263276    case OPS_PARSER_PACKET_END: 
    264         // nothing to do 
     277        // print raw packet 
     278 
     279        if (debug) 
     280            { 
     281            unsigned i=0; 
     282            fprintf(stderr,"***\n***Raw Packet:\n"); 
     283            for (i=0; i<content_->content.packet.length; i++) 
     284                { 
     285                fprintf(stderr,"0x%02x ", content_->content.packet.raw[i]); 
     286                if (!((i+1) % 16)) 
     287                    fprintf(stderr,"\n"); 
     288                else if (!((i+1) % 8)) 
     289                    fprintf(stderr,"  "); 
     290                } 
     291            fprintf(stderr,"\n"); 
     292            } 
    265293        break; 
    266294 
     
    428456  
    429457ops_parse_cb_return_t 
     458callback_verify(const ops_parser_content_t *content_,ops_parse_cb_info_t *cbinfo) 
     459    { 
     460    /* 
     461    int debug=0; 
     462 
     463    if (debug) 
     464        { ops_print_packet(content_); } 
     465    */ 
     466    switch(content_->tag) 
     467        { 
     468    case OPS_PTAG_RAW_SS: 
     469    case OPS_PTAG_SS_CREATION_TIME: 
     470    case OPS_PTAG_SS_ISSUER_KEY_ID: 
     471        // \todo should free memory? 
     472        return OPS_KEEP_MEMORY; 
     473         
     474    case OPS_PTAG_CT_ONE_PASS_SIGNATURE: 
     475    case OPS_PTAG_CT_ARMOUR_HEADER: 
     476    case OPS_PTAG_CT_ARMOUR_TRAILER: 
     477        break; 
     478         
     479    case OPS_PTAG_CT_SIGNATURE: 
     480    case OPS_PTAG_CT_SIGNED_CLEARTEXT_HEADER: 
     481    case OPS_PTAG_CT_SIGNED_CLEARTEXT_BODY: 
     482    case OPS_PTAG_CT_SIGNED_CLEARTEXT_TRAILER: 
     483    case OPS_PTAG_CT_SIGNATURE_HEADER: 
     484    case OPS_PTAG_CT_SIGNATURE_FOOTER: 
     485    case OPS_PTAG_CT_LITERAL_DATA_HEADER: 
     486    case OPS_PTAG_CT_LITERAL_DATA_BODY: 
     487        return callback_data_signature(content_, cbinfo); 
     488 
     489    default: 
     490        return callback_general(content_,cbinfo); 
     491        } 
     492 
     493    return OPS_RELEASE_MEMORY; 
     494    } 
     495 
     496ops_parse_cb_return_t 
    430497callback_pk_session_key(const ops_parser_content_t *content_,ops_parse_cb_info_t *cbinfo) 
    431498    { 
  • openpgpsdk/trunk/tests/test_rsa_signature.c

    r521 r523  
    2525static char *filename_rsa_armour_passphrase="ops_rsa_signed_armour_passphrase.txt"; 
    2626 
    27 static ops_parse_cb_return_t 
    28 callback_verify(const ops_parser_content_t *content_,ops_parse_cb_info_t *cbinfo); 
    29  
    3027/* Signature suite initialization. 
    3128 * Create temporary directory. 
     
    7976    int rtn=0; 
    8077    ops_create_info_t *cinfo=NULL; 
     78    unsigned char buf[MAXBUF]; 
    8179     
    8280    // open file to sign 
     
    123121    for (;;) 
    124122        { 
    125         unsigned char buf[MAXBUF]; 
    126123        int n=0; 
    127124     
     
    140137    ops_keyid(keyid,&skey->public_key); 
    141138    ops_signature_add_issuer_key_id(sig,keyid); 
     139 
    142140    ops_signature_hashed_subpackets_end(sig); 
    143141    ops_write_signature(sig,(ops_public_key_t *)&skey->public_key,(ops_secret_key_t *)skey,cinfo); 
     
    145143    close(fd_out); 
    146144 
    147     // Check 
    148  
    149     if (!do_gpgtest) 
    150         { 
    151         int fd=0; 
    152         ops_parse_info_t *pinfo=NULL; 
    153         validate_data_cb_arg_t validate_arg; 
    154         ops_validate_result_t result; 
    155         int rtn=0; 
    156  
    157         if (debug) 
    158             { 
    159             fprintf(stderr,"\n***\n*** Starting to parse for validation\n***\n"); 
    160             } 
    161  
     145    /* 
     146     * Validate output 
     147     */ 
     148 
     149    // Check with OPS 
     150 
     151    { 
     152    int fd=0; 
     153    ops_parse_info_t *pinfo=NULL; 
     154    validate_data_cb_arg_t validate_arg; 
     155    ops_validate_result_t result; 
     156    int rtn=0; 
     157     
     158    if (debug) 
     159        { 
     160        fprintf(stderr,"\n***\n*** Starting to parse for validation\n***\n"); 
     161        } 
     162     
    162163    // open signed file 
    163164#ifdef WIN32 
    164         fd=open(signed_file,O_RDONLY | O_BINARY); 
     165    fd=open(signed_file,O_RDONLY | O_BINARY); 
    165166#else 
    166         fd=open(signed_file,O_RDONLY); 
     167    fd=open(signed_file,O_RDONLY); 
    167168#endif 
    168         if(fd < 0) 
    169            
    170             perror(signed_file); 
    171             exit(2); 
    172            
    173          
    174         // Set verification reader and handling options 
    175          
    176         pinfo=ops_parse_info_new(); 
    177  
    178         memset(&validate_arg,'\0',sizeof validate_arg); 
    179         validate_arg.result=&result; 
    180         validate_arg.keyring=&pub_keyring; 
    181         validate_arg.rarg=ops_reader_get_arg_from_pinfo(pinfo); 
    182          
    183         ops_parse_options(pinfo,OPS_PTAG_SS_ALL,OPS_PARSE_PARSED); 
    184         ops_parse_cb_set(pinfo,callback_verify,&validate_arg); 
    185         ops_reader_set_fd(pinfo,fd); 
    186         pinfo->rinfo.accumulate=ops_true; 
    187          
    188         // Set up armour/passphrase options 
    189          
    190         if (has_armour) 
    191             ops_reader_push_dearmour(pinfo,ops_false,ops_false,ops_false); 
    192         //    current_passphrase=has_passphrase ? passphrase : nopassphrase; 
    193          
    194         // Do the verification 
    195          
    196         rtn=ops_parse(pinfo); 
    197         ops_print_errors(ops_parse_info_get_errors(pinfo)); 
    198         CU_ASSERT(rtn==1); 
    199          
    200         // Tidy up 
    201         if (has_armour) 
    202             ops_reader_pop_dearmour(pinfo); 
    203          
    204         ops_parse_info_delete(pinfo); 
    205          
    206         close(fd); 
    207        
    208     else 
    209         { 
    210         // Check signature with GPG 
    211  
    212         snprintf(cmd,MAXBUF,"gpg --quiet --no-tty --verify --quiet --homedir %s %s", dir, signed_file); 
    213         rtn=system(cmd); 
    214         CU_ASSERT(rtn==0); 
    215        
     169    if(fd < 0) 
     170       
     171        perror(signed_file); 
     172        exit(2); 
     173       
     174     
     175    // Set verification reader and handling options 
     176     
     177    pinfo=ops_parse_info_new(); 
     178     
     179    memset(&validate_arg,'\0',sizeof validate_arg); 
     180    validate_arg.result=&result; 
     181    validate_arg.keyring=&pub_keyring; 
     182    validate_arg.rarg=ops_reader_get_arg_from_pinfo(pinfo); 
     183     
     184    ops_parse_options(pinfo,OPS_PTAG_SS_ALL,OPS_PARSE_PARSED); 
     185    ops_parse_cb_set(pinfo,callback_verify,&validate_arg); 
     186    ops_reader_set_fd(pinfo,fd); 
     187    pinfo->rinfo.accumulate=ops_true; 
     188     
     189    // Set up armour/passphrase options 
     190     
     191    if (has_armour) 
     192        ops_reader_push_dearmour(pinfo,ops_false,ops_false,ops_false); 
     193    //    current_passphrase=has_passphrase ? passphrase : nopassphrase; 
     194     
     195    // Do the verification 
     196     
     197    rtn=ops_parse(pinfo); 
     198    ops_print_errors(ops_parse_info_get_errors(pinfo)); 
     199    CU_ASSERT(rtn==1); 
     200     
     201    // Tidy up 
     202    if (has_armour) 
     203        ops_reader_pop_dearmour(pinfo); 
     204     
     205    ops_parse_info_delete(pinfo); 
     206     
     207    close(fd); 
     208   
     209 
     210    // Check signature with GPG 
     211    { 
     212 
     213    snprintf(cmd,MAXBUF,"%s --verify %s", gpgcmd, signed_file); 
     214    rtn=system(cmd); 
     215    CU_ASSERT(rtn==0); 
     216   
    216217    } 
    217218 
     
    309310} 
    310311 
    311 static ops_parse_cb_return_t 
    312 callback_verify(const ops_parser_content_t *content_,ops_parse_cb_info_t *cbinfo) 
    313     { 
    314     int debug=0; 
    315  
    316     if (debug) 
    317         { ops_print_packet(content_); } 
    318  
    319     switch(content_->tag) 
    320         { 
    321     case OPS_PTAG_RAW_SS: 
    322     case OPS_PTAG_SS_CREATION_TIME: 
    323     case OPS_PTAG_SS_ISSUER_KEY_ID: 
    324         // \todo should free memory? 
    325         return OPS_KEEP_MEMORY; 
    326          
    327     case OPS_PTAG_CT_ONE_PASS_SIGNATURE: 
    328     case OPS_PTAG_CT_ARMOUR_HEADER: 
    329     case OPS_PTAG_CT_ARMOUR_TRAILER: 
    330         break; 
    331          
    332     case OPS_PTAG_CT_SIGNATURE: 
    333     case OPS_PTAG_CT_SIGNED_CLEARTEXT_HEADER: 
    334     case OPS_PTAG_CT_SIGNED_CLEARTEXT_BODY: 
    335     case OPS_PTAG_CT_SIGNED_CLEARTEXT_TRAILER: 
    336     case OPS_PTAG_CT_SIGNATURE_HEADER: 
    337     case OPS_PTAG_CT_SIGNATURE_FOOTER: 
    338     case OPS_PTAG_CT_LITERAL_DATA_HEADER: 
    339     case OPS_PTAG_CT_LITERAL_DATA_BODY: 
    340         return callback_data_signature(content_, cbinfo); 
    341  
    342     default: 
    343         return callback_general(content_,cbinfo); 
    344         } 
    345  
    346     return OPS_RELEASE_MEMORY; 
    347     } 
    348  
    349312// EOF 
  • openpgpsdk/trunk/tests/test_rsa_verify.c

    r521 r523  
    1616#include "tests.h" 
    1717 
     18static int do_gpgtest=0; 
     19 
    1820#ifndef ATTRIBUTE_UNUSED 
    1921 
     
    3133static char *filename_rsa_armour_passphrase="gpg_signed_armour_passphrase.txt"; 
    3234 
    33 static ops_parse_cb_return_t 
    34 callback(const ops_parser_content_t *content_,ops_parse_cb_info_t *cbinfo) 
    35     { 
    36     //    ops_parser_content_union_t* content=(ops_parser_content_union_t *)&content_->content; 
    37  
    38     //        ops_print_packet(content_); 
    39  
    40     switch(content_->tag) 
    41         { 
    42         /* 
    43     case OPS_PTAG_CT_LITERAL_DATA_HEADER: 
    44         break; 
    45  
    46     case OPS_PTAG_CT_LITERAL_DATA_BODY: 
    47         return callback_literal_data(content_,cbinfo); 
    48         break; 
    49         */ 
    50  
    51     case OPS_PTAG_CT_ONE_PASS_SIGNATURE: 
    52         break; 
    53  
    54     case OPS_PTAG_CT_SIGNATURE: 
    55     case OPS_PTAG_CT_SIGNATURE_HEADER: 
    56     case OPS_PTAG_CT_SIGNATURE_FOOTER: 
    57     case OPS_PTAG_CT_LITERAL_DATA_HEADER: 
    58     case OPS_PTAG_CT_LITERAL_DATA_BODY: 
    59         return callback_data_signature(content_, cbinfo); 
    60  
    61         /* 
    62     case OPS_PTAG_CT_UNARMOURED_TEXT: 
    63         printf("OPS_PTAG_CT_UNARMOURED_TEXT\n"); 
    64         if(!skipping) 
    65             { 
    66             puts("Skipping..."); 
    67             skipping=ops_true; 
    68             } 
    69         fwrite(content->unarmoured_text.data,1, 
    70                content->unarmoured_text.length,stdout); 
    71         break; 
    72  
    73     case OPS_PTAG_CT_PK_SESSION_KEY: 
    74         return callback_pk_session_key(content_,cbinfo); 
    75  
    76     case OPS_PARSER_CMD_GET_SECRET_KEY: 
    77         return callback_cmd_get_secret_key(content_,cbinfo); 
    78  
    79     case OPS_PARSER_CMD_GET_SK_PASSPHRASE: 
    80         return callback_cmd_get_secret_key_passphrase(content_,cbinfo); 
    81  
    82     case OPS_PTAG_CT_LITERAL_DATA_BODY: 
    83         return callback_literal_data(content_,cbinfo); 
    84         //      text=ops_mallocz(content->literal_data_body.length+1); 
    85         //      memcpy(text,content->literal_data_body.data,content->literal_data_body.length); 
    86         //              break; 
    87  
    88     case OPS_PARSER_PTAG: 
    89     case OPS_PTAG_CT_ARMOUR_HEADER: 
    90     case OPS_PTAG_CT_ARMOUR_TRAILER: 
    91     case OPS_PTAG_CT_ENCRYPTED_PK_SESSION_KEY: 
    92     case OPS_PTAG_CT_COMPRESSED: 
    93     case OPS_PTAG_CT_SE_IP_DATA_BODY: 
    94     case OPS_PTAG_CT_SE_IP_DATA_HEADER: 
    95         // Ignore these packets  
    96         // They're handled in ops_parse_one_packet() 
    97         // and nothing else needs to be done 
    98         break; 
    99 */ 
    100  
    101     default: 
    102         return callback_general(content_,cbinfo); 
    103         } 
    104  
    105     return OPS_RELEASE_MEMORY; 
    106     } 
     35static char *filename_rsa_clearsign_armour_nopassphrase="gpg_clearsigned_armour_nopassphrase.txt"; 
    10736 
    10837/* Signature verification suite initialization. 
     
    11443    char cmd[MAXBUF+1]; 
    11544 
    116     // Create test files 
     45    do_gpgtest=0; 
     46 
     47    // Create SIGNED test files 
    11748 
    11849    create_testfile(filename_rsa_noarmour_nopassphrase); 
     
    12354    // Now sign the test files with GPG 
    12455 
    125     snprintf(cmd,MAXBUF,"gpg --quiet --no-tty --homedir=%s --openpgp --compress-level 0 --sign --local-user %s %s/%s", 
    126              dir, alpha_name, dir, filename_rsa_noarmour_nopassphrase); 
    127     if (system(cmd)) 
    128         { return 1; } 
    129  
    130     snprintf(cmd,MAXBUF,"gpg --quiet --no-tty --homedir=%s --compress-level 0 --sign --armour --local-user %s %s/%s", 
    131              dir, alpha_name, dir, filename_rsa_armour_nopassphrase); 
    132     if (system(cmd)) 
    133         { return 1; } 
    134  
    135     snprintf(cmd,MAXBUF,"gpg --quiet --no-tty --homedir=%s --compress-level 0 --sign --local-user %s --passphrase %s %s/%s", 
    136              dir, bravo_name, bravo_passphrase, dir, filename_rsa_noarmour_passphrase); 
    137     if (system(cmd)) 
    138         { return 1; } 
    139  
    140     snprintf(cmd,MAXBUF,"gpg --quiet --no-tty  --homedir=%s --compress-level 0 --sign --armour --local-user %s --passphrase %s %s/%s", 
    141              dir, bravo_name, bravo_passphrase, dir, filename_rsa_armour_passphrase); 
     56    snprintf(cmd,MAXBUF,"%s --openpgp --compress-level 0 --sign --local-user %s %s/%s", 
     57             gpgcmd, alpha_name, dir, filename_rsa_noarmour_nopassphrase); 
     58    if (system(cmd)) 
     59        { return 1; } 
     60 
     61    snprintf(cmd,MAXBUF,"%s --compress-level 0 --sign --local-user %s --armor %s/%s", 
     62             gpgcmd, alpha_name, dir, filename_rsa_armour_nopassphrase); 
     63    if (system(cmd)) 
     64        { return 1; } 
     65 
     66    snprintf(cmd,MAXBUF,"%s --compress-level 0 --sign --local-user %s --passphrase %s %s/%s", 
     67             gpgcmd, bravo_name, bravo_passphrase, dir, filename_rsa_noarmour_passphrase); 
     68    if (system(cmd)) 
     69        { return 1; } 
     70 
     71    snprintf(cmd,MAXBUF,"%s --compress-level 0 --sign --local-user %s --passphrase %s --armor %s/%s", 
     72             gpgcmd, bravo_name, bravo_passphrase, dir, filename_rsa_armour_passphrase); 
     73    if (system(cmd)) 
     74        { return 1; } 
     75 
     76    /* 
     77     * Create CLEARSIGNED test files 
     78     */ 
     79 
     80    create_testfile(filename_rsa_clearsign_armour_nopassphrase); 
     81 
     82    // and sign them 
     83 
     84    snprintf(cmd,MAXBUF,"%s --openpgp --compress-level 0 --clearsign --local-user %s --armor %s/%s", 
     85             gpgcmd, alpha_name, dir, filename_rsa_clearsign_armour_nopassphrase); 
    14286    if (system(cmd)) 
    14387        { return 1; } 
     
    14791    } 
    14892 
     93int init_suite_rsa_verify_gpgtest(void) 
     94    { 
     95    init_suite_rsa_verify(); 
     96 
     97    do_gpgtest=1; 
     98 
     99    return 0; 
     100    } 
     101 
    149102int clean_suite_rsa_verify(void) 
    150103    { 
     
    159112    { 
    160113    char signedfile[MAXBUF+1]; 
    161     //    char testtext[MAXBUF+1]; 
    162114    char *suffix= has_armour ? "asc" : "gpg"; 
    163115    int fd=0; 
     
    168120     
    169121    // open signed file 
    170     snprintf(signedfile,MAXBUF,"%s/%s%s%s.%s",dir, 
     122    snprintf(signedfile,MAXBUF,"%s/%s%s%s.%s", 
     123             dir, filename, 
     124             protocol==NULL ? "" : "_", 
    171125             protocol==NULL ? "" : protocol, 
    172              protocol==NULL ? "" : "_", 
    173              filename,suffix); 
     126             suffix); 
    174127#ifdef WIN32 
    175128    fd=open(signedfile,O_RDONLY | O_BINARY); 
     
    192145    validate_arg.rarg=ops_reader_get_arg_from_pinfo(pinfo); 
    193146 
    194     ops_parse_cb_set(pinfo,callback,&validate_arg); 
     147    ops_parse_cb_set(pinfo,callback_verify,&validate_arg); 
    195148    ops_reader_set_fd(pinfo,fd); 
    196149    pinfo->rinfo.accumulate=ops_true; 
     
    225178void test_rsa_verify_noarmour_nopassphrase(void) 
    226179    { 
     180    //    int clearsign=0; 
    227181    int armour=0; 
    228182    int passphrase=0; 
     
    233187    } 
    234188 
     189void test_rsa_verify_clearsign_armour_nopassphrase(void) 
     190    { 
     191    //    int clearsign=1; 
     192    int armour=1; 
     193    int passphrase=0; 
     194    assert(pub_keyring.nkeys); 
     195 
     196    test_rsa_verify(armour,passphrase,filename_rsa_clearsign_armour_nopassphrase,NULL); 
     197    } 
     198 
    235199#ifdef TBD 
    236200void test_rsa_encrypt_armour_singlekey(void) 
     
    268232    // add tests to suite 
    269233     
     234    if (NULL == CU_add_test(suite, "Clearsigned, armoured, no passphrase", test_rsa_verify_clearsign_armour_nopassphrase)) 
     235            return NULL; 
     236     
    270237    if (NULL == CU_add_test(suite, "Unarmoured, no passphrase", test_rsa_verify_noarmour_nopassphrase)) 
    271238            return NULL; 
     
    278245} 
    279246 
     247CU_pSuite suite_rsa_verify_GPGtest() 
     248{ 
     249    CU_pSuite suite = NULL; 
     250 
     251    suite = CU_add_suite("RSA Verification Suite (GPG interop)", init_suite_rsa_verify_gpgtest, clean_suite_rsa_verify); 
     252    if (!suite) 
     253            return NULL; 
     254 
     255    // add tests to suite 
     256     
     257    if (NULL == CU_add_test(suite, "Clearsigned, armoured, no passphrase", test_rsa_verify_clearsign_armour_nopassphrase)) 
     258            return NULL; 
     259     
     260    if (NULL == CU_add_test(suite, "Unarmoured, no passphrase", test_rsa_verify_noarmour_nopassphrase)) 
     261            return NULL; 
     262 
     263    /* 
     264    if (NULL == CU_add_test(suite, "Unarmoured, passphrase", test_rsa_verify_noarmour_passphrase)) 
     265            return NULL; 
     266    */ 
     267    return suite; 
     268} 
     269 
     270// EOF 
  • openpgpsdk/trunk/tests/tests.c

    r517 r523  
    1919 
    2020    mem_literal_data=ops_memory_new(); 
    21     setup_test_keys(); 
     21    setup(); 
    2222 
    2323    if (CUE_SUCCESS != CU_initialize_registry()) 
  • openpgpsdk/trunk/tests/tests.h

    r521 r523  
    3838// utility functions 
    3939 
    40 void setup_test_keys(); 
     40extern char gpgcmd[]; 
     41void setup(); 
    4142void cleanup(); 
    4243 
     
    6061ops_parse_cb_return_t 
    6162callback_data_signature(const ops_parser_content_t *content_,ops_parse_cb_info_t *cbinfo); 
     63ops_parse_cb_return_t 
     64callback_verify(const ops_parser_content_t *content_,ops_parse_cb_info_t *cbinfo); 
     65 
    6266 
    6367void reset_vars(); 
  • openpgpsdk/trunk/tests/tests_gpg.c

    r521 r523  
    1919 
    2020    mem_literal_data=ops_memory_new(); 
    21     setup_test_keys(); 
     21    setup(); 
    2222 
    2323    if (CUE_SUCCESS != CU_initialize_registry()) 
     
    3636        } 
    3737 
    38 #ifdef TODO 
    39  
    40     if (NULL == suite_rsa_decrypt_GPGtest())  
     38    if (NULL == suite_rsa_verify_GPGtest())  
    4139        { 
    4240        CU_cleanup_registry(); 
     
    4442        } 
    4543 
    46     if (NULL == suite_rsa_verify_GPGtest())  
     44#ifdef TODO 
     45 
     46    if (NULL == suite_rsa_decrypt_GPGtest())  
    4747        { 
    4848        CU_cleanup_registry();