관리-도구
편집 파일: __init__.cpython-311.pyc
� O�DgF � �4 � d dl mZmZmZmZmZ d� Zd� Zd� ZdS )� )�DerSequence� DerInteger�DerBitString�DerObjectId�DerNullc �� � t � � � | d�� � }t � � � |d d�� � }t � � � |d � � }t � � � |d � � j }t |� � dk rd}n: t � � � |d � � d}n# |d }Y nxY w|j ||fS )z�Parse a SubjectPublicKeyInfo structure. It returns a triple with: * OID (string) * encoded public key (bytes) * Algorithm parameters (bytes or None) � ��nr_elementsr )� r r N)r �decoder r �value�lenr )�encoded�spki�algo�algo_oid�spk�algo_paramss �{/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/PublicKey/__init__.py�_expand_subject_public_key_infor s� � �* �=�=����Q��7�7�D��=�=����Q��U��;�;�D��}�}�#�#�D��G�,�,�H� �.�.� � ��Q�� (� (� .�C� �4�y�y�A�~�~���� "��I�I���T�!�W�%�%�%��K�K�� "��q�'�K�K�K�����>�3��+�+s �7)C! �! C-c �� � |�t t | � � g� � }nt t | � � |g� � }t |t |� � g� � }|� � � S )N)r r r �encode)r � public_key�params� algorithmr s r �_create_subject_public_key_infor ? sl � � �~���X�!6�!6� 7�8�8� � ���X�!6�!6�� ?�@�@� �� �$�Z�0�0�� � �D� �;�;�=�=�� c � � t � � � | d�� � }t � � � |d t dd� � �� � }d} |d dz d}nS# t $ rF t d�� � � |d � � j }|d vrt d � � �d}Y nw xY w|| S )z:Extract subjectPublicKeyInfo from a DER X.509 certificate.� r r � � � r )�explicit)r r z#Incorrect X.509 certificate version)r r �range� TypeErrorr r � ValueError)�x509_certificate�certificate�tbs_certificate�index�versions r � _extract_subject_public_key_infor- L s� � � �-�-�&�&�'7�Q�&�G�G�K�!�m�m�*�*�;�q�>�7<�Q��|�|� +� E� E�O� �E�����Q�������� � � ��a�(�(�(�/�/���0B�C�C�I���&� � ��B�C�C�C����� ���� �5�!�!s � A, �,A B<�;B<N) �Crypto.Util.asn1r r r r r r r r- � r r �<module>r0 s� ��*3� 3� 3� 3� 3� 3� 3� 3� 3� 3� 3� 3� 3� 3�#,� #,� #,�L � � �"� "� "� "� "r