Changeset 240

Show
Ignore:
Timestamp:
10/15/05 14:00:07
Author:
ben
Message:

Partway through moving headers into their own directory, plus some cleanup.

Files:

Legend:

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

    r235 r240  
    66#include "lists.h" 
    77#include "ops_errors.h" 
    8 #include "armour.h" 
     8#include <openpgpsdk/armour.h> 
    99#include "crypto.h" 
    1010 
  • openpgpsdk/trunk/examples/verify.c

    r183 r240  
    22#include "packet-parse.h" 
    33#include "util.h" 
    4 #include "accumulate.h" 
     4#include <openpgpsdk/accumulate.h> 
    55#include "keyring.h" 
    66#include "validate.h" 
  • openpgpsdk/trunk/examples/verify2.c

    r239 r240  
    22#include "packet-parse.h" 
    33#include "util.h" 
    4 #include "accumulate.h" 
     4#include <openpgpsdk/accumulate.h> 
    55#include "keyring.h" 
    66#include "validate.h" 
    7 #include "armour.h" 
     7#include <openpgpsdk/armour.h> 
    88#include "crypto.h" 
    99#include "signature.h" 
  • openpgpsdk/trunk/include/create.h

    r177 r240  
    6060void ops_create_rsa_public_key(ops_public_key_t *key,time_t time, 
    6161                               const BIGNUM *n,const BIGNUM *e); 
     62void ops_build_public_key(ops_memory_t *out,const ops_public_key_t *key, 
     63                          ops_boolean_t make_packet); 
    6264ops_boolean_t ops_write_struct_public_key(const ops_public_key_t *key, 
    6365                                          ops_create_options_t *opt); 
  • openpgpsdk/trunk/src/Makefile.template

    r223 r240  
    99all: Makefile headers .depend libops.a 
    1010 
    11 LIBOBJS = packet-parse.o util.o openssl_crypto.o accumulate.o build.o
     11LIBOBJS = packet-parse.o util.o openssl_crypto.o accumulate.o
    1212        memory.o fingerprint.o hash.o keyring.o signature.o compress.o \ 
    1313        packet-show.o create.o validate.o lists.o ops_errors.o armour.o 
  • openpgpsdk/trunk/src/accumulate.c

    r183 r240  
    55#include "packet-parse.h" 
    66#include "util.h" 
    7 #include "accumulate.h" 
     7#include "openpgpsdk/accumulate.h" 
    88#include "keyring_local.h" 
    99#include "signature.h" 
  • openpgpsdk/trunk/src/armour.c

    r238 r240  
    11#include "configure.h" 
    2 #include "armour.h" 
     2#include <openpgpsdk/armour.h> 
    33#include "util.h" 
    44#include "crypto.h" 
  • openpgpsdk/trunk/src/compress.c

    r135 r240  
    22 */ 
    33 
    4 #include "compress.h" 
     4#include <openpgpsdk/compress.h> 
    55#include <zlib.h> 
    66#include <assert.h> 
  • openpgpsdk/trunk/src/create.c

    r177 r240  
    44#include "create.h" 
    55#include "util.h" 
    6 #include "build.h" 
    76#include <string.h> 
    87#include <assert.h> 
  • openpgpsdk/trunk/src/fingerprint.c

    r237 r240  
    55#include "crypto.h" 
    66#include "memory.h" 
    7 #include "build.h" 
     7#include "create.h" 
    88#include <assert.h> 
    99#include <string.h> 
  • openpgpsdk/trunk/src/memory.c

    r237 r240  
    6767    return OPS_W_OK; 
    6868    } 
     69 
     70void ops_memory_make_packet(ops_memory_t *out,ops_content_tag_t tag) 
     71    { 
     72    size_t extra; 
     73 
     74    if(out->length < 192) 
     75        extra=1; 
     76    else if(out->length < 8384) 
     77        extra=2; 
     78    else 
     79        extra=5; 
     80 
     81    ops_memory_pad(out,extra+1); 
     82    memmove(out->buf+extra+1,out->buf,out->length); 
     83 
     84    out->buf[0]=OPS_PTAG_ALWAYS_SET|OPS_PTAG_NEW_FORMAT|tag; 
     85 
     86    if(out->length < 192) 
     87        out->buf[1]=out->length; 
     88    else if(out->length < 8384) 
     89        { 
     90        out->buf[1]=((out->length-192) >> 8)+192; 
     91        out->buf[2]=out->length-192; 
     92        } 
     93    else 
     94        { 
     95        out->buf[1]=0xff; 
     96        out->buf[2]=out->length >> 24; 
     97        out->buf[3]=out->length >> 16; 
     98        out->buf[4]=out->length >> 8; 
     99        out->buf[5]=out->length; 
     100        } 
     101 
     102    out->length+=extra+1; 
     103    } 
  • openpgpsdk/trunk/src/packet-parse.c

    r239 r240  
    77#include "packet-parse.h" 
    88#include "util.h" 
    9 #include "compress.h" 
     9#include <openpgpsdk/compress.h> 
    1010#include "lists.h" 
    1111#include "ops_errors.h" 
  • openpgpsdk/trunk/src/signature.c

    r237 r240  
    55#include "crypto.h" 
    66#include "memory.h" 
    7 #include "build.h" 
    87#include "create.h" 
    98#include <assert.h>