rpm  4.5
signature.h
Go to the documentation of this file.
1 #ifndef H_SIGNATURE
2 #define H_SIGNATURE
3 
9 #include <header.h>
10 
14 typedef enum sigType_e {
16 } sigType;
17 
22 typedef enum pgpVersion_e {
25  PGP_2 = 2,
26  PGP_5 = 5
27 } pgpVersion;
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
38  /*@*/;
39 
49 rpmRC rpmReadSignature(FD_t fd, /*@null@*/ /*@out@*/ Header *sighp,
50  sigType sig_type, /*@null@*/ /*@out@*/ const char ** msg)
51  /*@globals fileSystem @*/
52  /*@modifies fd, *sighp, *msg, fileSystem @*/;
53 
60 int rpmWriteSignature(FD_t fd, Header sigh)
61  /*@globals fileSystem @*/
62  /*@modifies fd, sigh, fileSystem @*/;
63 
72 int rpmAddSignature(Header sigh, const char * file,
73  int_32 sigTag, /*@null@*/ const char * passPhrase)
74  /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
75  /*@modifies sigh, sigTag, rpmGlobalMacroContext, fileSystem, internalState @*/;
76 
77 /******************************************************************/
78 
82 #define RPMLOOKUPSIG_QUERY 0 /* Lookup type in effect */
83 #define RPMLOOKUPSIG_DISABLE 1 /* Disable (--sign was not given) */
84 #define RPMLOOKUPSIG_ENABLE 2 /* Re-enable %_signature */
85 
91 int rpmLookupSignatureType(int action)
92  /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
93  /*@modifies rpmGlobalMacroContext, internalState @*/;
94 
101 /*@dependent@*/ /*@null@*/
102 char * rpmGetPassPhrase(/*@null@*/ const char * prompt,
103  const int sigTag)
104  /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
105  /*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/;
106 
112 /*@-exportlocal -redecl@*/
113 /*@null@*/ const char * rpmDetectPGPVersion(
114  /*@null@*/ /*@out@*/ pgpVersion * pgpVer)
115  /*@globals rpmGlobalMacroContext, h_errno @*/
116  /*@modifies *pgpVer, rpmGlobalMacroContext @*/;
117 /*@=exportlocal =redecl@*/
118 
119 #ifdef __cplusplus
120 }
121 #endif
122 
123 #endif /* H_SIGNATURE */