Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips
System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : fdshops ( 1003)
PHP Version : 8.2.21
Disable Function : NONE
Directory :  /lib/python2.7/site-packages/ndg/httpsclient/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python2.7/site-packages/ndg/httpsclient/ssl_context_util.pyo
�
a�VOc@s�dZdZdZdZdZdZdZddlZdd	lm	Z	dd
l
mZdefd��YZ
edd
�Zddddede	jd�Zed�ZdS(sundg_httpsclient SSL Context utilities module containing convenience routines
for setting SSL context configuration.

sP J Kershaw (STFC)s09/12/11s2(C) 2012 Science and Technology Facilities Councils-BSD - see LICENSE file in top-level directorysPhilip.Kershaw@stfc.ac.uks$Id$i����N(tSSL(tServerSSLCertVerificationtSSlContextConfigcBs&eZdZdddded�ZRS(s�
    Holds configuration options for creating a SSL context. This is used as a
    template to create the contexts with specific verification callbacks.
    cCs1||_||_||_||_||_dS(N(tkey_filet	cert_filetpem_filetca_dirtverify_peer(tselfRRRRR((sD/usr/lib/python2.7/site-packages/ndg/httpsclient/ssl_context_util.pyt__init__s
				N(t__name__t
__module__t__doc__tNonetFalseR	(((sD/usr/lib/python2.7/site-packages/ndg/httpsclient/ssl_context_util.pyRscCs(t|j|j|j|j|j|�S(N(tmake_ssl_contextRRRRR(t
ssl_configturl((sD/usr/lib/python2.7/site-packages/ndg/httpsclient/ssl_context_util.pytmake_ssl_context_from_config sc
Cs�tj|�}|r%|j|�n|r;|j|�n|rQ|j|�n|s]|rp|j||�nd�}|}	|r�|jd�|r�t||�q�|jtj|	�n|jtj	|	�|S(sL
    Creates SSL context containing certificate and key file locations.
    cSs|S(srDefault certification verification callback.
        Performs no checks and returns the status passed in.
        ((tconntx509terrnumterrdepthtpreverify_ok((sD/usr/lib/python2.7/site-packages/ndg/httpsclient/ssl_context_util.pyt	_callback9si	(
RtContexttuse_certificate_filetuse_privatekey_filetload_verify_locationstset_verify_deptht&set_peer_verification_for_url_hostnamet
set_verifytVERIFY_PEERtVERIFY_NONE(
RRRRRRtmethodtssl_contextRtverify_callback((sD/usr/lib/python2.7/site-packages/ndg/httpsclient/ssl_context_util.pyR&s$	
cCs[|s|j�tj@rWtj|�}|j}td|�}|jtj|�ndS(sbConvenience routine to set peer verification callback based on
    ServerSSLCertVerification classthostnameN(tget_verify_modeRR turlparseR%RR(R#Rtif_verify_enabledturlObjR%R$((sD/usr/lib/python2.7/site-packages/ndg/httpsclient/ssl_context_util.pyRLs
	(Rt
__author__t__date__t
__copyright__t__license__t__contact__t__revision__R'tOpenSSLRt%ndg.httpsclient.ssl_peer_verificationRtobjectRRR
Rt
SSLv23_METHODRR(((sD/usr/lib/python2.7/site-packages/ndg/httpsclient/ssl_context_util.pyt<module>s&

Spamworldpro Mini