Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
Ë øŠjµEãóö—ddlmZmZmZmZddlZddlmZddlmZm Z m Z ddl m Z ddl mZmZmZgd¢Zd „Zd „Zd „Zd „Zd „Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z!d„Z"d„Z#d„Z$d„Z%d„Z&d„Z'd„Z(y) é)Úunicode_literalsÚdivisionÚabsolute_importÚprint_functionN)Údatetimeé)Ú CertificateÚint_from_bytesÚtimezone)ÚCIPHER_SUITE_MAP)ÚTLSVerificationErrorÚTLSDisconnectErrorÚTLSError)Údetect_client_auth_requestÚ extract_chainÚget_dh_params_lengthÚ parse_alertÚparse_handshake_messagesÚparse_session_infoÚparse_tls_recordsÚraise_client_authÚraise_dh_paramsÚraise_disconnectionÚraise_expired_not_yet_validÚraise_handshakeÚraise_hostnameÚraise_no_issuerÚraise_protocol_errorÚ raise_revokedÚraise_self_signedÚraise_verificationÚraise_weak_signaturecóP—g}d}t|«D],\}}}|dk7rŒ t|«D]\}}|dk(sŒ |}n|sŒ,n|red}|t|«krUt|||dz«} |dz} | | z} | }|| | } |j t j | ««|t|«krŒU|S)a Extracts the X.509 certificates from the server handshake bytes for use when debugging :param server_handshake_bytes: A byte string of the handshake data received from the server :return: A list of asn1crypto.x509.Certificate objects Nóó é)rrÚlenr Úappendr Úload) Úserver_handshake_bytesÚoutputÚ chain_bytesÚ record_typeÚ_Ú record_dataÚ message_typeÚ message_dataÚpointerÚ cert_lengthÚ cert_startÚcert_endÚ cert_bytess ú>/opt/nydus/tmp/pip-target-96rp6e1e/lib/python/oscrypto/_tls.pyrr#sã€ð€Fà€Kä'8Ð9OÓ'PòÑ#ˆ �Q˜ Ø ˜'Ò !Ø Ü*BÀ;Ó*Oò Ñ &ˆL˜,ؘwÓ&Ø*� Ùð ò Ù ðñàˆØœ˜KÓ(Ò(Ü(¨°W¸WÀq¹[Ð)IÓJˆKØ  1™ˆJØ! KÑ/ˆH؈GØ$ Z°Ð9ˆJØ �M‰Mœ+×*Ñ*¨:Ó6Ô 7𠜘KÓ(Ó(ð €Mócón—t|«D]'\}}}|dk7rŒ t|«D] \}}|dk(sŒ yŒ)y)a) Determines if a CertificateRequest message is sent from the server asking the client for a certificate :param server_handshake_bytes: A byte string of the handshake data received from the server :return: A boolean - if a client certificate request was found r$ó TF)rr)r*r-r.r/r0r1s r7rrKsT€ô(9Ð9OÓ'PòÑ#ˆ �Q˜ Ø ˜'Ò !Ø Ü*BÀ;Ó*Oò Ñ &ˆL˜,ؘwÓ&Úñ ðð r8có¨—d}d}t|«D],\}}}|dk7rŒ t|«D]\}}|dk(sŒ |}n|sŒ,n|rt|dd«dz}|S)a Determines the length of the DH params from the ServerKeyExchange :param server_handshake_bytes: A byte string of the handshake data received from the server :return: None or an integer of the bit size of the DH parameters Nr$ó réé)rrr )r*r+Údh_params_bytesr-r.r/r0r1s r7rr`s†€ð€Fà€Oä'8Ð9OÓ'PòÑ#ˆ �Q˜ Ø ˜'Ò !Ø Ü*BÀ;Ó*Oò Ñ &ˆL˜,ؘwÓ&Ø".�Ùð ò Ù ðñÜ °°!Ð 4Ó5¸Ñ9ˆà €Mr8có’—t|«D]9\}}}|dk7rŒ t|«dk7ryt|dd«t|dd«fcSy)aV Parses the handshake for protocol alerts :param server_handshake_bytes: A byte string of the handshake data received from the server :return: None or an 2-element tuple of integers: 0: 1 (warning) or 2 (fatal) 1: The alert description (see https://tools.ietf.org/html/rfc5246#section-7.2) ór=Nrr)rr'r )r*r-r.r/s r7rrse€ô(9Ð9OÓ'PòTÑ#ˆ �Q˜ Ø ˜'Ò !Ø Ü ˆ{Ó ˜qÒ Ùܘ{¨1¨QÐ/Ó0´.ÀÈQÈqÐAQÓ2RÐSÒSð Tð r8cóø—d}d}d}d}d}d}d}t|«D]›\} } } | dk7rŒ t| «D]�\} } | dk7rŒ ddddd d œ| d d }t| d d«}|d kDr| dd|z}d|z}| ||d z}t|}|d z}| ||dzdk7}|dz}| |d}t |«D]\}}|dk(sŒ d}nŒ›Œ�t|«D]�\} } } | dk7rŒ t| «D]ƒ\} } | dk7rŒ t| d d«}|d kDr| dd|z}d|z}t| ||d z«}|d z|z}t| ||dz«}|€+|€)|dz|z}| |d}t |«D]\}}|dk(sŒ d}nŒ�ŒŸ|�|€d}n ||k7rd}nd}|||||dœS)a´ Parse the TLS handshake from the client to the server to extract information including the cipher suite selected, if compression is enabled, the session id and if a new or reused session ticket exists. :param server_handshake_bytes: A byte string of the handshake data received from the server :param client_handshake_bytes: A byte string of the handshake data sent to the server :return: A dict with the following keys: - "protocol": unicode string - "cipher_suite": unicode string - "compression": boolean - "session_id": "new", "reused" or None - "session_ticket: "new", "reused" or None NFr$óÚSSLv3ÚTLSv1zTLSv1.1zTLSv1.2zTLSv1.3)sssssrr=é"é#róÚnewóÚreused)ÚprotocolÚ cipher_suiteÚ compressionÚ session_idÚsession_ticket)rrr r Ú_parse_hello_extensions)r*Úclient_handshake_bytesrLrMrNrOrPÚserver_session_idÚclient_session_idr-r.r/r0r1Úsession_id_lengthÚcipher_suite_startÚcipher_suite_bytesÚcompression_startÚextensions_length_startÚextensions_dataÚextension_typeÚextension_dataÚcipher_suite_lengthÚcompression_lengths r7rr•sÈ€ð*€HØ€LØ€KØ€JØ€NàÐØÐä'8Ð9OÓ'Pò Ñ#ˆ �Q˜ Ø ˜'Ò !Ø Ü*BÀ;Ó*Oò Ñ &ˆL˜,à˜wÒ&Øà$Ø$Ø&Ø&Ø&ñ ð ˜1˜QÐñ !ˆHô!/¨|¸B¸rÐ/BÓ CÐ Ø  1Ò$Ø$0°°BÐ9JÑ4JÐ$KÐ!à!#Ð&7Ñ!7Ð Ø!-Ð.@ÐASÐVWÑAWÐ!XÐ Ü+Ð,>Ñ?ˆLà 2°QÑ 6Ð Ø&Ð'8Ð9JÈQÑ9NÐOÐSZÑZˆKà&7¸!Ñ&;Ð #Ø*Ð+BÐ+CÐDˆOÜ2IÈ/Ó2Zò Ñ.� Ø! RÓ'Ø%*�NÙð ñ ñ; ð ôD(9Ð9OÓ'PòÑ#ˆ �Q˜ Ø ˜'Ò !Ø Ü*BÀ;Ó*Oò Ñ &ˆL˜,à˜wÒ&Øä .¨|¸B¸rÐ/BÓ CÐ Ø  1Ò$Ø$0°°BÐ9JÑ4JÐ$KÐ!à!#Ð&7Ñ!7Ð Ü"0°Ð>PÐQcÐfgÑQgÐ1hÓ"iÐ à 2°QÑ 6Ð9LÑ LÐ Ü!/° Ð=NÐO`ÐcdÑOdÐ0eÓ!fÐ ð!Ð(¨^Ð-CØ*;¸aÑ*?ÐBTÑ*TÐ'Ø".Ð/FÐ/GÐ"H�Ü6MÈoÓ6^òÑ2�N NØ%¨Ó+Ø)1˜Ùðñ ñ1 ðð:Ð$Ø Ð $؉Jà Ð$5Ò5Ø"‘ à%� ðØ$Ø"Ø Ø(ñ  ðr8c#óÒK—d}t|«}||krQ|||dzdk(ryt||dz|dz«}|||dz||dz|dz||dz|dz|zf–—|d|zz }||krŒPyy­w)aÜ Creates a generator returning tuples of information about each record in a byte string of data from a TLS client or server. Stops as soon as it find a ChangeCipherSpec message since all data from then on is encrypted. :param data: A byte string of TLS records :return: A generator that yields 3-element tuples: [0] Byte string of record type [1] Byte string of protocol version [2] Byte string of record data rrór&éN©r'r ©Údatar2Údata_lenÚlengths r7rrs¨èø€ð €GÜ�4‹y€HØ �HÒ à �˜ !™ Ð $¨Ò /Ø Ü  W¨q¡[°¸1±Ð =Ó>ˆà �˜ 1™Ð %Ø �˜1‘˜W q™[Ð )Ø �˜1‘˜W q™[¨6Ñ1Ð 2ð ò ð �1�v‘:шð �HÕ ùs ‚A"A'Á%A'c#ó¦K—d}t|«}||kr;t||dz|dz«}|||dz||dz|dz|zf–—|d|zz }||krŒ:yy­w)a` Creates a generator returning tuples of information about each message in a byte string of data from a TLS handshake record :param data: A byte string of a TLS handshake record data :return: A generator that yields 2-element tuples: [0] Byte string of message type [1] Byte string of message data rréNrbrcs r7rr#s€èø€ð€GÜ�4‹y€HØ �HÒ Ü  W¨q¡[°¸1±Ð =Ó>ˆà �˜ 1™Ð %Ø �˜1‘˜W q™[¨6Ñ1Ð 2ð ò ð �1�v‘:шð �HÕ ùs ‚A AÁAc#óÜK—|dk(ryt|dd«}d}d|z}|}||krFt|||dz«}t||dz|dz«}|||dz|dz|zf–—|d|zz }||krŒEyy­w)a¹ Creates a generator returning tuples of information about each extension from a byte string of extension data contained in a ServerHello ores ClientHello message :param data: A byte string of a extension data from a TLS ServerHello or ClientHello message :return: A generator that yields 2-element tuples: [0] Byte string of extension type [1] Byte string of extension data r8Nrr=rh)r )rdÚextentions_lengthÚextensions_startÚextensions_endr2r[Úextension_lengths r7rQrQ<s±èø€ð  ˆs‚{Øä& t¨A¨a yÓ1ÐØÐØÐ*Ñ*€Nà€GØ �NÒ "Ü'¨¨W°W¸q±[Ð(AÓBˆÜ)¨$¨w¸©{¸7ÀQ¹;Ð*GÓHÐà Ø �˜1‘˜W q™[Ð+;Ñ;Ð <ð ò ð �1Ð'Ñ'Ñ'ˆð �NÕ "ùs ‚A'A,Á*A,có<—tjd|«xs|jd«dk7}|rd|z}nd|z}d|z}dj|j«}dj|j «}|r|d|zz }|r|r|d z }|r|d |zz }t ||«‚) z´ Raises a TLSVerificationError due to a hostname mismatch :param certificate: An asn1crypto.x509.Certificate object :raises: TLSVerificationError z^\d+\.\d+\.\d+\.\d+$ú:éÿÿÿÿz IP address %szdomain name %sz:Server certificate verification failed - %s does not matchz, z valid domains: %sz orz valid IP addresses: %s)ÚreÚmatchÚfindÚjoinÚ valid_ipsÚ valid_domainsr )Ú certificateÚhostnameÚis_ipÚ hostname_typeÚmessagerurvs r7rr^s´€ô �H‰HÐ2°HÓ =Ò YÀÇÁÈsÓASÐWYÑAY€EÙ Ø'¨(Ñ2‰ à(¨8Ñ3ˆ ØJÈ]ÑZ€GØ— ‘ ˜+×/Ñ/Ó0€IØ—I‘I˜k×7Ñ7Ó8€MÙØÐ'¨-Ñ7Ñ7ˆÙ™Ø�5ÑˆÙØÐ,¨yÑ8Ñ8ˆÜ ˜w¨ Ó 4Ð4r8có—d}t||«‚)z¡ Raises a generic TLSVerificationError :param certificate: An asn1crypto.x509.Certificate object :raises: TLSVerificationError z&Server certificate verification failed©r ©rwr{s r7r!r!zs€ð7€GÜ ˜w¨ Ó 4Ð4r8có—d}t||«‚)zÐ Raises a TLSVerificationError when a certificate uses a weak signature algorithm :param certificate: An asn1crypto.x509.Certificate object :raises: TLSVerificationError zMServer certificate verification failed - weak certificate signature algorithmr}r~s r7r"r"‰s€ð^€GÜ ˜w¨ Ó 4Ð4r8có—d}t|«‚)zg Raises a TLSError indicating client authentication is required :raises: TLSError z5TLS handshake failed - client authentication required©r)r{s r7rr™s€ðF€GÜ �7Ó Ðr8có—d}t||«‚)z¾ Raises a TLSVerificationError due to the certificate being revoked :param certificate: An asn1crypto.x509.Certificate object :raises: TLSVerificationError zEServer certificate verification failed - certificate has been revokedr}r~s r7rr¥s€ðV€GÜ ˜w¨ Ó 4Ð4r8có—d}t||«‚)zÏ Raises a TLSVerificationError due to no issuer certificate found in trust roots :param certificate: An asn1crypto.x509.Certificate object :raises: TLSVerificationError zgServer certificate verification failed - certificate issuer not found in trusted root certificate storer}r~s r7rr´s€ðx€GÜ ˜w¨ Ó 4Ð4r8có—d}t||«‚)zÄ Raises a TLSVerificationError due to a self-signed certificate roots :param certificate: An asn1crypto.x509.Certificate object :raises: TLSVerificationError zCServer certificate verification failed - certificate is self-signedr}r~s r7r r Äs€ðT€GÜ ˜w¨ Ó 4Ð4r8có—d}t||«‚)zî Raises a TLSVerificationError due to a certificate lifetime exceeding the CAB forum certificate lifetime limit :param certificate: An asn1crypto.x509.Certificate object :raises: TLSVerificationError zIServer certificate verification failed - certificate lifetime is too longr}r~s r7Úraise_lifetime_too_longr†Ôs€ðZ€GÜ ˜w¨ Ó 4Ð4r8có—|dd}|dj}|dj}tjtj«}||kDr|j d«}d|z}n||kr|j d«}d|z}t |«‚)zÖ Raises a TLSVerificationError due to certificate being expired, or not yet being valid :param certificate: An asn1crypto.x509.Certificate object :raises: TLSVerificationError Útbs_certificateÚvalidityÚ not_afterÚ not_beforez%Y-%m-%d %H:%M:%SZzGServer certificate verification failed - certificate not valid until %sz?Server certificate verification failed - certificate expired %s)ÚnativerÚnowr ÚutcÚstrftimer )rwr‰rŠr‹r�Úformatted_beforer{Úformatted_afters r7rräs›€ðÐ,Ñ-¨jÑ9€HؘÑ%×,Ñ,€Iؘ,Ñ'×.Ñ.€Jä �,‰,”x—|‘|Ó $€Cà�CÒØ%×.Ñ.Ð/CÓDÐØ[Ð^nÑn‰Ø �SŠØ#×,Ñ,Ð-AÓBˆØSÐVeÑeˆä ˜w¨ Ó 4Ð4r8có—td«‚)ze Raises a TLSDisconnectError due to a disconnection :raises: TLSDisconnectError z$The remote end closed the connection)r©r8r7rrs€ô ÐCÓ DÐDr8cóN—t|«}|rtd|z«‚td«‚)z» Raises a TLSError due to a protocol error :param server_handshake_bytes: A byte string of the handshake data received from the server :raises: TLSError z.TLS protocol error - server responded using %sz@TLS protocol error - server responded using a different protocol)Údetect_other_protocolr)r*Úother_protocols r7rr s/€ô+Ð+AÓB€NáÜÐGÈ.ÑXÓYÐYä ÐUÓ VÐVr8có—td«‚)zS Raises a TLSError due to a handshake error :raises: TLSError zTLS handshake failedr�r“r8r7rrs€ô Ð)Ó *Ð*r8có—td«‚)z_ Raises a TLSError due to a TLS version incompatibility :raises: TLSError z-TLS handshake failed - protocol version errorr�r“r8r7Úraise_protocol_versionr™)s€ô ÐBÓ CÐCr8có—td«‚)zP Raises a TLSError due to weak DH params :raises: TLSError z)TLS handshake failed - weak DH parametersr�r“r8r7rr4s€ô Ð>Ó ?Ð?r8cóº—|dddk(ry|dddk(r'tjd|tj«ryy |ddd k(ry|ddd k(ry |ddd k(s|dddk(ryy)a Looks at the server handshake bytes to try and detect a different protocol :param server_handshake_bytes: A byte string of the handshake data received from the server :return: None, or a unicode string of "ftp", "http", "imap", "pop3", "smtp" rrasHTTP/ÚHTTPrhs220 s ^[^ ]*ftpÚFTPÚSMTPs220-s+OK ÚPOP3s* OKé s * PREAUTHÚIMAPN)rqrrÚI)r*s r7r•r•?s‰€ð˜a Ð" hÒ.Øà˜a Ð" gÒ-Ü �8‰8�OÐ%;¼R¿T¹TÔ BØàà˜a Ð" gÒ-Øà˜a Ð" gÒ-Øà˜a Ð" gÒ-Ð1GÈÈ!Ð1LÐP\Ò1\Øà r8))Ú __future__rrrrrqrÚ_asn1r r r Ú_cipher_suitesr Úerrorsr rrÚ__all__rrrrrrrrQrr!r"rrrr r†rrrrr™rr•r“r8r7úr¨s¢ðçRÓRã Ýç8Ñ8Ý,ßFÑFò €ò.%òPò*ò>ò,lò^ò>ò2(òD5ò8 5ò 5ò ò 5ò 5ò 5ò 5ò 5ò8EòWò&+òDò@ór8