mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
added some trust model stuff
This commit is contained in:
parent
1ce26aa6d6
commit
4ec1775f3e
49 changed files with 1580 additions and 331 deletions
|
@ -78,6 +78,7 @@ int check_pubkey_algo( int algo );
|
|||
int check_digest_algo( int algo );
|
||||
|
||||
/*-- random.c --*/
|
||||
int quick_random_gen( int onoff );
|
||||
void randomize_buffer( byte *buffer, size_t length, int level );
|
||||
byte get_random_byte( int level );
|
||||
|
||||
|
|
|
@ -53,5 +53,6 @@
|
|||
#define G10ERR_RESOURCE_LIMIT 31
|
||||
#define G10ERR_INV_KEYRING 32
|
||||
#define G10ERR_TRUSTDB 33 /* a problem with the trustdb */
|
||||
#define G10ERR_BAD_CERT 34 /* bad certicate */
|
||||
|
||||
#endif /*G10_ERRORS_H*/
|
||||
|
|
|
@ -93,6 +93,7 @@ u32 iobuf_get_filelength( IOBUF a );
|
|||
const char *iobuf_get_fname( IOBUF a );
|
||||
|
||||
void iobuf_set_block_mode( IOBUF a, size_t n );
|
||||
void iobuf_set_partial_block_mode( IOBUF a, size_t len );
|
||||
int iobuf_in_block_mode( IOBUF a );
|
||||
|
||||
/* get a byte form the iobuf; must check for eof prior to this function
|
||||
|
|
|
@ -41,7 +41,6 @@ int mpi_debug_mode;
|
|||
|
||||
#define BITS_PER_MPI_LIMB (8*SIZEOF_UNSIGNED_LONG)
|
||||
#define BYTES_PER_MPI_LIMB SIZEOF_UNSIGNED_LONG
|
||||
#define BYTES_PER_MPI_LIMB2 (2*SIZEOF_UNSIGNED_LONG)
|
||||
typedef unsigned long int mpi_limb_t;
|
||||
typedef signed long int mpi_limb_signed_t;
|
||||
|
||||
|
|
|
@ -58,20 +58,38 @@ typedef struct {
|
|||
/*-- logger.c --*/
|
||||
void log_set_pid( int pid );
|
||||
int log_get_errorcount( int clear );
|
||||
void printstr( int level, const char *fmt, ... );
|
||||
void log_bug( const char *fmt, ... );
|
||||
void log_fatal( const char *fmt, ... );
|
||||
void log_error( const char *fmt, ... );
|
||||
void log_info( const char *fmt, ... );
|
||||
void log_debug( const char *fmt, ... );
|
||||
void log_hexdump( const char *text, char *buf, size_t len );
|
||||
void log_mpidump( const char *text, MPI a );
|
||||
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5 )
|
||||
void printstr( int level, const char *fmt, ... )
|
||||
__attribute__ ((format (printf,2,3)));
|
||||
void log_bug( const char *fmt, ... )
|
||||
__attribute__ ((noreturn, format (printf,1,2)));
|
||||
void log_bug0( void ) __attribute__ ((noreturn));
|
||||
void log_fatal( const char *fmt, ... )
|
||||
__attribute__ ((noreturn, format (printf,1,2)));
|
||||
void log_error( const char *fmt, ... ) __attribute__ ((format (printf,1,2)));
|
||||
void log_info( const char *fmt, ... ) __attribute__ ((format (printf,1,2)));
|
||||
void log_debug( const char *fmt, ... ) __attribute__ ((format (printf,1,2)));
|
||||
#else
|
||||
void printstr( int level, const char *fmt, ... );
|
||||
void log_bug( const char *fmt, ... );
|
||||
void log_bug0( void );
|
||||
void log_fatal( const char *fmt, ... );
|
||||
void log_error( const char *fmt, ... );
|
||||
void log_info( const char *fmt, ... );
|
||||
void log_debug( const char *fmt, ... );
|
||||
#endif
|
||||
|
||||
|
||||
/*-- errors.c --*/
|
||||
const char * g10_errstr( int no );
|
||||
|
||||
/*-- argparse.c --*/
|
||||
int arg_parse( ARGPARSE_ARGS *arg, ARGPARSE_OPTS *opts);
|
||||
int optfile_parse( FILE *fp, const char *filename, unsigned *lineno,
|
||||
ARGPARSE_ARGS *arg, ARGPARSE_OPTS *opts);
|
||||
void usage( int level );
|
||||
const char *default_strusage( int level );
|
||||
|
||||
|
@ -112,5 +130,6 @@ char *strlwr(char *a);
|
|||
#define STR2(v) STR(v)
|
||||
#define DIM(v) (sizeof(v)/sizeof((v)[0]))
|
||||
#define DIMof(type,member) DIM(((type *)0)->member)
|
||||
#define BUG() log_bug0()
|
||||
|
||||
#endif /*G10_UTIL_H*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue