HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/travisci.cpython-310.pyc
o

�N�g0�@stdZddlZddlZddlZddlmZzddlZddl	ZdZ
Wney+dZ
YnwdZdZ
dd	�Zd
d�ZdS)zD
Commands for working with travisci.

:depends: pyOpenSSL >= 16.0.0
�N)�VersionTFz16.0.0ZtraviscicCsBtdurdd�t�fSttj�}tt�}||krdd�t�fStS)NFzDThe travisci module was unable to be loaded: Install pyOpenssl >= {})�HAS_OPENSSL�format�OPENSSL_MIN_VERr�OpenSSL�__version__�__virtualname__)Zcur_versionZmin_version�r	�I/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/travisci.py�__virtual__s��
��rcCs�tdd�dddd}tj�tjj|�}tj��}|�|�t�|�}t	j
j�t
j�|�dd�}ztj�|||d	�WdStjjyMYd
Sw)a�
    Verify the webhook signature from travisci

    signature
        The signature header from the webhook header

    body
        The full payload body from the webhook post

    .. note:: The body needs to be the urlencoded version of the body.

    CLI Example:

    .. code-block:: bash

        salt '*' travisci.verify_webhook 'M6NucCX5722bxisQs7e...' 'payload=%7B%22id%22%3A183791261%2C%22repository...'

    z
http.queryz https://api.travis-ci.org/configZconfigZ
notificationsZwebhook�
public_key�payloadr�sha1FT)Z	__utils__rZcryptoZload_publickeyZFILETYPE_PEMZX509Z
set_pubkey�base64�	b64decode�salt�utils�json�loads�urllib�parse�parse_qsZverify�Error)Z	signature�bodyrZpkey_public_keyZcertificater
r	r	r
�verify_webhook.s(����


��r)�__doc__r�urllib.parserZsalt.utils.jsonrZsalt.utils.versionsrrZOpenSSL.cryptor�ImportErrorrrrrr	r	r	r
�<module>s �