@pairling/runtime-darwin-arm64 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/pairling-connectd +0 -0
- package/manifest.json +4 -4
- package/package.json +3 -3
- package/python/bin/python3 +0 -0
- package/python/bin/python3.12 +0 -0
- package/python/lib/libpython3.12.dylib +0 -0
- package/python/lib/python3.12/__pycache__/__future__.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/_compression.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/_weakrefset.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/base64.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/bisect.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/bz2.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/calendar.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/contextlib.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/copyreg.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/datetime.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/enum.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/fnmatch.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/functools.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/hashlib.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/hmac.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/ipaddress.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/keyword.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/locale.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/lzma.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/operator.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/plistlib.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/pty.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/quopri.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/random.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/reprlib.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/selectors.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/shutil.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/signal.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/socket.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/ssl.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/string.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/struct.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/subprocess.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/tempfile.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/threading.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/tty.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/types.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/typing.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/warnings.cpython-312.pyc +0 -0
- package/python/lib/python3.12/__pycache__/weakref.cpython-312.pyc +0 -0
- package/python/lib/python3.12/collections/__pycache__/__init__.cpython-312.pyc +0 -0
- package/python/lib/python3.12/collections/__pycache__/abc.cpython-312.pyc +0 -0
- package/python/lib/python3.12/email/__pycache__/__init__.cpython-312.pyc +0 -0
- package/python/lib/python3.12/email/__pycache__/_encoded_words.cpython-312.pyc +0 -0
- package/python/lib/python3.12/email/__pycache__/_parseaddr.cpython-312.pyc +0 -0
- package/python/lib/python3.12/email/__pycache__/_policybase.cpython-312.pyc +0 -0
- package/python/lib/python3.12/email/__pycache__/base64mime.cpython-312.pyc +0 -0
- package/python/lib/python3.12/email/__pycache__/charset.cpython-312.pyc +0 -0
- package/python/lib/python3.12/email/__pycache__/encoders.cpython-312.pyc +0 -0
- package/python/lib/python3.12/email/__pycache__/errors.cpython-312.pyc +0 -0
- package/python/lib/python3.12/email/__pycache__/feedparser.cpython-312.pyc +0 -0
- package/python/lib/python3.12/email/__pycache__/header.cpython-312.pyc +0 -0
- package/python/lib/python3.12/email/__pycache__/iterators.cpython-312.pyc +0 -0
- package/python/lib/python3.12/email/__pycache__/message.cpython-312.pyc +0 -0
- package/python/lib/python3.12/email/__pycache__/parser.cpython-312.pyc +0 -0
- package/python/lib/python3.12/email/__pycache__/quoprimime.cpython-312.pyc +0 -0
- package/python/lib/python3.12/email/__pycache__/utils.cpython-312.pyc +0 -0
- package/python/lib/python3.12/encodings/__pycache__/__init__.cpython-312.pyc +0 -0
- package/python/lib/python3.12/encodings/__pycache__/aliases.cpython-312.pyc +0 -0
- package/python/lib/python3.12/encodings/__pycache__/utf_8.cpython-312.pyc +0 -0
- package/python/lib/python3.12/http/__pycache__/__init__.cpython-312.pyc +0 -0
- package/python/lib/python3.12/http/__pycache__/client.cpython-312.pyc +0 -0
- package/python/lib/python3.12/json/__pycache__/__init__.cpython-312.pyc +0 -0
- package/python/lib/python3.12/json/__pycache__/decoder.cpython-312.pyc +0 -0
- package/python/lib/python3.12/json/__pycache__/encoder.cpython-312.pyc +0 -0
- package/python/lib/python3.12/json/__pycache__/scanner.cpython-312.pyc +0 -0
- package/python/lib/python3.12/lib-dynload/_crypt.cpython-312-darwin.so +0 -0
- package/python/lib/python3.12/lib-dynload/_dbm.cpython-312-darwin.so +0 -0
- package/python/lib/python3.12/re/__pycache__/__init__.cpython-312.pyc +0 -0
- package/python/lib/python3.12/re/__pycache__/_casefix.cpython-312.pyc +0 -0
- package/python/lib/python3.12/re/__pycache__/_compiler.cpython-312.pyc +0 -0
- package/python/lib/python3.12/re/__pycache__/_constants.cpython-312.pyc +0 -0
- package/python/lib/python3.12/re/__pycache__/_parser.cpython-312.pyc +0 -0
- package/python/lib/python3.12/site-packages/_cffi_backend.cpython-312-darwin.so +0 -0
- package/python/lib/python3.12/site-packages/cffi/__init__.py +14 -0
- package/python/lib/python3.12/site-packages/cffi/__pycache__/__init__.cpython-312.pyc +0 -0
- package/python/lib/python3.12/site-packages/cffi/__pycache__/api.cpython-312.pyc +0 -0
- package/python/lib/python3.12/site-packages/cffi/__pycache__/error.cpython-312.pyc +0 -0
- package/python/lib/python3.12/site-packages/cffi/__pycache__/lock.cpython-312.pyc +0 -0
- package/python/lib/python3.12/site-packages/cffi/__pycache__/model.cpython-312.pyc +0 -0
- package/python/lib/python3.12/site-packages/cffi/_cffi_errors.h +149 -0
- package/python/lib/python3.12/site-packages/cffi/_cffi_include.h +389 -0
- package/python/lib/python3.12/site-packages/cffi/_embedding.h +550 -0
- package/python/lib/python3.12/site-packages/cffi/_imp_emulation.py +83 -0
- package/python/lib/python3.12/site-packages/cffi/_shimmed_dist_utils.py +45 -0
- package/python/lib/python3.12/site-packages/cffi/api.py +967 -0
- package/python/lib/python3.12/site-packages/cffi/backend_ctypes.py +1121 -0
- package/python/lib/python3.12/site-packages/cffi/cffi_opcode.py +187 -0
- package/python/lib/python3.12/site-packages/cffi/commontypes.py +82 -0
- package/python/lib/python3.12/site-packages/cffi/cparser.py +1015 -0
- package/python/lib/python3.12/site-packages/cffi/error.py +31 -0
- package/python/lib/python3.12/site-packages/cffi/ffiplatform.py +113 -0
- package/python/lib/python3.12/site-packages/cffi/lock.py +30 -0
- package/python/lib/python3.12/site-packages/cffi/model.py +618 -0
- package/python/lib/python3.12/site-packages/cffi/parse_c_type.h +181 -0
- package/python/lib/python3.12/site-packages/cffi/pkgconfig.py +121 -0
- package/python/lib/python3.12/site-packages/cffi/recompiler.py +1598 -0
- package/python/lib/python3.12/site-packages/cffi/setuptools_ext.py +229 -0
- package/python/lib/python3.12/site-packages/cffi/vengine_cpy.py +1087 -0
- package/python/lib/python3.12/site-packages/cffi/vengine_gen.py +679 -0
- package/python/lib/python3.12/site-packages/cffi/verifier.py +306 -0
- package/python/lib/python3.12/site-packages/cffi-2.0.0.dist-info/INSTALLER +1 -0
- package/python/lib/python3.12/site-packages/cffi-2.0.0.dist-info/METADATA +68 -0
- package/python/lib/python3.12/site-packages/cffi-2.0.0.dist-info/RECORD +31 -0
- package/python/lib/python3.12/site-packages/cffi-2.0.0.dist-info/WHEEL +6 -0
- package/python/lib/python3.12/site-packages/cffi-2.0.0.dist-info/entry_points.txt +2 -0
- package/python/lib/python3.12/site-packages/cffi-2.0.0.dist-info/licenses/AUTHORS +8 -0
- package/python/lib/python3.12/site-packages/cffi-2.0.0.dist-info/licenses/LICENSE +23 -0
- package/python/lib/python3.12/site-packages/cffi-2.0.0.dist-info/top_level.txt +2 -0
- package/python/lib/python3.12/site-packages/cryptography/__about__.py +17 -0
- package/python/lib/python3.12/site-packages/cryptography/__init__.py +26 -0
- package/python/lib/python3.12/site-packages/cryptography/__pycache__/__about__.cpython-312.pyc +0 -0
- package/python/lib/python3.12/site-packages/cryptography/__pycache__/__init__.cpython-312.pyc +0 -0
- package/python/lib/python3.12/site-packages/cryptography/__pycache__/utils.cpython-312.pyc +0 -0
- package/python/lib/python3.12/site-packages/cryptography/exceptions.py +52 -0
- package/python/lib/python3.12/site-packages/cryptography/fernet.py +224 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/__init__.py +13 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/_oid.py +348 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/backends/__init__.py +13 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/backends/openssl/__init__.py +9 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/backends/openssl/backend.py +308 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/__init__.py +3 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/__init__.pyi +37 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/_openssl.pyi +8 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/asn1.pyi +7 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/exceptions.pyi +17 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/ocsp.pyi +117 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/__init__.pyi +75 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/aead.pyi +107 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/ciphers.pyi +38 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/cmac.pyi +18 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/dh.pyi +51 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/dsa.pyi +41 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/ec.pyi +52 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/ed25519.pyi +13 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/ed448.pyi +13 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/hashes.pyi +28 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/hmac.pyi +22 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/kdf.pyi +49 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/keys.pyi +34 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/poly1305.pyi +15 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/rsa.pyi +55 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/x25519.pyi +13 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/x448.pyi +13 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/pkcs12.pyi +52 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/pkcs7.pyi +50 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/test_support.pyi +23 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/x509.pyi +313 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust.abi3.so +0 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/openssl/__init__.py +3 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/openssl/_conditional.py +191 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/openssl/binding.py +122 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/decrepit/__init__.py +5 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/decrepit/ciphers/__init__.py +5 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/decrepit/ciphers/algorithms.py +112 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/__init__.py +3 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/_asymmetric.py +19 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/_cipheralgorithm.py +60 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/_serialization.py +168 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/__init__.py +3 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/dh.py +147 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/dsa.py +167 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/ec.py +447 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/ed25519.py +129 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/ed448.py +131 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/padding.py +113 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/rsa.py +277 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/types.py +111 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/utils.py +24 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/x25519.py +122 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/x448.py +125 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/ciphers/__init__.py +27 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/ciphers/aead.py +23 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/ciphers/algorithms.py +183 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/ciphers/base.py +146 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/ciphers/modes.py +268 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/cmac.py +10 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/constant_time.py +14 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/hashes.py +246 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/hmac.py +13 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/kdf/__init__.py +23 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/kdf/argon2.py +13 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/kdf/concatkdf.py +125 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/kdf/hkdf.py +101 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/kdf/kbkdf.py +305 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/kdf/pbkdf2.py +62 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/kdf/scrypt.py +19 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/kdf/x963kdf.py +61 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/keywrap.py +177 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/padding.py +69 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/poly1305.py +11 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/serialization/__init__.py +65 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/serialization/base.py +14 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/serialization/pkcs12.py +176 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/serialization/pkcs7.py +411 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/serialization/ssh.py +1619 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/twofactor/__init__.py +9 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/twofactor/hotp.py +101 -0
- package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/twofactor/totp.py +56 -0
- package/python/lib/python3.12/site-packages/cryptography/py.typed +0 -0
- package/python/lib/python3.12/site-packages/cryptography/utils.py +139 -0
- package/python/lib/python3.12/site-packages/cryptography/x509/__init__.py +270 -0
- package/python/lib/python3.12/site-packages/cryptography/x509/base.py +848 -0
- package/python/lib/python3.12/site-packages/cryptography/x509/certificate_transparency.py +35 -0
- package/python/lib/python3.12/site-packages/cryptography/x509/extensions.py +2528 -0
- package/python/lib/python3.12/site-packages/cryptography/x509/general_name.py +281 -0
- package/python/lib/python3.12/site-packages/cryptography/x509/name.py +477 -0
- package/python/lib/python3.12/site-packages/cryptography/x509/ocsp.py +379 -0
- package/python/lib/python3.12/site-packages/cryptography/x509/oid.py +37 -0
- package/python/lib/python3.12/site-packages/cryptography/x509/verification.py +34 -0
- package/python/lib/python3.12/site-packages/cryptography-45.0.7.dist-info/INSTALLER +1 -0
- package/python/lib/python3.12/site-packages/cryptography-45.0.7.dist-info/METADATA +139 -0
- package/python/lib/python3.12/site-packages/cryptography-45.0.7.dist-info/RECORD +106 -0
- package/python/lib/python3.12/site-packages/cryptography-45.0.7.dist-info/REQUESTED +0 -0
- package/python/lib/python3.12/site-packages/cryptography-45.0.7.dist-info/WHEEL +4 -0
- package/python/lib/python3.12/site-packages/cryptography-45.0.7.dist-info/licenses/LICENSE +3 -0
- package/python/lib/python3.12/site-packages/cryptography-45.0.7.dist-info/licenses/LICENSE.APACHE +202 -0
- package/python/lib/python3.12/site-packages/cryptography-45.0.7.dist-info/licenses/LICENSE.BSD +27 -0
- package/python/lib/python3.12/site-packages/pycparser/__init__.py +99 -0
- package/python/lib/python3.12/site-packages/pycparser/_ast_gen.py +355 -0
- package/python/lib/python3.12/site-packages/pycparser/_c_ast.cfg +195 -0
- package/python/lib/python3.12/site-packages/pycparser/ast_transforms.py +174 -0
- package/python/lib/python3.12/site-packages/pycparser/c_ast.py +1341 -0
- package/python/lib/python3.12/site-packages/pycparser/c_generator.py +573 -0
- package/python/lib/python3.12/site-packages/pycparser/c_lexer.py +706 -0
- package/python/lib/python3.12/site-packages/pycparser/c_parser.py +2376 -0
- package/python/lib/python3.12/site-packages/pycparser-3.0.dist-info/INSTALLER +1 -0
- package/python/lib/python3.12/site-packages/pycparser-3.0.dist-info/METADATA +244 -0
- package/python/lib/python3.12/site-packages/pycparser-3.0.dist-info/RECORD +14 -0
- package/python/lib/python3.12/site-packages/pycparser-3.0.dist-info/WHEEL +5 -0
- package/python/lib/python3.12/site-packages/pycparser-3.0.dist-info/licenses/LICENSE +27 -0
- package/python/lib/python3.12/site-packages/pycparser-3.0.dist-info/top_level.txt +1 -0
- package/python/lib/python3.12/sqlite3/__pycache__/__init__.cpython-312.pyc +0 -0
- package/python/lib/python3.12/sqlite3/__pycache__/dbapi2.cpython-312.pyc +0 -0
- package/python/lib/python3.12/urllib/__pycache__/__init__.cpython-312.pyc +0 -0
- package/python/lib/python3.12/urllib/__pycache__/error.cpython-312.pyc +0 -0
- package/python/lib/python3.12/urllib/__pycache__/parse.cpython-312.pyc +0 -0
- package/python/lib/python3.12/urllib/__pycache__/request.cpython-312.pyc +0 -0
- package/python/lib/python3.12/urllib/__pycache__/response.cpython-312.pyc +0 -0
- package/python/lib/python3.12/xml/__pycache__/__init__.cpython-312.pyc +0 -0
- package/python/lib/python3.12/xml/parsers/__pycache__/__init__.cpython-312.pyc +0 -0
- package/python/lib/python3.12/xml/parsers/__pycache__/expat.cpython-312.pyc +0 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# This file is dual licensed under the terms of the Apache License, Version
|
|
2
|
+
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
|
|
3
|
+
# for complete details.
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
import typing
|
|
8
|
+
|
|
9
|
+
from cryptography.hazmat.primitives.ciphers import Cipher
|
|
10
|
+
from cryptography.hazmat.primitives.ciphers.algorithms import AES
|
|
11
|
+
from cryptography.hazmat.primitives.ciphers.modes import ECB
|
|
12
|
+
from cryptography.hazmat.primitives.constant_time import bytes_eq
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _wrap_core(
|
|
16
|
+
wrapping_key: bytes,
|
|
17
|
+
a: bytes,
|
|
18
|
+
r: list[bytes],
|
|
19
|
+
) -> bytes:
|
|
20
|
+
# RFC 3394 Key Wrap - 2.2.1 (index method)
|
|
21
|
+
encryptor = Cipher(AES(wrapping_key), ECB()).encryptor()
|
|
22
|
+
n = len(r)
|
|
23
|
+
for j in range(6):
|
|
24
|
+
for i in range(n):
|
|
25
|
+
# every encryption operation is a discrete 16 byte chunk (because
|
|
26
|
+
# AES has a 128-bit block size) and since we're using ECB it is
|
|
27
|
+
# safe to reuse the encryptor for the entire operation
|
|
28
|
+
b = encryptor.update(a + r[i])
|
|
29
|
+
a = (
|
|
30
|
+
int.from_bytes(b[:8], byteorder="big") ^ ((n * j) + i + 1)
|
|
31
|
+
).to_bytes(length=8, byteorder="big")
|
|
32
|
+
r[i] = b[-8:]
|
|
33
|
+
|
|
34
|
+
assert encryptor.finalize() == b""
|
|
35
|
+
|
|
36
|
+
return a + b"".join(r)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def aes_key_wrap(
|
|
40
|
+
wrapping_key: bytes,
|
|
41
|
+
key_to_wrap: bytes,
|
|
42
|
+
backend: typing.Any = None,
|
|
43
|
+
) -> bytes:
|
|
44
|
+
if len(wrapping_key) not in [16, 24, 32]:
|
|
45
|
+
raise ValueError("The wrapping key must be a valid AES key length")
|
|
46
|
+
|
|
47
|
+
if len(key_to_wrap) < 16:
|
|
48
|
+
raise ValueError("The key to wrap must be at least 16 bytes")
|
|
49
|
+
|
|
50
|
+
if len(key_to_wrap) % 8 != 0:
|
|
51
|
+
raise ValueError("The key to wrap must be a multiple of 8 bytes")
|
|
52
|
+
|
|
53
|
+
a = b"\xa6\xa6\xa6\xa6\xa6\xa6\xa6\xa6"
|
|
54
|
+
r = [key_to_wrap[i : i + 8] for i in range(0, len(key_to_wrap), 8)]
|
|
55
|
+
return _wrap_core(wrapping_key, a, r)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def _unwrap_core(
|
|
59
|
+
wrapping_key: bytes,
|
|
60
|
+
a: bytes,
|
|
61
|
+
r: list[bytes],
|
|
62
|
+
) -> tuple[bytes, list[bytes]]:
|
|
63
|
+
# Implement RFC 3394 Key Unwrap - 2.2.2 (index method)
|
|
64
|
+
decryptor = Cipher(AES(wrapping_key), ECB()).decryptor()
|
|
65
|
+
n = len(r)
|
|
66
|
+
for j in reversed(range(6)):
|
|
67
|
+
for i in reversed(range(n)):
|
|
68
|
+
atr = (
|
|
69
|
+
int.from_bytes(a, byteorder="big") ^ ((n * j) + i + 1)
|
|
70
|
+
).to_bytes(length=8, byteorder="big") + r[i]
|
|
71
|
+
# every decryption operation is a discrete 16 byte chunk so
|
|
72
|
+
# it is safe to reuse the decryptor for the entire operation
|
|
73
|
+
b = decryptor.update(atr)
|
|
74
|
+
a = b[:8]
|
|
75
|
+
r[i] = b[-8:]
|
|
76
|
+
|
|
77
|
+
assert decryptor.finalize() == b""
|
|
78
|
+
return a, r
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def aes_key_wrap_with_padding(
|
|
82
|
+
wrapping_key: bytes,
|
|
83
|
+
key_to_wrap: bytes,
|
|
84
|
+
backend: typing.Any = None,
|
|
85
|
+
) -> bytes:
|
|
86
|
+
if len(wrapping_key) not in [16, 24, 32]:
|
|
87
|
+
raise ValueError("The wrapping key must be a valid AES key length")
|
|
88
|
+
|
|
89
|
+
aiv = b"\xa6\x59\x59\xa6" + len(key_to_wrap).to_bytes(
|
|
90
|
+
length=4, byteorder="big"
|
|
91
|
+
)
|
|
92
|
+
# pad the key to wrap if necessary
|
|
93
|
+
pad = (8 - (len(key_to_wrap) % 8)) % 8
|
|
94
|
+
key_to_wrap = key_to_wrap + b"\x00" * pad
|
|
95
|
+
if len(key_to_wrap) == 8:
|
|
96
|
+
# RFC 5649 - 4.1 - exactly 8 octets after padding
|
|
97
|
+
encryptor = Cipher(AES(wrapping_key), ECB()).encryptor()
|
|
98
|
+
b = encryptor.update(aiv + key_to_wrap)
|
|
99
|
+
assert encryptor.finalize() == b""
|
|
100
|
+
return b
|
|
101
|
+
else:
|
|
102
|
+
r = [key_to_wrap[i : i + 8] for i in range(0, len(key_to_wrap), 8)]
|
|
103
|
+
return _wrap_core(wrapping_key, aiv, r)
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
def aes_key_unwrap_with_padding(
|
|
107
|
+
wrapping_key: bytes,
|
|
108
|
+
wrapped_key: bytes,
|
|
109
|
+
backend: typing.Any = None,
|
|
110
|
+
) -> bytes:
|
|
111
|
+
if len(wrapped_key) < 16:
|
|
112
|
+
raise InvalidUnwrap("Must be at least 16 bytes")
|
|
113
|
+
|
|
114
|
+
if len(wrapping_key) not in [16, 24, 32]:
|
|
115
|
+
raise ValueError("The wrapping key must be a valid AES key length")
|
|
116
|
+
|
|
117
|
+
if len(wrapped_key) == 16:
|
|
118
|
+
# RFC 5649 - 4.2 - exactly two 64-bit blocks
|
|
119
|
+
decryptor = Cipher(AES(wrapping_key), ECB()).decryptor()
|
|
120
|
+
out = decryptor.update(wrapped_key)
|
|
121
|
+
assert decryptor.finalize() == b""
|
|
122
|
+
a = out[:8]
|
|
123
|
+
data = out[8:]
|
|
124
|
+
n = 1
|
|
125
|
+
else:
|
|
126
|
+
r = [wrapped_key[i : i + 8] for i in range(0, len(wrapped_key), 8)]
|
|
127
|
+
encrypted_aiv = r.pop(0)
|
|
128
|
+
n = len(r)
|
|
129
|
+
a, r = _unwrap_core(wrapping_key, encrypted_aiv, r)
|
|
130
|
+
data = b"".join(r)
|
|
131
|
+
|
|
132
|
+
# 1) Check that MSB(32,A) = A65959A6.
|
|
133
|
+
# 2) Check that 8*(n-1) < LSB(32,A) <= 8*n. If so, let
|
|
134
|
+
# MLI = LSB(32,A).
|
|
135
|
+
# 3) Let b = (8*n)-MLI, and then check that the rightmost b octets of
|
|
136
|
+
# the output data are zero.
|
|
137
|
+
mli = int.from_bytes(a[4:], byteorder="big")
|
|
138
|
+
b = (8 * n) - mli
|
|
139
|
+
if (
|
|
140
|
+
not bytes_eq(a[:4], b"\xa6\x59\x59\xa6")
|
|
141
|
+
or not 8 * (n - 1) < mli <= 8 * n
|
|
142
|
+
or (b != 0 and not bytes_eq(data[-b:], b"\x00" * b))
|
|
143
|
+
):
|
|
144
|
+
raise InvalidUnwrap()
|
|
145
|
+
|
|
146
|
+
if b == 0:
|
|
147
|
+
return data
|
|
148
|
+
else:
|
|
149
|
+
return data[:-b]
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
def aes_key_unwrap(
|
|
153
|
+
wrapping_key: bytes,
|
|
154
|
+
wrapped_key: bytes,
|
|
155
|
+
backend: typing.Any = None,
|
|
156
|
+
) -> bytes:
|
|
157
|
+
if len(wrapped_key) < 24:
|
|
158
|
+
raise InvalidUnwrap("Must be at least 24 bytes")
|
|
159
|
+
|
|
160
|
+
if len(wrapped_key) % 8 != 0:
|
|
161
|
+
raise InvalidUnwrap("The wrapped key must be a multiple of 8 bytes")
|
|
162
|
+
|
|
163
|
+
if len(wrapping_key) not in [16, 24, 32]:
|
|
164
|
+
raise ValueError("The wrapping key must be a valid AES key length")
|
|
165
|
+
|
|
166
|
+
aiv = b"\xa6\xa6\xa6\xa6\xa6\xa6\xa6\xa6"
|
|
167
|
+
r = [wrapped_key[i : i + 8] for i in range(0, len(wrapped_key), 8)]
|
|
168
|
+
a = r.pop(0)
|
|
169
|
+
a, r = _unwrap_core(wrapping_key, a, r)
|
|
170
|
+
if not bytes_eq(a, aiv):
|
|
171
|
+
raise InvalidUnwrap()
|
|
172
|
+
|
|
173
|
+
return b"".join(r)
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
class InvalidUnwrap(Exception):
|
|
177
|
+
pass
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# This file is dual licensed under the terms of the Apache License, Version
|
|
2
|
+
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
|
|
3
|
+
# for complete details.
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
import abc
|
|
8
|
+
|
|
9
|
+
from cryptography import utils
|
|
10
|
+
from cryptography.hazmat.bindings._rust import (
|
|
11
|
+
ANSIX923PaddingContext,
|
|
12
|
+
ANSIX923UnpaddingContext,
|
|
13
|
+
PKCS7PaddingContext,
|
|
14
|
+
PKCS7UnpaddingContext,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class PaddingContext(metaclass=abc.ABCMeta):
|
|
19
|
+
@abc.abstractmethod
|
|
20
|
+
def update(self, data: utils.Buffer) -> bytes:
|
|
21
|
+
"""
|
|
22
|
+
Pads the provided bytes and returns any available data as bytes.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
@abc.abstractmethod
|
|
26
|
+
def finalize(self) -> bytes:
|
|
27
|
+
"""
|
|
28
|
+
Finalize the padding, returns bytes.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def _byte_padding_check(block_size: int) -> None:
|
|
33
|
+
if not (0 <= block_size <= 2040):
|
|
34
|
+
raise ValueError("block_size must be in range(0, 2041).")
|
|
35
|
+
|
|
36
|
+
if block_size % 8 != 0:
|
|
37
|
+
raise ValueError("block_size must be a multiple of 8.")
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class PKCS7:
|
|
41
|
+
def __init__(self, block_size: int):
|
|
42
|
+
_byte_padding_check(block_size)
|
|
43
|
+
self.block_size = block_size
|
|
44
|
+
|
|
45
|
+
def padder(self) -> PaddingContext:
|
|
46
|
+
return PKCS7PaddingContext(self.block_size)
|
|
47
|
+
|
|
48
|
+
def unpadder(self) -> PaddingContext:
|
|
49
|
+
return PKCS7UnpaddingContext(self.block_size)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
PaddingContext.register(PKCS7PaddingContext)
|
|
53
|
+
PaddingContext.register(PKCS7UnpaddingContext)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class ANSIX923:
|
|
57
|
+
def __init__(self, block_size: int):
|
|
58
|
+
_byte_padding_check(block_size)
|
|
59
|
+
self.block_size = block_size
|
|
60
|
+
|
|
61
|
+
def padder(self) -> PaddingContext:
|
|
62
|
+
return ANSIX923PaddingContext(self.block_size)
|
|
63
|
+
|
|
64
|
+
def unpadder(self) -> PaddingContext:
|
|
65
|
+
return ANSIX923UnpaddingContext(self.block_size)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
PaddingContext.register(ANSIX923PaddingContext)
|
|
69
|
+
PaddingContext.register(ANSIX923UnpaddingContext)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# This file is dual licensed under the terms of the Apache License, Version
|
|
2
|
+
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
|
|
3
|
+
# for complete details.
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from cryptography.hazmat.bindings._rust import openssl as rust_openssl
|
|
8
|
+
|
|
9
|
+
__all__ = ["Poly1305"]
|
|
10
|
+
|
|
11
|
+
Poly1305 = rust_openssl.poly1305.Poly1305
|
package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/serialization/__init__.py
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# This file is dual licensed under the terms of the Apache License, Version
|
|
2
|
+
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
|
|
3
|
+
# for complete details.
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from cryptography.hazmat.primitives._serialization import (
|
|
8
|
+
BestAvailableEncryption,
|
|
9
|
+
Encoding,
|
|
10
|
+
KeySerializationEncryption,
|
|
11
|
+
NoEncryption,
|
|
12
|
+
ParameterFormat,
|
|
13
|
+
PrivateFormat,
|
|
14
|
+
PublicFormat,
|
|
15
|
+
_KeySerializationEncryption,
|
|
16
|
+
)
|
|
17
|
+
from cryptography.hazmat.primitives.serialization.base import (
|
|
18
|
+
load_der_parameters,
|
|
19
|
+
load_der_private_key,
|
|
20
|
+
load_der_public_key,
|
|
21
|
+
load_pem_parameters,
|
|
22
|
+
load_pem_private_key,
|
|
23
|
+
load_pem_public_key,
|
|
24
|
+
)
|
|
25
|
+
from cryptography.hazmat.primitives.serialization.ssh import (
|
|
26
|
+
SSHCertificate,
|
|
27
|
+
SSHCertificateBuilder,
|
|
28
|
+
SSHCertificateType,
|
|
29
|
+
SSHCertPrivateKeyTypes,
|
|
30
|
+
SSHCertPublicKeyTypes,
|
|
31
|
+
SSHPrivateKeyTypes,
|
|
32
|
+
SSHPublicKeyTypes,
|
|
33
|
+
load_ssh_private_key,
|
|
34
|
+
load_ssh_public_identity,
|
|
35
|
+
load_ssh_public_key,
|
|
36
|
+
ssh_key_fingerprint,
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
__all__ = [
|
|
40
|
+
"BestAvailableEncryption",
|
|
41
|
+
"Encoding",
|
|
42
|
+
"KeySerializationEncryption",
|
|
43
|
+
"NoEncryption",
|
|
44
|
+
"ParameterFormat",
|
|
45
|
+
"PrivateFormat",
|
|
46
|
+
"PublicFormat",
|
|
47
|
+
"SSHCertPrivateKeyTypes",
|
|
48
|
+
"SSHCertPublicKeyTypes",
|
|
49
|
+
"SSHCertificate",
|
|
50
|
+
"SSHCertificateBuilder",
|
|
51
|
+
"SSHCertificateType",
|
|
52
|
+
"SSHPrivateKeyTypes",
|
|
53
|
+
"SSHPublicKeyTypes",
|
|
54
|
+
"_KeySerializationEncryption",
|
|
55
|
+
"load_der_parameters",
|
|
56
|
+
"load_der_private_key",
|
|
57
|
+
"load_der_public_key",
|
|
58
|
+
"load_pem_parameters",
|
|
59
|
+
"load_pem_private_key",
|
|
60
|
+
"load_pem_public_key",
|
|
61
|
+
"load_ssh_private_key",
|
|
62
|
+
"load_ssh_public_identity",
|
|
63
|
+
"load_ssh_public_key",
|
|
64
|
+
"ssh_key_fingerprint",
|
|
65
|
+
]
|
package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/serialization/base.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# This file is dual licensed under the terms of the Apache License, Version
|
|
2
|
+
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
|
|
3
|
+
# for complete details.
|
|
4
|
+
|
|
5
|
+
from cryptography.hazmat.bindings._rust import openssl as rust_openssl
|
|
6
|
+
|
|
7
|
+
load_pem_private_key = rust_openssl.keys.load_pem_private_key
|
|
8
|
+
load_der_private_key = rust_openssl.keys.load_der_private_key
|
|
9
|
+
|
|
10
|
+
load_pem_public_key = rust_openssl.keys.load_pem_public_key
|
|
11
|
+
load_der_public_key = rust_openssl.keys.load_der_public_key
|
|
12
|
+
|
|
13
|
+
load_pem_parameters = rust_openssl.dh.from_pem_parameters
|
|
14
|
+
load_der_parameters = rust_openssl.dh.from_der_parameters
|
package/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/serialization/pkcs12.py
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# This file is dual licensed under the terms of the Apache License, Version
|
|
2
|
+
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
|
|
3
|
+
# for complete details.
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
import typing
|
|
8
|
+
from collections.abc import Iterable
|
|
9
|
+
|
|
10
|
+
from cryptography import x509
|
|
11
|
+
from cryptography.hazmat.bindings._rust import pkcs12 as rust_pkcs12
|
|
12
|
+
from cryptography.hazmat.primitives import serialization
|
|
13
|
+
from cryptography.hazmat.primitives._serialization import PBES as PBES
|
|
14
|
+
from cryptography.hazmat.primitives.asymmetric import (
|
|
15
|
+
dsa,
|
|
16
|
+
ec,
|
|
17
|
+
ed448,
|
|
18
|
+
ed25519,
|
|
19
|
+
rsa,
|
|
20
|
+
)
|
|
21
|
+
from cryptography.hazmat.primitives.asymmetric.types import PrivateKeyTypes
|
|
22
|
+
|
|
23
|
+
__all__ = [
|
|
24
|
+
"PBES",
|
|
25
|
+
"PKCS12Certificate",
|
|
26
|
+
"PKCS12KeyAndCertificates",
|
|
27
|
+
"PKCS12PrivateKeyTypes",
|
|
28
|
+
"load_key_and_certificates",
|
|
29
|
+
"load_pkcs12",
|
|
30
|
+
"serialize_java_truststore",
|
|
31
|
+
"serialize_key_and_certificates",
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
PKCS12PrivateKeyTypes = typing.Union[
|
|
35
|
+
rsa.RSAPrivateKey,
|
|
36
|
+
dsa.DSAPrivateKey,
|
|
37
|
+
ec.EllipticCurvePrivateKey,
|
|
38
|
+
ed25519.Ed25519PrivateKey,
|
|
39
|
+
ed448.Ed448PrivateKey,
|
|
40
|
+
]
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
PKCS12Certificate = rust_pkcs12.PKCS12Certificate
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class PKCS12KeyAndCertificates:
|
|
47
|
+
def __init__(
|
|
48
|
+
self,
|
|
49
|
+
key: PrivateKeyTypes | None,
|
|
50
|
+
cert: PKCS12Certificate | None,
|
|
51
|
+
additional_certs: list[PKCS12Certificate],
|
|
52
|
+
):
|
|
53
|
+
if key is not None and not isinstance(
|
|
54
|
+
key,
|
|
55
|
+
(
|
|
56
|
+
rsa.RSAPrivateKey,
|
|
57
|
+
dsa.DSAPrivateKey,
|
|
58
|
+
ec.EllipticCurvePrivateKey,
|
|
59
|
+
ed25519.Ed25519PrivateKey,
|
|
60
|
+
ed448.Ed448PrivateKey,
|
|
61
|
+
),
|
|
62
|
+
):
|
|
63
|
+
raise TypeError(
|
|
64
|
+
"Key must be RSA, DSA, EllipticCurve, ED25519, or ED448"
|
|
65
|
+
" private key, or None."
|
|
66
|
+
)
|
|
67
|
+
if cert is not None and not isinstance(cert, PKCS12Certificate):
|
|
68
|
+
raise TypeError("cert must be a PKCS12Certificate object or None")
|
|
69
|
+
if not all(
|
|
70
|
+
isinstance(add_cert, PKCS12Certificate)
|
|
71
|
+
for add_cert in additional_certs
|
|
72
|
+
):
|
|
73
|
+
raise TypeError(
|
|
74
|
+
"all values in additional_certs must be PKCS12Certificate"
|
|
75
|
+
" objects"
|
|
76
|
+
)
|
|
77
|
+
self._key = key
|
|
78
|
+
self._cert = cert
|
|
79
|
+
self._additional_certs = additional_certs
|
|
80
|
+
|
|
81
|
+
@property
|
|
82
|
+
def key(self) -> PrivateKeyTypes | None:
|
|
83
|
+
return self._key
|
|
84
|
+
|
|
85
|
+
@property
|
|
86
|
+
def cert(self) -> PKCS12Certificate | None:
|
|
87
|
+
return self._cert
|
|
88
|
+
|
|
89
|
+
@property
|
|
90
|
+
def additional_certs(self) -> list[PKCS12Certificate]:
|
|
91
|
+
return self._additional_certs
|
|
92
|
+
|
|
93
|
+
def __eq__(self, other: object) -> bool:
|
|
94
|
+
if not isinstance(other, PKCS12KeyAndCertificates):
|
|
95
|
+
return NotImplemented
|
|
96
|
+
|
|
97
|
+
return (
|
|
98
|
+
self.key == other.key
|
|
99
|
+
and self.cert == other.cert
|
|
100
|
+
and self.additional_certs == other.additional_certs
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
def __hash__(self) -> int:
|
|
104
|
+
return hash((self.key, self.cert, tuple(self.additional_certs)))
|
|
105
|
+
|
|
106
|
+
def __repr__(self) -> str:
|
|
107
|
+
fmt = (
|
|
108
|
+
"<PKCS12KeyAndCertificates(key={}, cert={}, additional_certs={})>"
|
|
109
|
+
)
|
|
110
|
+
return fmt.format(self.key, self.cert, self.additional_certs)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
load_key_and_certificates = rust_pkcs12.load_key_and_certificates
|
|
114
|
+
load_pkcs12 = rust_pkcs12.load_pkcs12
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
_PKCS12CATypes = typing.Union[
|
|
118
|
+
x509.Certificate,
|
|
119
|
+
PKCS12Certificate,
|
|
120
|
+
]
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def serialize_java_truststore(
|
|
124
|
+
certs: Iterable[PKCS12Certificate],
|
|
125
|
+
encryption_algorithm: serialization.KeySerializationEncryption,
|
|
126
|
+
) -> bytes:
|
|
127
|
+
if not certs:
|
|
128
|
+
raise ValueError("You must supply at least one cert")
|
|
129
|
+
|
|
130
|
+
if not isinstance(
|
|
131
|
+
encryption_algorithm, serialization.KeySerializationEncryption
|
|
132
|
+
):
|
|
133
|
+
raise TypeError(
|
|
134
|
+
"Key encryption algorithm must be a "
|
|
135
|
+
"KeySerializationEncryption instance"
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
return rust_pkcs12.serialize_java_truststore(certs, encryption_algorithm)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
def serialize_key_and_certificates(
|
|
142
|
+
name: bytes | None,
|
|
143
|
+
key: PKCS12PrivateKeyTypes | None,
|
|
144
|
+
cert: x509.Certificate | None,
|
|
145
|
+
cas: Iterable[_PKCS12CATypes] | None,
|
|
146
|
+
encryption_algorithm: serialization.KeySerializationEncryption,
|
|
147
|
+
) -> bytes:
|
|
148
|
+
if key is not None and not isinstance(
|
|
149
|
+
key,
|
|
150
|
+
(
|
|
151
|
+
rsa.RSAPrivateKey,
|
|
152
|
+
dsa.DSAPrivateKey,
|
|
153
|
+
ec.EllipticCurvePrivateKey,
|
|
154
|
+
ed25519.Ed25519PrivateKey,
|
|
155
|
+
ed448.Ed448PrivateKey,
|
|
156
|
+
),
|
|
157
|
+
):
|
|
158
|
+
raise TypeError(
|
|
159
|
+
"Key must be RSA, DSA, EllipticCurve, ED25519, or ED448"
|
|
160
|
+
" private key, or None."
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
if not isinstance(
|
|
164
|
+
encryption_algorithm, serialization.KeySerializationEncryption
|
|
165
|
+
):
|
|
166
|
+
raise TypeError(
|
|
167
|
+
"Key encryption algorithm must be a "
|
|
168
|
+
"KeySerializationEncryption instance"
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
if key is None and cert is None and not cas:
|
|
172
|
+
raise ValueError("You must supply at least one of key, cert, or cas")
|
|
173
|
+
|
|
174
|
+
return rust_pkcs12.serialize_key_and_certificates(
|
|
175
|
+
name, key, cert, cas, encryption_algorithm
|
|
176
|
+
)
|