/var/opt/nydus/ops/mysql/connector/aio/plugins/__pycache__
NameSizeModeActions
authentication_kerberos_client.cpython-312.pyc233050644editdlrm
authentication_ldap_sasl_client.cpython-312.pyc283570644editdlrm
authentication_oci_client.cpython-312.pyc103910644editdlrm
authentication_openid_connect_client.cpython-312.pyc72810644editdlrm
authentication_webauthn_client.cpython-312.pyc113360644editdlrm
caching_sha2_password.cpython-312.pyc63210644editdlrm
mysql_clear_password.cpython-312.pyc38950644editdlrm
mysql_native_password.cpython-312.pyc47460644editdlrm
sha256_password.cpython-312.pyc40390644editdlrm
__init__.cpython-312.pyc61620644editdlrm
Edit: /var/opt/nydus/ops/mysql/connector/aio/plugins/__pycache__/caching_sha2_password.cpython-312.pyc (6321B)
N j~dZddlZddlmZddlmZmZmZddlm Z ddl m Z ddl m Z erd d lmZd ZGd d e Zy) z,Caching SHA2 Password Authentication Plugin.N)sha256) TYPE_CHECKINGAnyOptional)InterfaceError)logger)MySQLAuthPlugin) MySQLSocket"MySQLCachingSHA2PasswordAuthPluginceZdZUdZdZeed<dedefdZe de fdZ e de fdZ ded edeefd Zd d ded edefd Zd d ded edefdZy)r zClass implementing the MySQL caching_sha2_password authentication plugin Note that encrypting using RSA is not supported since the Python Standard Library does not provide this OpenSSL functionality. perform_full_authentication auth_datareturnc|s td|jsyt|jjj }t}|j t|j |j ||j }t ||Dcgc] \}}||z  }}}tjdg|}|Scc}}w)zReturn a scramble of the password using a Nonce sent by the server. The scramble is of the form: XOR(SHA2(password), SHA2(SHA2(SHA2(password)), Nonce)) z"Missing authentication data (seed)32B) r _passwordrencodedigestupdatezipstructpack) selfrhash1hash2 hash2_digesth1h2xoredhash3s b/opt/nydus/tmp/pip-target-a90h98xg/lib/python/mysql/connector/aio/plugins/caching_sha2_password.py _scramblez,MySQLCachingSHA2PasswordAuthPlugin._scramble8s !EF F~~t~~,,./668 VE]))+, Y||~ ),UL)AB)AXb"b)AB E*E* Cs.Ccy)zPlugin official name.caching_sha2_passwordrs r%namez'MySQLCachingSHA2PasswordAuthPlugin.nameNs'rcy)z'Signals whether or not SSL is required.Fr)r*s r% requires_sslz/MySQLCachingSHA2PasswordAuthPlugin.requires_sslSsrkwargsc |syt|dkDr|j|S|d|jk(r|jj dzSy)aMake the client's authorization response. Args: auth_data: Authorization data. kwargs: Custom configuration to be passed to the auth plugin when invoked. The parameters defined here will override the ones defined in the auth plugin itself. Returns: packet: Client's authorization response. Nr r)lenr&rrr)rrr.s r% auth_responsez0MySQLCachingSHA2PasswordAuthPlugin.auth_responseXsR y>A >>), , Q<4;; ;>>((*W4 4rsockr cK|j|fi|}|r|j|d{t|jd{S7%7 w)aEHandles server's `auth more data` response. Args: sock: Pointer to the socket connection. auth_data: Authentication method data (from a packet representing an `auth more data` response). kwargs: Custom configuration to be passed to the auth plugin when invoked. The parameters defined here will override the ones defined in the auth plugin itself. Returns: packet: Last server's response after back-and-forth communication. N)r2writebytesread)rr3rr.responses r%auth_more_responsez5MySQLCachingSHA2PasswordAuthPlugin.auth_more_responsensQ"&4%%i:6: **X& & &499;&'' '&s!*AAA A AAc6K|j|fi|}| tdtjd|t ||j |d{t |jd{}tjd||S7=7"w)aSHandles server's `auth switch request` response. Args: sock: Pointer to the socket connection. auth_data: Plugin provided data (extracted from a packet representing an `auth switch request` response). kwargs: Custom configuration to be passed to the auth plugin when invoked. The parameters defined here will override the ones defined in the auth plugin itself. Returns: packet: Last server's response after back-and-forth communication. NzGot a NULL auth responsez# request: %s size: %sz# server response packet: %s)r2rrdebugr1r5r6r7)rr3rr.r8pkts r%auth_switch_responsez7MySQLCachingSHA2PasswordAuthPlugin.auth_switch_responses"&4%%i:6:   !;< < -xXGjj"""$))+%& 3S9 #%s$ABBB4B5!BBN)__name__ __module__ __qualname____doc__rint__annotations__r6r&propertystrr+boolr-rrr2r9r=r)rr%r r /s ()(5U,'c''du,(!(.3(?B( (.!.3?B r)rArhashlibrtypingrrrmysql.connector.errorsrmysql.connector.loggerrr networkr AUTHENTICATION_PLUGIN_CLASSr r)rr%rNs9:3 //1)%Bqqr