Changeset 537

Show
Ignore:
Timestamp:
02/01/08 11:36:28
Author:
rachel
Message:

Removed unnecessary deconstifications

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openpgpsdk/trunk/include/openpgpsdk/signature.h

    r533 r537  
    4646                                       ops_sig_type_t type); 
    4747void ops_signature_start_cleartext_signature(ops_create_signature_t *sig, 
    48                                              ops_secret_key_t *key, 
    49                                              ops_hash_algorithm_t hash, 
    50                                              ops_sig_type_t type); 
     48                                             const ops_secret_key_t *key, 
     49                                             const ops_hash_algorithm_t hash, 
     50                                             const ops_sig_type_t type); 
    5151void ops_signature_start_message_signature(ops_create_signature_t *sig, 
    52                                              ops_secret_key_t *key, 
    53                                              ops_hash_algorithm_t hash, 
    54                                              ops_sig_type_t type); 
    55 /* 
    56 void ops_signature_start_signature(ops_create_signature_t *sig, 
    57                                              ops_secret_key_t *key, 
    58                                              ops_hash_algorithm_t hash, 
    59                                              ops_sig_type_t type); 
    60 */ 
     52                                             const ops_secret_key_t *key, 
     53                                             const ops_hash_algorithm_t hash, 
     54                                             const ops_sig_type_t type); 
     55 
    6156void ops_signature_add_data(ops_create_signature_t *sig,const void *buf, 
    6257                            size_t length); 
    6358ops_hash_t *ops_signature_get_hash(ops_create_signature_t *sig); 
    6459void ops_signature_hashed_subpackets_end(ops_create_signature_t *sig); 
    65 void ops_write_signature(ops_create_signature_t *sig,ops_public_key_t *key, 
    66                          ops_secret_key_t *skey,ops_create_info_t *opt); 
     60void ops_write_signature(ops_create_signature_t *sig,const ops_public_key_t *key, 
     61                         const ops_secret_key_t *skey, const ops_create_info_t *opt); 
    6762void ops_signature_add_creation_time(ops_create_signature_t *sig,time_t when); 
    6863void ops_signature_add_issuer_key_id(ops_create_signature_t *sig, 
  • openpgpsdk/trunk/src/advanced/adv_signature.c

    r533 r537  
    552552 
    553553static void ops_signature_start_signature(ops_create_signature_t *sig, 
    554                                              ops_secret_key_t *key, 
    555                                              ops_hash_algorithm_t hash, 
    556                                              ops_sig_type_t type) 
     554                                             const ops_secret_key_t *key, 
     555                                             const ops_hash_algorithm_t hash, 
     556                                             const ops_sig_type_t type) 
    557557    { 
    558558    sig->info=ops_create_info_new(); 
     
    575575 
    576576void ops_signature_start_cleartext_signature(ops_create_signature_t *sig, 
    577                                    ops_secret_key_t *key, 
    578                                    ops_hash_algorithm_t hash, 
    579                                    ops_sig_type_t type) 
     577                                   const ops_secret_key_t *key, 
     578                                   const ops_hash_algorithm_t hash, 
     579                                   const ops_sig_type_t type) 
    580580    { 
    581581    ops_signature_start_signature(sig,key,hash,type); 
     
    583583 
    584584void ops_signature_start_message_signature(ops_create_signature_t *sig, 
    585                                    ops_secret_key_t *key, 
    586                                    ops_hash_algorithm_t hash, 
    587                                    ops_sig_type_t type) 
     585                                   const ops_secret_key_t *key, 
     586                                   const ops_hash_algorithm_t hash, 
     587                                   const ops_sig_type_t type) 
    588588    { 
    589589    ops_signature_start_signature(sig,key,hash,type); 
     
    639639 */ 
    640640 
    641 void ops_write_signature(ops_create_signature_t *sig,ops_public_key_t *key, 
    642                          ops_secret_key_t *skey,ops_create_info_t *info) 
     641void ops_write_signature(ops_create_signature_t *sig, const ops_public_key_t *key, 
     642                         const ops_secret_key_t *skey, const ops_create_info_t *info) 
    643643    { 
    644644    size_t l=ops_memory_get_length(sig->mem); 
  • openpgpsdk/trunk/src/standard/std_signature.c

    r534 r537  
    6060    // set up signature 
    6161    sig=ops_create_signature_new(); 
    62     ops_signature_start_cleartext_signature(sig,(ops_secret_key_t *)skey,OPS_HASH_SHA1,OPS_SIG_BINARY); 
     62    ops_signature_start_cleartext_signature(sig,skey,OPS_HASH_SHA1,OPS_SIG_BINARY); 
    6363 
    6464    // set up output file 
     
    9191    ops_signature_hashed_subpackets_end(sig); 
    9292 
    93     ops_write_signature(sig,(ops_public_key_t *)&skey->public_key,(ops_secret_key_t *)skey,cinfo); 
     93    ops_write_signature(sig,&skey->public_key,skey,cinfo); 
    9494    ops_writer_close(cinfo); 
    9595    close(fd_out); 
     
    132132    // set up signature 
    133133    sig=ops_create_signature_new(); 
    134     ops_signature_start_message_signature(sig,(ops_secret_key_t *)skey, hash_alg, sig_type); 
     134    ops_signature_start_message_signature(sig, skey, hash_alg, sig_type); 
    135135 
    136136    // set up output file 
     
    174174 
    175175    // write out sig 
    176     ops_write_signature(sig,(ops_public_key_t *)&skey->public_key,(ops_secret_key_t *)skey,cinfo); 
     176    ops_write_signature(sig,&skey->public_key,skey,cinfo); 
    177177    ops_writer_close(cinfo); 
    178178    close(fd_out);