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_HEADERSIG= 5     
00016 } sigType;
00017 
00022 typedef enum pgpVersion_e {
00023     PGP_NOTDETECTED     = -1,
00024     PGP_UNKNOWN         = 0,
00025     PGP_2               = 2,
00026     PGP_5               = 5
00027 } pgpVersion;
00028 
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif
00032 
00037 Header rpmNewSignature(void)
00038         /*@*/;
00039 
00049 rpmRC rpmReadSignature(FD_t fd, /*@null@*/ /*@out@*/ Header *sighp,
00050                 sigType sig_type, /*@null@*/ /*@out@*/ const char ** msg)
00051         /*@globals fileSystem @*/
00052         /*@modifies fd, *sighp, *msg, fileSystem @*/;
00053 
00060 int rpmWriteSignature(FD_t fd, Header h)
00061         /*@globals fileSystem @*/
00062         /*@modifies fd, h, fileSystem @*/;
00063 
00072 int rpmAddSignature(Header sigh, const char * file,
00073                     int_32 sigTag, /*@null@*/ const char * passPhrase)
00074         /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
00075         /*@modifies sigh, rpmGlobalMacroContext, fileSystem, internalState @*/;
00076 
00077 /******************************************************************/
00078 
00082 #define RPMLOOKUPSIG_QUERY      0       /* Lookup type in effect          */
00083 #define RPMLOOKUPSIG_DISABLE    1       /* Disable (--sign was not given) */
00084 #define RPMLOOKUPSIG_ENABLE     2       /* Re-enable %_signature          */
00085 
00091 int rpmLookupSignatureType(int action)
00092         /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
00093         /*@modifies rpmGlobalMacroContext, internalState @*/;
00094 
00101 /*@dependent@*/ /*@null@*/
00102 char * rpmGetPassPhrase(/*@null@*/ const char * prompt,
00103                 const int sigTag)
00104         /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
00105         /*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/;
00106 
00112 /*@-exportlocal -redecl@*/
00113 /*@null@*/ const char * rpmDetectPGPVersion(
00114                         /*@null@*/ /*@out@*/ pgpVersion * pgpVer)
00115         /*@globals rpmGlobalMacroContext, h_errno @*/
00116         /*@modifies *pgpVer, rpmGlobalMacroContext @*/;
00117 /*@=exportlocal =redecl@*/
00118 
00119 #ifdef __cplusplus
00120 }
00121 #endif
00122 
00123 #endif  /* H_SIGNATURE */

Generated on Fri Oct 12 08:44:54 2007 for rpm by  doxygen 1.5.2