The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 ТемаНаборКатегория 
 
 [Cписок руководств | Печать]

signature (3)
  • >> signature (3) ( Linux man: Библиотечные вызовы )
  •  

    NAME

    SIGNATURE. - 
     
    

    Files


    file digest.c

    file rpmlib.h

    file rpmpgp.c
    Routines to handle RFC-2440 detached signatures.


    file signature.c

    file signature.h
    Generate and verify signatures.

     

    RPMK


    enum rpmtagSignature { RPMSIGTAG_SIZE = 1000, RPMSIGTAG_LEMD5_1 = 1001, RPMSIGTAG_PGP = 1002, RPMSIGTAG_LEMD5_2 = 1003, RPMSIGTAG_MD5 = 1004, RPMSIGTAG_GPG = 1005, RPMSIGTAG_PGP5 = 1006, RPMSIGTAG_PAYLOADSIZE = 1007, RPMSIGTAG_BADSHA1_1 = RPMTAG_BADSHA1_1, RPMSIGTAG_BADSHA1_2 = RPMTAG_BADSHA1_2, RPMSIGTAG_SHA1 = RPMTAG_SHA1HEADER, RPMSIGTAG_DSA = RPMTAG_DSAHEADER, RPMSIGTAG_RSA = RPMTAG_RSAHEADER }

    rpmVerifySignatureReturn rpmVerifySignature (const char *file, int_32 sigTag, const void *sig, int count, char *result)

    Header rpmFreeSignature (Header h)
     

    Typedefs


    typedef enum sigType_e sigType

    typedef enum pgpVersion_e pgpVersion
     

    Enumerations


    enum sigType_e { RPMSIGTYPE_NONE = 0, RPMSIGTYPE_PGP262_1024 = 1, RPMSIGTYPE_BAD = 2, RPMSIGTYPE_MD5 = 3, RPMSIGTYPE_MD5_PGP = 4, RPMSIGTYPE_HEADERSIG = 5, RPMSIGTYPE_DISABLE = 6 }

    enum pgpVersion_e { PGP_NOTDETECTED = -1, PGP_UNKNOWN = 0, PGP_2 = 2, PGP_5 = 5 }
     

    Functions


    Header rpmNewSignature (void)

    rpmRC rpmReadSignature (FD_t fd, Header *headerp, sigType sig_type)

    int rpmWriteSignature (FD_t fd, Header h)

    int rpmAddSignature (Header h, const char *file, int_32 sigTag, const char *passPhrase)

    int rpmLookupSignatureType (int action)

    char * rpmGetPassPhrase (const char *prompt, const int sigTag)

    const char * rpmDetectPGPVersion (pgpVersion *pgpVer)
     

    TYPEDEF DOCUMENTATION

     

    typedef enum pgpVersion_e pgpVersion

    Identify PGP versions.

    Note: Greater than 0 is a valid PGP version.

    Referenced by checkPassPhrase(), makePGPSignature(), rpmDetectPGPVersion(), and verifyPGPSignature().  

    typedef enum sigType_e sigType

    Signature types stored in rpm lead.

    Referenced by rpmReadSignature().  

    ENUMERATION TYPE DOCUMENTATION

     

    enum pgpVersion_e

    Identify PGP versions.

    Note: Greater than 0 is a valid PGP version.

    Enumeration values:

    PGP_NOTDETECTED
    PGP_UNKNOWN
    PGP_2
    PGP_5

    Definition at line 30 of file signature.h.  

    enum rpmtagSignature

    Tags found in signature header from package.

    Enumeration values:

    RPMSIGTAG_SIZE
    Header+Payload size in bytes.
    RPMSIGTAG_LEMD5_1
    Broken MD5, take 1
    RPMSIGTAG_PGP
    PGP 2.6.3 signature.
    RPMSIGTAG_LEMD5_2
    Broken MD5, take 2
    RPMSIGTAG_MD5
    MD5 signature.
    RPMSIGTAG_GPG
    GnuPG signature.
    RPMSIGTAG_PGP5
    PGP5 signature

    Deprecated: legacy.

    RPMSIGTAG_PAYLOADSIZE
    uncompressed payload size in bytes.
    RPMSIGTAG_BADSHA1_1
    Broken SHA1, take 1.
    RPMSIGTAG_BADSHA1_2
    Broken SHA1, take 2.
    RPMSIGTAG_SHA1
    sha1 header digest.
    RPMSIGTAG_DSA
    DSA header signature.
    RPMSIGTAG_RSA
    RSA header signature.

    Definition at line 1742 of file rpmlib.h.  

    enum sigType_e

    Signature types stored in rpm lead.

    Enumeration values:

    RPMSIGTYPE_NONE
    unused, legacy.
    RPMSIGTYPE_PGP262_1024
    unused, legacy.
    RPMSIGTYPE_BAD
    Unknown signature type.
    RPMSIGTYPE_MD5
    unused, legacy.
    RPMSIGTYPE_MD5_PGP
    unused, legacy.
    RPMSIGTYPE_HEADERSIG
    Header style signature
    RPMSIGTYPE_DISABLE
    Disable verification (debugging only)

    Definition at line 14 of file signature.h.  

    FUNCTION DOCUMENTATION

     

    int rpmAddSignature (Header h, const char * file, int_32 sigTag, const char * passPhrase)

    Generate a signature of data in file, insert in header.

    Definition at line 446 of file signature.c.

    References _, headerAddEntry(), int_32, makeGPGSignature(), makePGPSignature(), mdbinfile(), RPM_BIN_TYPE, RPM_INT32_TYPE, RPMMESS_VERBOSE, rpmMessage, RPMSIGTAG_GPG, RPMSIGTAG_MD5, RPMSIGTAG_PGP, RPMSIGTAG_PGP5, and RPMSIGTAG_SIZE.

    Referenced by rpmReSign(), and writeRPM().  

    const char* rpmDetectPGPVersion (pgpVersion * pgpVer)

    Return path to pgp executable of given type, or NULL when not found.

    Definition at line 68 of file signature.c.

    References _free(), alloca(), PGP_2, PGP_5, PGP_NOTDETECTED, PGP_UNKNOWN, pgpVersion, rpmGetPath(), and stpcpy().

    Referenced by checkPassPhrase(), main(), makePGPSignature(), and verifyPGPSignature().  

    Header rpmFreeSignature (Header h)

    Destroy signature header from package.

    Parameters:

    h
    signature header

    Returns: NULL always

    Definition at line 240 of file signature.c.

    References headerFree().

    Referenced by psmStage(), readPackageHeaders(), rpmReadPackageHeader(), and writeRPM().  

    char* rpmGetPassPhrase (const char * prompt, const int sigTag)

    Read a pass phrase from the user.

    Definition at line 926 of file signature.c.

    References _, _free(), checkPassPhrase(), RPMERR_SIGGEN, rpmError, rpmExpand(), RPMSIGTAG_GPG, RPMSIGTAG_PGP, and RPMSIGTAG_PGP5.

    Referenced by main().  

    int rpmLookupSignatureType (int action)

    Return type of signature in effect for building.

    Definition at line 31 of file signature.c.

    References _free(), rpmExpand(), RPMLOOKUPSIG_DISABLE, RPMLOOKUPSIG_ENABLE, RPMLOOKUPSIG_QUERY, RPMSIGTAG_GPG, RPMSIGTAG_PGP, and xstrcasecmp().

    Referenced by main(), rpmReSign(), and writeRPM().  

    Header rpmNewSignature (void)

    Return new, empty (signature) header instance.

    Returns: signature header

    Definition at line 234 of file signature.c.

    References headerNew().

    Referenced by headerRegenSigHeader(), and writeRPM().  

    rpmRC rpmReadSignature (FD_t fd, Header * headerp, sigType sig_type)

    Read (and verify header+archive size) signature header. If an old-style signature is found, we emulate a new style one.

    Parameters:

    fd
    file handle

    Return values:

    headerp
    address of (signature) header (or NULL)

    Parameters:

    sig_type
    type of signature header to read (from lead)

    Returns: rpmRC return code

    Definition at line 150 of file signature.c.

    References _, checkSize(), HEADER_MAGIC_YES, headerAddEntry(), headerFree(), headerGetEntry(), headerNew(), headerRead(), headerSizeof(), int_32, RPM_BIN_TYPE, RPMERR_BADSIGTYPE, rpmError, RPMMESS_DEBUG, rpmMessage, rpmRC, RPMRC_FAIL, RPMRC_OK, RPMRC_SHORTREAD, RPMSIGTAG_PGP, RPMSIGTAG_SIZE, RPMSIGTYPE_DISABLE, RPMSIGTYPE_HEADERSIG, RPMSIGTYPE_MD5, RPMSIGTYPE_MD5_PGP, RPMSIGTYPE_NONE, RPMSIGTYPE_PGP262_1024, sigType, and timedRead.

    Referenced by main(), readPackageHeaders(), rpmCheckSig(), and rpmReSign().  

    rpmVerifySignatureReturn rpmVerifySignature (const char * file, int_32 sigTag, const void * sig, int count, char * result)

    Verify a signature from a package.

    Parameters:

    file
    file name of header+payload
    sigTag
    type of signature
    sig
    signature itself
    count
    no. of bytes in signature

    Return values:

    result
    detailed text result of signature verification

    Returns: result of signature verification

    Definition at line 973 of file signature.c.

    References _, int_32, RPMSIG_UNKNOWN, RPMSIGTAG_GPG, RPMSIGTAG_LEMD5_1, RPMSIGTAG_LEMD5_2, RPMSIGTAG_MD5, RPMSIGTAG_PGP, RPMSIGTAG_PGP5, RPMSIGTAG_SIZE, rpmVerifySignatureReturn, verifyGPGSignature(), verifyMD5Signature(), verifyPGPSignature(), and verifySizeSignature().

    Referenced by rpmCheckSig().  

    int rpmWriteSignature (FD_t fd, Header h)

    Write signature header.

    Parameters:

    fd
    file handle
    h
    (signature) header

    Returns: 0 on success, 1 on error

    Definition at line 214 of file signature.c.

    References _, Fwrite(), HEADER_MAGIC_YES, headerSizeof(), headerWrite(), RPMMESS_DEBUG, and rpmMessage.

    Referenced by main(), psmStage(), rpmReSign(), and writeRPM().


     

    Index

    NAME
    Files
    RPMK
    Typedefs
    Enumerations
    Functions
    TYPEDEF DOCUMENTATION
    typedef enum pgpVersion_e pgpVersion
    typedef enum sigType_e sigType
    ENUMERATION TYPE DOCUMENTATION
    enum pgpVersion_e
    enum rpmtagSignature
    enum sigType_e
    FUNCTION DOCUMENTATION
    int rpmAddSignature (Header h, const char * file, int_32 sigTag, const char * passPhrase)
    const char* rpmDetectPGPVersion (pgpVersion * pgpVer)
    Header rpmFreeSignature (Header h)
    char* rpmGetPassPhrase (const char * prompt, const int sigTag)
    int rpmLookupSignatureType (int action)
    Header rpmNewSignature (void)
    rpmRC rpmReadSignature (FD_t fd, Header * headerp, sigType sig_type)
    rpmVerifySignatureReturn rpmVerifySignature (const char * file, int_32 sigTag, const void * sig, int count, char * result)
    int rpmWriteSignature (FD_t fd, Header h)


    Поиск по тексту MAN-ов: 




    Партнёры:
    PostgresPro
    Inferno Solutions
    Hosting by Hoster.ru
    Хостинг:

    Закладки на сайте
    Проследить за страницей
    Created 1996-2024 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру