??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
ó
òõ)gc @ sM d d l Z d d l Z d d l Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m
Z
d d l Z e
j e
j
g Z d
Z d Z d Z e d
„ Z d „ Z d „ Z e j e j e j ƒ d d d d ƒe d d „ ƒ Z d e f d „ ƒ YZ e j d „ ƒ Z d „ Z d S( iÿÿÿÿNi ( t utils( t auth( t selinux( t
http_utils( t config( t errors( t constantss /usr/bin/gpgs /var/lib/kcare/gpgs release.content.jsonc C s¶ t j } | r t j } n t j r: t d d d … } n t } xU | D]M } y | | | ƒ } PWqG t j k
r“ } | | d k r” | ‚ q” qG XqG W| | } t j
| | ƒ | S( Niÿÿÿÿ( R t urlopenR t urlopen_authR t FORCE_JSON_SIG_V3t SIG_VERIFY_ORDERR t NotFoundR t save_to_file( t urlt dstt do_autht
urlopen_localt sig_extst sig_extt signaturet nft sig_dst( ( s+ /usr/libexec/kcare/python/kcarectl/fetch.pyt fetch_signature s
c C s1 t j j t ƒ s- t j d j t ƒ ƒ ‚ n d S( Ns$ No {0} present. Please install gnupg( t ost patht isfilet GPG_BINR t
KcareErrort format( ( ( s+ /usr/libexec/kcare/python/kcarectl/fetch.pyt
check_gpg_bin0 s c C s
t ƒ | j t j ƒ r‚ t j j t d ƒ } y t j | | | ƒ Wq t j
k
r~ } t j d j
| t | ƒ ƒ ƒ ‚ q Xn‡ t | d ƒ } | j ƒ } Wd QXt j j t d ƒ } y t j | | | ƒ Wn4 t k
r} t j d j
| t | ƒ ƒ ƒ ‚ n Xd S( s8
Check a file signature using the gpg tool.
If signature is wrong BadSignatureException will be raised.
:param file_path: path to file which signature will be checked
:param signature: a file with the signature
:return: True in case of valid signature
:raises: BadSignatureException
s root-keys.jsons Bad Signature: {0}: {1}t rbNs
kcare_pub.key( R t endswithR t SIG_JSONR R t joint GPG_KEY_DIRt kcsig_verifyt verifyt ErrorR t BadSignatureExceptionR t strt opent readt run_gpg_verifyt Exception( t file_pathR t root_keyst et ft sigdatat keyring( ( s+ /usr/libexec/kcare/python/kcarectl/fetch.pyt check_gpg_signature5 s
(t counti t delayi c C s† t j | ƒ } t j | ƒ } t j | | ƒ | rG | j | | ƒ n+ | rr t | | d t ƒ} t | | ƒ n t
j | | ƒ | S( NR ( R R R t selinux_safe_tmpnameR R t checkR t TrueR2 R t rename( R
R t check_signaturet hash_checkert responset tmpR ( ( s+ /usr/libexec/kcare/python/kcarectl/fetch.pyt fetch_urlT s t HashCheckerc B s e Z d „ Z d „ Z RS( c C sK | | _ t j | ƒ j d ƒ d | _ t j t j | ƒ ƒ d | _ d S( Nt /t files( t content_fileR t get_patch_server_urlt rstript
url_prefixt jsont loadst read_filet hashes( t selft baseurlRA ( ( s+ /usr/libexec/kcare/python/kcarectl/fetch.pyt __init__e s c C s£ | t | j ƒ } | | j k rC t j d j | | j ƒ ƒ ‚ n t j t j
| ƒ ƒ j ƒ } | j | d } | | k rŸ t j d j | | | ƒ ƒ ‚ n d S( Ns3 Invalid checksum: {0} not found in content file {1}t sha256s<