Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

lib/signature.h

Go to the documentation of this file.
00001 #ifndef H_SIGNATURE
00002 #define H_SIGNATURE
00003 
00009 #include <header.h>
00010 
00014 typedef enum sigType_e {
00015     RPMSIGTYPE_NONE     = 0,    
00016     RPMSIGTYPE_PGP262_1024 = 1, 
00017     RPMSIGTYPE_BAD      = 2,    
00018     RPMSIGTYPE_MD5      = 3,    
00019     RPMSIGTYPE_MD5_PGP  = 4,    
00020     RPMSIGTYPE_HEADERSIG= 5,    
00021     RPMSIGTYPE_DISABLE  = 6,    
00022 } sigType;
00023 
00028 typedef enum pgpVersion_e {
00029     PGP_NOTDETECTED     = -1,
00030     PGP_UNKNOWN         = 0,
00031     PGP_2               = 2,
00032     PGP_5               = 5
00033 } pgpVersion;
00034 
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif
00038 
00043 Header rpmNewSignature(void);
00044 
00053 rpmRC rpmReadSignature(FD_t fd, /*@out@*/ Header *header, sigType sig_type);
00054 
00061 int rpmWriteSignature(FD_t fd, Header header);
00062 
00066 int rpmAddSignature(Header h, const char *file,
00067                     int_32 sigTag, const char *passPhrase);
00068 
00069 /******************************************************************/
00070 
00071 /* Possible actions for rpmLookupSignatureType() */
00072 #define RPMLOOKUPSIG_QUERY      0       /* Lookup type in effect          */
00073 #define RPMLOOKUPSIG_DISABLE    1       /* Disable (--sign was not given) */
00074 #define RPMLOOKUPSIG_ENABLE     2       /* Re-enable %_signature          */
00075 
00079 int rpmLookupSignatureType(int action);
00080 
00084 char * rpmGetPassPhrase(const char *prompt, const int sigTag);
00085 
00089 /*@null@*/ const char * rpmDetectPGPVersion( /*@out@*/ pgpVersion *pgpVersion);
00090 
00091 #ifdef __cplusplus
00092 }
00093 #endif
00094 
00095 #endif  /* H_SIGNATURE */

Generated at Thu Apr 19 15:29:44 2001 for rpm by doxygen1.2.6-20010408 written by Dimitri van Heesch, © 1997-2001