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 /*@-enummemuse@*/
00018     RPMSIGTYPE_BAD      = 2,    
00019 /*@=enummemuse@*/
00020     RPMSIGTYPE_MD5      = 3,    
00021     RPMSIGTYPE_MD5_PGP  = 4,    
00022     RPMSIGTYPE_HEADERSIG= 5,    
00023     RPMSIGTYPE_DISABLE  = 6,    
00024 } sigType;
00025 
00030 typedef enum pgpVersion_e {
00031     PGP_NOTDETECTED     = -1,
00032     PGP_UNKNOWN         = 0,
00033     PGP_2               = 2,
00034     PGP_5               = 5
00035 } pgpVersion;
00036 
00037 #ifdef __cplusplus
00038 extern "C" {
00039 #endif
00040 
00045 Header rpmNewSignature(void)    /*@*/;
00046 
00055 rpmRC rpmReadSignature(FD_t fd, /*@null@*/ /*@out@*/ Header *headerp,
00056                 sigType sig_type)
00057         /*@modifies fd, *headerp @*/;
00058 
00065 int rpmWriteSignature(FD_t fd, Header h)
00066         /*@modifies fd, h, fileSystem @*/;
00067 
00071 int rpmAddSignature(Header h, const char * file,
00072                     int_32 sigTag, /*@null@*/ const char * passPhrase)
00073         /*@modifies h @*/;
00074 
00075 /******************************************************************/
00076 
00077 /* Possible actions for rpmLookupSignatureType() */
00078 #define RPMLOOKUPSIG_QUERY      0       /* Lookup type in effect          */
00079 #define RPMLOOKUPSIG_DISABLE    1       /* Disable (--sign was not given) */
00080 #define RPMLOOKUPSIG_ENABLE     2       /* Re-enable %_signature          */
00081 
00085 int rpmLookupSignatureType(int action)
00086         /*@modifies internalState @*/;
00087 
00091 /*@null@*/ char * rpmGetPassPhrase(const char *prompt, const int sigTag)
00092         /*@modifies fileSystem @*/;
00093 
00097 /*@-redecl@*/
00098 /*@null@*/ const char * rpmDetectPGPVersion(
00099                         /*@null@*/ /*@out@*/ pgpVersion * pgpVer)
00100         /*@modifies *pgpVer, fileSystem @*/;
00101 /*@=redecl@*/
00102 
00103 #ifdef __cplusplus
00104 }
00105 #endif
00106 
00107 #endif  /* H_SIGNATURE */

Generated at Mon Sep 24 10:37:22 2001 for rpm by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001