pyvider 2025-02-02
Major client rewrite introducing the new `Certificate` API from the crypto
53 files · 2,788+ · 2,183-

Client Certificate API Migration

18 files changed
  • gource.conf Added gource.conf (+13 lines)
  • loc-counter.sh Added loc-counter.sh (+3 lines)
  • client.py Updated client.py (+177/-183 lines)
  • __init__.py Added __init__.py (+40 lines)
  • certificate.py Added certificate.py (+668 lines)
  • constants.py Added constants.py (+18 lines)
  • generators.py Added generators.py (+72 lines)
  • types.py Added types.py (+9 lines)
  • README.md Added README.md (+2 lines)
  • env.sh Updated env.sh (+1/-1 lines)
  • kv-data-status Added kv-data-status (+1 lines)
  • py-kv-server.py Updated py-kv-server.py (+119/-62 lines)
  • exception.py Updated exception.py (+1/-1 lines)
  • handshake.py Updated handshake.py (+5/-2 lines)
  • security.py Updated security.py (+47/-149 lines)
  • certificate.py Removed certificate.py (-217 lines)
  • server.py Updated server.py (+158/-112 lines)
  • test_server.py Updated test_server.py (+0/-0 lines)
  • Replaced direct cryptography.hazmat.primitives.serialization and x509 imports with pyvider.rpcplugin.crypto.certificate.Certificate and pyvider.rpcplugin.crypto.generators.generate_keypair harden internal
    3 files
    • cryptography.hazmat.primitives.serialization
    • pyvider.rpcplugin.crypto.certificate.Certificate
    • pyvider.rpcplugin.crypto.generators.generate_keypair
  • Removed imports for raw_base64_to_pem_cert, create_self_signed_x509_certificate, create_ssl_client_credentials, log_certificate_details from old security module harden internal
    51 files
    • broke-server.py
    • client.py
    • __init__.py
    • certificate.py
    • constants.py
    • generators.py
    • types.py
    • README.md
    • env.sh
    • kv-data-status
    • py-kv-server.py
    • exception.py
    • handshake.py
    • example.proto
    • example_pb2.py
    • example_pb2_grpc.py
    • example_server.py
    • mock_message.proto
    • mock_message_pb2.py
    • mock_message_pb2_grpc.py
    • mock_server.py
    • security.py
    • certificate.py
    • server.py
    • test_server.py
    • __init__.py
    • conftest.py
    • test_certificate_chains.py
    • test_certificate_create.py
    • test_certificate_credentials.py
    • test_certificate_lifecycle.py
    • test_certificate_loading.py
    • test_certificate_mtls.py
    • test_certificate_properties.py
    • test_certificate_verify.py
    • test_crypto.py
    • test_crypto_generators.py
    • crypto.py
    • test_handshake_magic_cookie.py
    • test_handshake_negotiation.py
    • test_handshake_responses.py
    • test_certificate_validation.py
    • test_client_grpc.py
    • test_security.py
    • x_test_transport_tcp.py
    • x_test_transport_unix.py
    • x_test_cert.py
    • x_test_cert2.py
    • x_test_cert3.py
    • x_test_client.py
    • tls-check.py
  • Client now uses the new Certificate abstraction for all cert operations harden internal
    4 files
    • test_certificate_validation.py
    • x_test_cert.py
    • x_test_cert2.py
    • x_test_cert3.py

Client Code Quality

2 files changed
  • asyncio.CancelledError Updated asyncio.CancelledError
  • attrs.field Updated attrs.field
  • Added from __future__ import annotations back to client specify internal
    1 file
    • client.py
  • Added contextlib import for suppressing asyncio.CancelledError during task cleanup deprecate errata
    1 file
    • asyncio.CancelledError
  • Improved docstrings throughout: _relay_stderr, _perform_handshake, handshake parsing wrapped in try/except streamline internal
    1 file
    • client.py
  • Changed attrs.field defaults to explicit attrs.field(init=False, default=None) for stderr_task and stdout_task instantiate architectural
    1 file
    • attrs.field

Broken Test Organization

34 files changed
  • broke-server.py Updated broke-server.py (+0/-0 lines)
  • example.proto Updated example.proto (+0/-0 lines)
  • example_pb2.py Updated example_pb2.py (+0/-0 lines)
  • example_pb2_grpc.py Updated example_pb2_grpc.py (+0/-0 lines)
  • example_server.py Updated example_server.py (+0/-0 lines)
  • mock_message.proto Updated mock_message.proto (+0/-0 lines)
  • mock_message_pb2.py Updated mock_message_pb2.py (+0/-0 lines)
  • mock_message_pb2_grpc.py Updated mock_message_pb2_grpc.py (+0/-0 lines)
  • mock_server.py Updated mock_server.py (+0/-0 lines)
  • __init__.py Updated __init__.py (+0/-0 lines)
  • conftest.py Updated conftest.py (+7/-43 lines)
  • test_certificate_chains.py Added test_certificate_chains.py (+142 lines)
  • test_certificate_create.py Added test_certificate_create.py (+86 lines)
  • test_certificate_credentials.py Added test_certificate_credentials.py (+129 lines)
  • test_certificate_lifecycle.py Added test_certificate_lifecycle.py (+85 lines)
  • test_certificate_loading.py Added test_certificate_loading.py (+133 lines)
  • test_certificate_mtls.py Updated test_certificate_mtls.py (+2/-2 lines)
  • test_certificate_properties.py Added test_certificate_properties.py (+147 lines)
  • test_certificate_verify.py Added test_certificate_verify.py (+248 lines)
  • test_crypto.py Added test_crypto.py (+32 lines)
  • test_crypto_generators.py Added test_crypto_generators.py (+88 lines)
  • crypto.py Added crypto.py (+79 lines)
  • test_handshake_magic_cookie.py Updated test_handshake_magic_cookie.py (+0/-0 lines)
  • test_handshake_negotiation.py Updated test_handshake_negotiation.py (+0/-0 lines)
  • test_handshake_responses.py Updated test_handshake_responses.py (+0/-0 lines)
  • test_certificate.py Removed test_certificate.py (-170 lines)
  • test_certificate_basic.py Removed test_certificate_basic.py (-131 lines)
  • test_certificate_loading.py Removed test_certificate_loading.py (-76 lines)
  • test_certificate_old.py Removed test_certificate_old.py (-239 lines)
  • test_client_grpc.py Updated test_client_grpc.py (+13/-5 lines)
  • test_security.py Removed test_security.py (-337 lines)
  • x_test_transport_tcp.py Updated x_test_transport_tcp.py (+0/-0 lines)
  • x_test_transport_unix.py Updated x_test_transport_unix.py (+0/-0 lines)
  • x_test_client.py Removed x_test_client.py (-249 lines)
  • Moved broke-server.py to broken/broke-server.py remediate internal
    1 file
    • broke-server.py
  • Moved test_client_grpc.py and test_minimal_server_client.py from tests/ to broken/ qualify internal
    33 files
    • example.proto
    • example_pb2.py
    • example_pb2_grpc.py
    • example_server.py
    • mock_message.proto
    • mock_message_pb2.py
    • mock_message_pb2_grpc.py
    • mock_server.py
    • __init__.py
    • conftest.py
    • test_certificate_chains.py
    • test_certificate_create.py
    • test_certificate_credentials.py
    • test_certificate_lifecycle.py
    • test_certificate_loading.py
    • test_certificate_mtls.py
    • test_certificate_properties.py
    • test_certificate_verify.py
    • test_crypto.py
    • test_crypto_generators.py
    • crypto.py
    • test_handshake_magic_cookie.py
    • test_handshake_negotiation.py
    • test_handshake_responses.py
    • test_certificate.py
    • test_certificate_basic.py
    • test_certificate_loading.py
    • test_certificate_old.py
    • test_client_grpc.py
    • test_security.py
    • x_test_transport_tcp.py
    • x_test_transport_unix.py
    • x_test_client.py
  • Removed x_test_client.py (249 lines) decouple internal
    1 file
    • x_test_client.py

TLS Check Tool

1 file changed
  • tls-check.py Updated tls-check.py (+263/-204 lines)
  • Updated tools/tls-check.py (467 lines changed) with revised certificate validation logic harden internal
    1 file
    • tls-check.py