File: //usr/local/CyberCP/lib64/python3.10/site-packages/paramiko/__pycache__/kex_gss.cpython-310.pyc
o
�h�_ � @ s� d Z ddlZddlmZ ddlmZmZmZmZm Z m
Z
ddlmZ ddl
mZ ddlmZ edd �\ZZZZZed
d�\ZZdd
� edd �D �\ZZZZZdd
� ed
d�D �\ZZG dd� d�Z G dd� de �Z!G dd� d�Z"G dd� d�Z#dS )a�
This module provides GSS-API / SSPI Key Exchange as defined in :rfc:`4462`.
.. note:: Credential delegation is not supported in server mode.
.. note::
`RFC 4462 Section 2.2
<https://tools.ietf.org/html/rfc4462.html#section-2.2>`_ says we are not
required to implement GSS-API error messages. Thus, in many methods within
this module, if an error occurs an exception will be thrown and the
connection will be terminated.
.. seealso:: :doc:`/api/ssh_gss`
.. versionadded:: 1.15
� N)�sha1)�DEBUG�max_byte� zero_byte�byte_chr� byte_mask�byte_ord)�util)�Message)�SSHException� �# �( �* c C � g | ]}t |��qS � �r ��.0�cr r �C/usr/local/CyberCP/lib/python3.10/site-packages/paramiko/kex_gss.py�
<listcomp>F s r c C r r r r r r r r G s �c @ s| e Zd ZdZdZdZed�ed Ze d Z
dZdd � Zd
d� Z
dd
� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� ZdS )�KexGSSGroup1z�
GSS-API / SSPI Authenticated Diffie-Hellman Key Exchange as defined in `RFC
4462 Section 2 <https://tools.ietf.org/html/rfc4462.html#section-2>`_
lE ����8�{3If?�E y�Z�3�V�58n�oP�e�?a-�
�tBL�
�y3W[�<�p�6m5��P��&a�F!�33*�w& �AR�M;L}.�c|&A�@�h\�&&#-D�v�d���� � � � � z(gss-group1-sha1-toWM5Slw5Ew8Mqkay+al2g==c C s, || _ | j j| _d | _d| _d| _d| _d S )Nr )� transport�kexgss_ctxt�kexgss�gss_host�x�e�f��selfr r r r �__init__Y s
zKexGSSGroup1.__init__c C s� | � � | jjrt| j| j| j�| _| j�t � dS t| j| j| j�| _
| jj| _t� }|�
t� |�| jj| jd�� |�| j
� | j�|� | j�tttt� dS )zU
Start the GSS-API / SSPI Authenticated Diffie-Hellman Key Exchange.
N��target)�_generate_xr �server_mode�pow�Gr! �Pr# �_expect_packet�MSG_KEXGSS_INITr"