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_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
    00048 rpmRC rpmReadSignature(FD_t fd, /*@null@*/ /*@out@*/ Header *sighp,
    00049                 sigType sig_type)
    00050         /*@globals fileSystem @*/
    00051         /*@modifies fd, *sighp, fileSystem @*/;
    00052
    00059 int rpmWriteSignature(FD_t fd, Header h)
    00060         /*@globals fileSystem @*/
    00061         /*@modifies fd, h, fileSystem @*/;
    00062
    00071 int rpmAddSignature(Header sig, const char * file,
    00072                     int_32 sigTag, /*@null@*/ const char * passPhrase)
    00073         /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/
    00074         /*@modifies sig, rpmGlobalMacroContext, fileSystem, internalState @*/;
    00075
    00076 /******************************************************************/
    00077
    00081 #define RPMLOOKUPSIG_QUERY      0
    00082 #define RPMLOOKUPSIG_DISABLE    1
    00083 #define RPMLOOKUPSIG_ENABLE     2
    00090 int rpmLookupSignatureType(int action)
    00091         /*@globals rpmGlobalMacroContext, internalState @*/
    00092         /*@modifies rpmGlobalMacroContext, internalState @*/;
    00093
    00100 /*@dependent@*/ /*@null@*/
    00101 char * rpmGetPassPhrase(/*@null@*/ const char * prompt,
    00102                 const int sigTag)
    00103         /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/
    00104         /*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/;
    00105
    00111 /*@-exportlocal -redecl@*/
    00112 /*@null@*/ const char * rpmDetectPGPVersion(
    00113                         /*@null@*/ /*@out@*/ pgpVersion * pgpVer)
    00114         /*@globals rpmGlobalMacroContext @*/
    00115         /*@modifies *pgpVer, rpmGlobalMacroContext @*/;
    00116 /*@=exportlocal =redecl@*/
    00117
    00118 #ifdef __cplusplus
    00119 }
    00120 #endif
    00121
    00122 #endif  /* H_SIGNATURE */