File manager - Edit - /usr/lib/python3/dist-packages/cryptography/hazmat/primitives/serialization/__pycache__/pkcs12.cpython-310.pyc
Back
o �)%a� � @ s� d dl Z d dlmZ d dlmZ d dlmZ d dlmZm Z m Z e je jej e jf Z ddede je de je je e jej e jej f fd d �Zde je de je d e jej de je jej dejdefdd�ZdS )� N)�x509)�_get_backend)� serialization)�dsa�ec�rsa�data�password�returnc C s t |�}|�| |�S �N)r �%load_key_and_certificates_from_pkcs12)r r �backend� r �U/usr/lib/python3/dist-packages/cryptography/hazmat/primitives/serialization/pkcs12.py�load_key_and_certificates s r �name�key�cert�cas�encryption_algorithmc C s� |d urt |tjtjtjf�std��|d ur!t |tj �s!td��|d ur6t |�}tdd� |D ��s6td��t |tj �s@td��|d u rN|d u rN|sNtd��td �}|�| ||||�S )Nz3Key must be RSA, DSA, or EllipticCurve private key.zcert must be a certificatec s s � | ] }t |tj�V qd S r )� isinstancer �Certificate)�.0�valr r r � <genexpr>4 s � z1serialize_key_and_certificates.<locals>.<genexpr>z&all values in cas must be certificateszFKey encryption algorithm must be a KeySerializationEncryption instancez1You must supply at least one of key, cert, or cas)r r � RSAPrivateKeyr � DSAPrivateKeyr �EllipticCurvePrivateKey� TypeErrorr r �list�allr �KeySerializationEncryption� ValueErrorr �(serialize_key_and_certificates_to_pkcs12)r r r r r r r r r �serialize_key_and_certificates s4 ���� �r$ r )�typing�cryptographyr �cryptography.hazmat.backendsr �cryptography.hazmat.primitivesr �)cryptography.hazmat.primitives.asymmetricr r r �Unionr r r �_ALLOWED_PKCS12_TYPES�bytes�Optional�Tupler �Listr �Iterabler! r$ r r r r �<module> sJ ����� �� ��� ����
| ver. 1.4 |
Github
|
.
| PHP 8.2.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings