Server : Apache System : Linux cs317.bluehost.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : andertr9 ( 1047) PHP Version : 8.2.18 Disable Function : NONE Directory : /lib/python2.7/site-packages/rpmUtils/ |
Upload File : |
� �v_c @ s d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d � Z d � Z d � Z e d � Z d � Z d � Z d � Z d � Z d � Z d � Z e j d d � Z d � Z d � Z d � Z d � Z d � Z d S( i����Nc C s( t | � t j k r$ t | � } n | S( N( t typet typest StringTypet str( t arg( ( s6 /usr/lib/python2.7/site-packages/rpmUtils/miscutils.pyt rpmOutToStr s c C s� | \ } } } | \ } } } | d k r3 d } n t | � } t | � } t | � } | d k rl d } n t | � } t | � } t | � } t j | | | f | | | f � } | S( Nt 0( t NoneR t rpmt labelCompare( t .0t .1t e1t v1t r1t e2t v2t r2t rc( ( s6 /usr/lib/python2.7/site-packages/rpmUtils/miscutils.pyt compareEVR$ s $c C s t d | d f d | d f � S( s- compare version strings only using rpm vercmpt ( R ( R R ( ( s6 /usr/lib/python2.7/site-packages/rpmUtils/miscutils.pyt compareVerOnly9 s c C s� d } | j d � } t j | t j � } y | j | � } Wn� t j k r� } t | � d k rm d } n t | � d k r� d } n t | � d k r� d } n t | � d k r� d } q� n; Xt | � \ } } | d k r� t j | � ~ d } n ~ | r�| d k r�t j | d d � t j t j � | j | | � } | s�d } t j | d d � t j t j � | j | | � n t j t j � n y t j | � Wn t k r�} n X| j | � | S( s� Takes a transaction set and a package, check it's sigs. By default, only v4 sigs (header-only) will be verified (faster). By setting payload to True, v3 sigs (header+payload) will also be verified (slower). return 0 if they are all fine return 1 if the gpg key can't be found return 2 if the header or payload is in someway damaged return 3 if the key is not trusted return 4 if the pkg is not gpg or pgp signedi s public key not availaiablei s public key not availables public key not trustedi s error reading package headeri ie i ( t setVSFlagst ost opent O_RDONLYt hdrFromFdnoR t errorR t getSigInfot closet lseekt setVerbosityt RPMLOG_WARNINGt _verifySigst RPMLOG_INFOt RPMLOG_NOTICEt OSError( t tst packaget payloadt valuet currentflagst fdnot hdrt eR t siginfot valid( ( s6 /usr/lib/python2.7/site-packages/rpmUtils/miscutils.pyt checkSig= sH c C s� t j t j d � d } | j | � } | d k rU d } | j d � \ } } } n d } d } d } d } | | | f } | | f S( sX checks signature from an hdr hand back signature information and/or an error codet Cs� %|DSAHEADER?{%{DSAHEADER:pgpsig}}:{%|RSAHEADER?{%{RSAHEADER:pgpsig}}:{%|SIGGPG?{%{SIGGPG:pgpsig}}:{%|SIGPGP?{%{SIGPGP:pgpsig}}:{(none)}|}|}|}|s (none)i t ,ie t MD5R ( t localet setlocalet LC_ALLt sprintft split( R+ t stringR- R t sigtypet sigdatet sigidt infotuple( ( s6 /usr/lib/python2.7/site-packages/rpmUtils/miscutils.pyR { s c C s� | d } | t j s* | t j d k r7 | d } n d } | d } | d } | d } | d k rp d } n | | | | | f } | S( s^ return a pkgtuple (n, a, e, v, r) from a hdr object, converts None epoch to 0, as well.t namei t archt srct versiont releaset epochR N( R t RPMTAG_SOURCERPMt RPMTAG_SOURCEPACKAGER ( R+ R= R>