Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 3.143.235.90
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : make_ssl_certs.pyc
�
>��cc@s+dZddlZddlZddlZddlZddlTdZejjejj	e
��Zedddd�Z
d	Zd
�Zd�Zedkr'eje�e
d
�\ZZedd��Zeje�WdQXedd��Zeje�WdQXdGHedddddddddg	�edddddddddg	�edd��!Zeje�eje�WdQXedd��Zeje�WdQXe�e
d�\ZZedd��!Zeje�eje�WdQXe
d
e�\ZZedd��!Zeje�eje�WdQXe
de�\ZZed d��!Zeje�eje�WdQXd!d"d#d$d%d&d'd(d)g	Ze
d*d+d,je��\ZZed-d��!Zeje�eje�WdQXe�d.GHedd/ddd0d1d2g�ndS(3sOMake the custom certificate and private key files used by test_ssl
and friends.i����N(t*s�
    [req]
    distinguished_name     = req_distinguished_name
    x509_extensions        = req_x509_extensions
    prompt                 = no

    [req_distinguished_name]
    C                      = XY
    L                      = Castle Anthrax
    O                      = Python Software Foundation
    CN                     = {hostname}

    [req_x509_extensions]
    subjectAltName         = @san

    [san]
    DNS.1 = {hostname}
    {extra_san}

    [dir_sect]
    C                      = XY
    L                      = Castle Anthrax
    O                      = Python Software Foundation
    CN                     = dirname example

    [princ_name]
    realm = EXP:0, GeneralString:KERBEROS.REALM
    principal_name = EXP:1, SEQUENCE:principal_seq

    [principal_seq]
    name_type = EXP:0, INTEGER:1
    name_string = EXP:1, SEQUENCE:principals

    [principals]
    princ1 = GeneralString:username

    [ ca ]
    default_ca      = CA_default

    [ CA_default ]
    dir = cadir
    database  = $dir/index.txt
    crlnumber = $dir/crl.txt
    default_md = sha256
    default_days = 3600
    default_crl_days = 3600
    certificate = pycacert.pem
    private_key = pycakey.pem
    serial    = $dir/serial
    RANDFILE  = $dir/.rand

    policy          = policy_match

    [ policy_match ]
    countryName             = match
    stateOrProvinceName     = optional
    organizationName        = match
    organizationalUnitName  = optional
    commonName              = supplied
    emailAddress            = optional

    [ policy_anything ]
    countryName   = optional
    stateOrProvinceName = optional
    localityName    = optional
    organizationName  = optional
    organizationalUnitName  = optional
    commonName    = supplied
    emailAddress    = optional


    [ v3_ca ]

    subjectKeyIdentifier=hash
    authorityKeyIdentifier=keyid:always,issuer
    basicConstraints = CA:true

    ttreq_x509_extensions_fullsrsa:3072cCs�d|GHg}x?td�D]1}tjdt��}|j|j�WdQXqW|\}}	}
zotjd|d|�}t|d��}|j	|�WdQXddd	d
ddd
d|
d|g}|rtjdt�� }|j|j�|j}
WdQX|d|
g7}n|dd|	g7}t
dg|�|r|dd|d|	dddddd|
g}t
dg|�nt|	d��}|j�}WdQXt|
d��}|j�}WdQX||fSWdx|D]}tj
|�q�WXdS(Nscreating cert for itdeletethostnamet	extra_santwtreqs-news-dayst3650s-nodess-newkeysrsa:1024s-keyouts-configs-outs-x509topenssltcas-outdirtcadirs-policytpolicy_anythings-batchs-infilestr(trangettempfiletNamedTemporaryFiletFalsetappendtnametreq_templatetformattopentwritet
check_calltreadtostremove(RtsignRtexttkeyt	tempnamestitftreq_filet	cert_filetkey_fileRtargstreqfiletcertR((s:/usr/local/python-2.7/lib/python2.7/test/make_ssl_certs.pyt
make_cert_key\s>	
RcCstjt�dS(N(tshutiltrmtreet	TMP_CADIR(((s:/usr/local/python-2.7/lib/python2.7/test/make_ssl_certs.pyt	unmake_ca�scCs�tjt�ttjjdd�d��}WdQXttjjdd�d��}|jd�WdQXttjjdd�d��}|jd�WdQXtjd	��}|jt	j
d
ddd
��|j�tj���}dddddddddddd|jddg}t
dg|�dd|jddd d!d"td#dddd$ddd%|jg}t
dg|�dd|jd&dd'g}t
dg|�WdQXWdQXdS((NRs	index.txtsa+scrl.txtt00sindex.txt.attrsw+sunique_subject = noRRs
our-ca-serverRRRs-news-daysRs-extensionstv3_cas-nodess-newkeysrsa:3072s-keyoutspycakey.pems-outs-subjsG/C=XY/L=Castle Anthrax/O=Python Software Foundation CA/CN=our-ca-serverR	R
s-configs-create_serialspycacert.pems-batchs-outdirs-keyfiles	-selfsigns-infiless-gencrlsrevocation.crl(RtmkdirR+RtpathtjoinRRRRRtflushRR(R!ttR%((s:/usr/local/python-2.7/lib/python2.7/test/make_ssl_certs.pytmake_ca�s.
!!!
	t__main__t	localhostsssl_cert.pemRsssl_key.pems5password protecting ssl_key.pem in ssl_key.passwd.pemR	trsas-ins-outsssl_key.passwd.pems-des3s-passouts
pass:somepassskeycert.passwd.pemskeycert.pemsa+tfakehostnameskeycert2.pemskeycert3.pemskeycert4.pems0otherName.1 = 1.2.3.4;UTF8:some other identifiers/otherName.2 = 1.3.6.1.5.2.2;SEQUENCE:princ_namesemail.1 = user@example.orgsDNS.2 = www.example.orgsdirName.1 = dir_sectsURI.1 = https://www.python.org/sIP.1 = 127.0.0.1s
IP.2 = ::1sRID.1 = 1.2.3.4.5tallsansRs
sallsans.pemsr

Please change the values in test_ssl.py, test_parse_cert function related to notAfter,notBefore and serialNumbertx509s-datess-serials-noout(t__doc__RR)tsysRt
subprocessRR0tabspathtdirnamet__file__thereRR(R+R,R4t__name__tchdirR'RRR!RRtTrueRR1(((s:/usr/local/python-2.7/lib/python2.7/test/make_ssl_certs.pyt<module>sp
O'		
%%



	!

© 2025 GrazzMean