REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.81 KB
Close
/proc/thread-self/root/lib64/python3.6/site-packages/cryptography/hazmat/primitives/serialization/pkcs12.py
Text
Base64
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function from cryptography import x509 from cryptography.hazmat.backends import _get_backend from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric import dsa, ec, rsa def load_key_and_certificates(data, password, backend=None): backend = _get_backend(backend) return backend.load_key_and_certificates_from_pkcs12(data, password) def serialize_key_and_certificates(name, key, cert, cas, encryption_algorithm): if key is not None and not isinstance( key, ( rsa.RSAPrivateKeyWithSerialization, dsa.DSAPrivateKeyWithSerialization, ec.EllipticCurvePrivateKeyWithSerialization, ), ): raise TypeError("Key must be RSA, DSA, or EllipticCurve private key.") if cert is not None and not isinstance(cert, x509.Certificate): raise TypeError("cert must be a certificate") if cas is not None: cas = list(cas) if not all(isinstance(val, x509.Certificate) for val in cas): raise TypeError("all values in cas must be certificates") if not isinstance( encryption_algorithm, serialization.KeySerializationEncryption ): raise TypeError( "Key encryption algorithm must be a " "KeySerializationEncryption instance" ) if key is None and cert is None and not cas: raise ValueError("You must supply at least one of key, cert, or cas") backend = _get_backend(None) return backend.serialize_key_and_certificates_to_pkcs12( name, key, cert, cas, encryption_algorithm )
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 5
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
__pycache__
DIR
-
drwxr-xr-x
2025-08-28 15:33:17
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
base.py
2.20 KB
lrw-r--r--
2020-10-28 03:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
pkcs7.py
4.52 KB
lrw-r--r--
2020-10-28 03:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
pkcs12.py
1.81 KB
lrw-r--r--
2020-10-28 03:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ssh.py
21.17 KB
lrw-r--r--
2020-10-28 03:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__init__.py
1.11 KB
lrw-r--r--
2020-10-28 03:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).