python-nss-ng 1.3.6__tar.gz → 1.3.7__tar.gz
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.
- python_nss_ng-1.3.7/.git_archival.txt +4 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/PKG-INFO +1 -1
- python_nss_ng-1.3.7/_version.txt +1 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/pyproject.toml +3 -4
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/src/deprecations.py +2 -3
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/src/io.pyi +12 -12
- {python_nss_ng-1.3.6/typings/nss → python_nss_ng-1.3.7/src}/nss.pyi +61 -60
- {python_nss_ng-1.3.6/typings/nss → python_nss_ng-1.3.7/src}/ssl.pyi +10 -9
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/exceptions.py +1 -1
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/test_platform_specific.py +4 -9
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/test_type_hints.py +0 -1
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/typings/nss/deprecations.py +2 -3
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/typings/nss/error.pyi +3 -3
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/typings/nss/io.pyi +12 -12
- {python_nss_ng-1.3.6/src → python_nss_ng-1.3.7/typings/nss}/nss.pyi +61 -60
- {python_nss_ng-1.3.6/src → python_nss_ng-1.3.7/typings/nss}/ssl.pyi +10 -9
- python_nss_ng-1.3.6/.git_archival.txt +0 -4
- python_nss_ng-1.3.6/_version.txt +0 -1
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/.aislop/config.yml +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/.clangd +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/AGENTS.md +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/CONTRIBUTING.md +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/LICENSE +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/LICENSE.gpl +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/LICENSE.lgpl +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/LICENSE.mpl +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/LICENSES/Apache-2.0.txt +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/LICENSES/MPL-2.0.txt +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/MANIFEST.in +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/Makefile +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/QUICKSTART.md +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/README.md +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/REUSE.toml +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/SECURITY.md +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/doc/ChangeLog +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/doc/MAKEFILE_MIGRATION.md +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/doc/MANYLINUX_CONFIG.md +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/doc/MIGRATION.md +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/doc/MUTATION_TESTING.md +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/doc/TESTING.md +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/doc/examples/cert_dump.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/doc/examples/cert_trust.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/doc/examples/httplib_example.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/doc/examples/pbkdf2_example.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/doc/examples/ssl_cipher_info.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/doc/examples/ssl_example.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/doc/examples/ssl_version_range.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/doc/examples/verify_cert.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/doc/examples/verify_server.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/doc/get_api +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/meson.build +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/scripts/README.md +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/scripts/meson-version.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/scripts/run-all-tests.sh +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/src/NSPRerrs.h +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/src/SECerrs.h +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/src/SSLerrs.h +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/src/__init__.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/src/nss_context.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/src/py_nspr_common.h +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/src/py_nspr_error.c +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/src/py_nspr_error.h +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/src/py_nspr_io.c +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/src/py_nspr_io.h +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/src/py_nss.c +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/src/py_nss.h +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/src/py_shared_doc.h +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/src/py_ssl.c +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/src/py_ssl.h +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/src/py_traceback.h +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/src/secure_logging.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/conftest.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/run_tests +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/setup_certs.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/test_cert_components.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/test_cert_request.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/test_certificate_advanced.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/test_cipher.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/test_client_server.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/test_deprecations.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/test_digest.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/test_documentation_accuracy.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/test_error_refleaks.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/test_examples.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/test_misc.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/test_performance.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/test_pkcs12.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/test_property_based.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/test_secure_logging.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/test_security.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/test_thread_safety.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/test_util.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/test_zzz_error_messages.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/test_zzz_integration.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/test_zzz_nonexistent_certs.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/test_zzz_nss_context.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/test_zzz_ocsp.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/test/util.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/typings/nss/__init__.pyi +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/typings/nss/nss_context.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/typings/nss/secure_logging.py +0 -0
- {python_nss_ng-1.3.6 → python_nss_ng-1.3.7}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-nss-ng
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.7
|
|
4
4
|
Summary: Python bindings for Network Security Services (NSS) and Netscape Portable Runtime (NSPR)
|
|
5
5
|
Keywords: nss,nspr,cryptography,ssl,tls,pki,x509,security
|
|
6
6
|
Author-Email: John Dennis <jdennis@redhat.com>, Matthew Watkins <mwatkins@linuxfoundation.org>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.3.7
|
|
@@ -176,9 +176,6 @@ ignore = [
|
|
|
176
176
|
"C901", # too complex
|
|
177
177
|
"S101", # assert detected (allow in tests)
|
|
178
178
|
"T201", # print found (intentional in examples)
|
|
179
|
-
"UP006", # Use `X` instead of `typing.X` for type annotations (Python 3.10 compat)
|
|
180
|
-
"UP007", # Use `X | Y` for union types (Python 3.10 compat)
|
|
181
|
-
"UP035", # Import from `typing` is deprecated (Python 3.10 compat)
|
|
182
179
|
]
|
|
183
180
|
|
|
184
181
|
[tool.ruff.lint.per-file-ignores]
|
|
@@ -247,7 +244,9 @@ ignore = [
|
|
|
247
244
|
"UP024", # replace aliased exceptions with builtins
|
|
248
245
|
"UP032", # use f-string instead of format
|
|
249
246
|
]
|
|
250
|
-
|
|
247
|
+
# Allow subprocess calls in cert setup. UP006/UP035 stay ignored here
|
|
248
|
+
# until someone can edit this executable file to use `list`/`tuple`.
|
|
249
|
+
"test/setup_certs.py" = ["S603", "S607", "UP006", "UP035"]
|
|
251
250
|
# Build-time version helper that shells out to the trusted `git` binary.
|
|
252
251
|
"scripts/meson-version.py" = ["S603", "S607"]
|
|
253
252
|
|
|
@@ -9,12 +9,11 @@ and utilities for emitting deprecation warnings.
|
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
11
|
import warnings
|
|
12
|
-
from typing import Dict
|
|
13
12
|
|
|
14
13
|
# Central registry of deprecated functionality
|
|
15
14
|
# Key: deprecated symbol name
|
|
16
15
|
# Value: replacement/migration guidance
|
|
17
|
-
DEPRECATED_REGISTRY:
|
|
16
|
+
DEPRECATED_REGISTRY: dict[str, str] = {
|
|
18
17
|
"io.NetworkAddress()": (
|
|
19
18
|
"NetworkAddress initialization from a string parameter only works for IPv4. "
|
|
20
19
|
"Use io.AddrInfo instead for proper IPv4/IPv6 support."
|
|
@@ -97,7 +96,7 @@ def get_deprecation_message(symbol_name: str) -> str | None:
|
|
|
97
96
|
return DEPRECATED_REGISTRY.get(symbol_name)
|
|
98
97
|
|
|
99
98
|
|
|
100
|
-
def list_deprecated() ->
|
|
99
|
+
def list_deprecated() -> dict[str, str]:
|
|
101
100
|
"""
|
|
102
101
|
Get a copy of the entire deprecation registry.
|
|
103
102
|
|
|
@@ -8,7 +8,7 @@ This file provides type hints for the C extension module nss.io (NSPR I/O).
|
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
10
|
import socket
|
|
11
|
-
from typing import Any
|
|
11
|
+
from typing import Any
|
|
12
12
|
|
|
13
13
|
# Time conversion utilities
|
|
14
14
|
def seconds_to_interval(seconds: float) -> int:
|
|
@@ -126,7 +126,7 @@ class NetworkAddress:
|
|
|
126
126
|
|
|
127
127
|
def __init__(
|
|
128
128
|
self,
|
|
129
|
-
addr:
|
|
129
|
+
addr: str | int | tuple[str, int] | None = None,
|
|
130
130
|
port: int = 0,
|
|
131
131
|
family: int = PR_AF_INET,
|
|
132
132
|
) -> None:
|
|
@@ -190,16 +190,16 @@ class HostEntry:
|
|
|
190
190
|
...
|
|
191
191
|
|
|
192
192
|
@property
|
|
193
|
-
def aliases(self) ->
|
|
193
|
+
def aliases(self) -> list[str]:
|
|
194
194
|
"""Get list of hostname aliases."""
|
|
195
195
|
...
|
|
196
196
|
|
|
197
197
|
@property
|
|
198
|
-
def addresses(self) ->
|
|
198
|
+
def addresses(self) -> list[NetworkAddress]:
|
|
199
199
|
"""Get list of network addresses."""
|
|
200
200
|
...
|
|
201
201
|
|
|
202
|
-
def get_network_addresses(self, family: int = PR_AF_INET) ->
|
|
202
|
+
def get_network_addresses(self, family: int = PR_AF_INET) -> list[NetworkAddress]:
|
|
203
203
|
"""Get network addresses filtered by family."""
|
|
204
204
|
...
|
|
205
205
|
|
|
@@ -323,7 +323,7 @@ class Socket:
|
|
|
323
323
|
"""
|
|
324
324
|
...
|
|
325
325
|
|
|
326
|
-
def accept(self, timeout: int | None = None) ->
|
|
326
|
+
def accept(self, timeout: int | None = None) -> tuple[Socket, NetworkAddress]:
|
|
327
327
|
"""
|
|
328
328
|
Accept an incoming connection.
|
|
329
329
|
|
|
@@ -371,7 +371,7 @@ class Socket:
|
|
|
371
371
|
|
|
372
372
|
def recvfrom(
|
|
373
373
|
self, bufsize: int, flags: int = 0, timeout: int | None = None
|
|
374
|
-
) ->
|
|
374
|
+
) -> tuple[bytes, NetworkAddress]:
|
|
375
375
|
"""
|
|
376
376
|
Receive data and sender address (UDP).
|
|
377
377
|
|
|
@@ -435,7 +435,7 @@ class Socket:
|
|
|
435
435
|
"""Read a line from socket."""
|
|
436
436
|
...
|
|
437
437
|
|
|
438
|
-
def readlines(self, sizehint: int = -1, timeout: int | None = None) ->
|
|
438
|
+
def readlines(self, sizehint: int = -1, timeout: int | None = None) -> list[bytes]:
|
|
439
439
|
"""Read lines from socket."""
|
|
440
440
|
...
|
|
441
441
|
|
|
@@ -445,7 +445,7 @@ class Socket:
|
|
|
445
445
|
|
|
446
446
|
def accept_read(
|
|
447
447
|
self, buf_size: int = 4096, timeout: int | None = None
|
|
448
|
-
) ->
|
|
448
|
+
) -> tuple[Socket, NetworkAddress, bytes]:
|
|
449
449
|
"""Accept connection and read data in one operation."""
|
|
450
450
|
...
|
|
451
451
|
|
|
@@ -454,14 +454,14 @@ class Socket:
|
|
|
454
454
|
...
|
|
455
455
|
|
|
456
456
|
@staticmethod
|
|
457
|
-
def new_tcp_pair() ->
|
|
457
|
+
def new_tcp_pair() -> tuple[Socket, Socket]:
|
|
458
458
|
"""Create a pair of connected TCP sockets."""
|
|
459
459
|
...
|
|
460
460
|
|
|
461
461
|
@staticmethod
|
|
462
462
|
def poll(
|
|
463
|
-
poll_desc_list:
|
|
464
|
-
) ->
|
|
463
|
+
poll_desc_list: list[tuple[Socket, int, int]], timeout: int | None = None
|
|
464
|
+
) -> list[tuple[Socket, int, int]]:
|
|
465
465
|
"""Poll multiple sockets for I/O events."""
|
|
466
466
|
...
|
|
467
467
|
|
|
@@ -7,7 +7,8 @@ Type stubs for nss.nss module.
|
|
|
7
7
|
This file provides type hints for the C extension module nss.nss.
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
|
-
from
|
|
10
|
+
from collections.abc import Callable
|
|
11
|
+
from typing import Any
|
|
11
12
|
|
|
12
13
|
# Version information
|
|
13
14
|
def nss_get_version() -> str:
|
|
@@ -58,11 +59,11 @@ def find_cert_from_nickname(nickname: str, *pin_args: Any) -> Certificate:
|
|
|
58
59
|
"""Find a certificate by its nickname."""
|
|
59
60
|
...
|
|
60
61
|
|
|
61
|
-
def find_certs_from_nickname(nickname: str, *pin_args: Any) ->
|
|
62
|
+
def find_certs_from_nickname(nickname: str, *pin_args: Any) -> list[Certificate]:
|
|
62
63
|
"""Find all certificates with the given nickname."""
|
|
63
64
|
...
|
|
64
65
|
|
|
65
|
-
def find_certs_from_email_addr(email: str, *pin_args: Any) ->
|
|
66
|
+
def find_certs_from_email_addr(email: str, *pin_args: Any) -> list[Certificate]:
|
|
66
67
|
"""Find certificates associated with an email address."""
|
|
67
68
|
...
|
|
68
69
|
|
|
@@ -70,7 +71,7 @@ def find_key_by_any_cert(cert: Certificate, *pin_args: Any) -> Any:
|
|
|
70
71
|
"""Find the private key associated with a certificate."""
|
|
71
72
|
...
|
|
72
73
|
|
|
73
|
-
def get_cert_nicknames(certdb: Any, what: int, *user_data: Any) ->
|
|
74
|
+
def get_cert_nicknames(certdb: Any, what: int, *user_data: Any) -> list[str]:
|
|
74
75
|
"""Get certificate nicknames from the database.
|
|
75
76
|
|
|
76
77
|
Args:
|
|
@@ -117,7 +118,7 @@ def read_hex(hex_string: str, separator: str | None = None) -> bytes:
|
|
|
117
118
|
"""Convert hex string to bytes."""
|
|
118
119
|
...
|
|
119
120
|
|
|
120
|
-
def oid_str(oid:
|
|
121
|
+
def oid_str(oid: int | str | SecItem) -> str:
|
|
121
122
|
"""Get the string representation of an OID.
|
|
122
123
|
|
|
123
124
|
``oid`` may be an integer tag, a string (tag name, AVA
|
|
@@ -263,7 +264,7 @@ def get_internal_key_slot() -> PK11Slot:
|
|
|
263
264
|
|
|
264
265
|
def get_all_tokens(
|
|
265
266
|
mechanism: int = 0, need_rw: bool = False, load_certs: bool = False, *pin_args: Any
|
|
266
|
-
) ->
|
|
267
|
+
) -> list[PK11Slot]:
|
|
267
268
|
"""Get all available tokens."""
|
|
268
269
|
...
|
|
269
270
|
|
|
@@ -289,7 +290,7 @@ def is_fips() -> bool:
|
|
|
289
290
|
|
|
290
291
|
# Key and parameter operations
|
|
291
292
|
def import_sym_key(
|
|
292
|
-
slot: PK11Slot, mechanism: int, origin: int, operation: int, key_data:
|
|
293
|
+
slot: PK11Slot, mechanism: int, origin: int, operation: int, key_data: bytes | SecItem
|
|
293
294
|
) -> Any:
|
|
294
295
|
"""Import a symmetric key.
|
|
295
296
|
|
|
@@ -304,7 +305,7 @@ def pub_wrap_sym_key(mechanism: int, pub_key: Any, sym_key: Any) -> bytes:
|
|
|
304
305
|
|
|
305
306
|
def param_from_iv(
|
|
306
307
|
mechanism: int,
|
|
307
|
-
iv:
|
|
308
|
+
iv: bytes | SecItem | None = None,
|
|
308
309
|
) -> SecItem:
|
|
309
310
|
"""Create parameters from an initialization vector.
|
|
310
311
|
|
|
@@ -345,7 +346,7 @@ def get_pad_mechanism(mechanism: int) -> int:
|
|
|
345
346
|
def data_to_hex(
|
|
346
347
|
data: bytes,
|
|
347
348
|
octets_per_line: int = 16,
|
|
348
|
-
separator:
|
|
349
|
+
separator: str | None = ":",
|
|
349
350
|
) -> str:
|
|
350
351
|
"""Convert binary data to hexadecimal string.
|
|
351
352
|
|
|
@@ -357,8 +358,8 @@ def data_to_hex(
|
|
|
357
358
|
|
|
358
359
|
def make_line_fmt_tuples(
|
|
359
360
|
level: int,
|
|
360
|
-
*lines:
|
|
361
|
-
) ->
|
|
361
|
+
*lines: str | list[str] | tuple[str, ...],
|
|
362
|
+
) -> list[tuple[int, str]]:
|
|
362
363
|
"""Create formatted line tuples for indented output.
|
|
363
364
|
|
|
364
365
|
Each positional ``lines`` argument may be a single string or a
|
|
@@ -367,7 +368,7 @@ def make_line_fmt_tuples(
|
|
|
367
368
|
"""
|
|
368
369
|
...
|
|
369
370
|
|
|
370
|
-
def indented_format(tuples:
|
|
371
|
+
def indented_format(tuples: list[tuple[int, str]]) -> str:
|
|
371
372
|
"""Format indented text from line tuples."""
|
|
372
373
|
...
|
|
373
374
|
|
|
@@ -379,7 +380,7 @@ def base64_to_binary(data: str) -> bytes:
|
|
|
379
380
|
"""Convert base64 string to binary data."""
|
|
380
381
|
...
|
|
381
382
|
|
|
382
|
-
def fingerprint_format_lines(fingerprint: bytes, level: int = 0) ->
|
|
383
|
+
def fingerprint_format_lines(fingerprint: bytes, level: int = 0) -> list[tuple[int, str]]:
|
|
383
384
|
"""Format fingerprint as indented lines."""
|
|
384
385
|
...
|
|
385
386
|
|
|
@@ -408,7 +409,7 @@ def pk11_disabled_reason_name(reason: int) -> str:
|
|
|
408
409
|
"""Get the name of a disabled reason."""
|
|
409
410
|
...
|
|
410
411
|
|
|
411
|
-
def oid_tag_name(tag:
|
|
412
|
+
def oid_tag_name(tag: int | str | SecItem) -> str:
|
|
412
413
|
"""Get the name of an OID tag.
|
|
413
414
|
|
|
414
415
|
``tag`` may be an integer tag value, a string (tag name, AVA
|
|
@@ -417,11 +418,11 @@ def oid_tag_name(tag: Union[int, str, SecItem]) -> str:
|
|
|
417
418
|
"""
|
|
418
419
|
...
|
|
419
420
|
|
|
420
|
-
def oid_tag(oid:
|
|
421
|
+
def oid_tag(oid: str | SecItem) -> int:
|
|
421
422
|
"""Get the tag for an OID."""
|
|
422
423
|
...
|
|
423
424
|
|
|
424
|
-
def oid_dotted_decimal(oid:
|
|
425
|
+
def oid_dotted_decimal(oid: int | str | SecItem) -> str:
|
|
425
426
|
"""Get the dotted decimal representation of an OID.
|
|
426
427
|
|
|
427
428
|
``oid`` may be an integer tag, a string (a tag name like
|
|
@@ -431,7 +432,7 @@ def oid_dotted_decimal(oid: Union[int, str, SecItem]) -> str:
|
|
|
431
432
|
"""
|
|
432
433
|
...
|
|
433
434
|
|
|
434
|
-
def list_certs(certdb: Any, *user_data: Any) ->
|
|
435
|
+
def list_certs(certdb: Any, *user_data: Any) -> list[Certificate]:
|
|
435
436
|
"""List all certificates in the database."""
|
|
436
437
|
...
|
|
437
438
|
|
|
@@ -452,35 +453,35 @@ def cert_general_name_type_from_name(name: str) -> int:
|
|
|
452
453
|
...
|
|
453
454
|
|
|
454
455
|
# Certificate and key usage flags
|
|
455
|
-
def cert_usage_flags(usage: int) ->
|
|
456
|
+
def cert_usage_flags(usage: int) -> list[str]:
|
|
456
457
|
"""Get list of certificate usage flag names."""
|
|
457
458
|
...
|
|
458
459
|
|
|
459
|
-
def key_usage_flags(usage: int) ->
|
|
460
|
+
def key_usage_flags(usage: int) -> list[str]:
|
|
460
461
|
"""Get list of key usage flag names."""
|
|
461
462
|
...
|
|
462
463
|
|
|
463
|
-
def cert_type_flags(cert_type: int) ->
|
|
464
|
+
def cert_type_flags(cert_type: int) -> list[str]:
|
|
464
465
|
"""Get list of certificate type flag names."""
|
|
465
466
|
...
|
|
466
467
|
|
|
467
|
-
def nss_init_flags(flags: int) ->
|
|
468
|
+
def nss_init_flags(flags: int) -> list[str]:
|
|
468
469
|
"""Get list of NSS init flag names."""
|
|
469
470
|
...
|
|
470
471
|
|
|
471
|
-
def x509_key_usage(flags: int, repr_kind: int = 0) ->
|
|
472
|
+
def x509_key_usage(flags: int, repr_kind: int = 0) -> str | list[str]:
|
|
472
473
|
"""Get X.509 key usage representation."""
|
|
473
474
|
...
|
|
474
475
|
|
|
475
|
-
def x509_cert_type(flags: int, repr_kind: int = 0) ->
|
|
476
|
+
def x509_cert_type(flags: int, repr_kind: int = 0) -> str | list[str]:
|
|
476
477
|
"""Get X.509 certificate type representation."""
|
|
477
478
|
...
|
|
478
479
|
|
|
479
|
-
def x509_ext_key_usage(oid_seq: SecItem, repr_kind: int = 0) ->
|
|
480
|
+
def x509_ext_key_usage(oid_seq: SecItem, repr_kind: int = 0) -> str | list[str]:
|
|
480
481
|
"""Get X.509 extended key usage representation."""
|
|
481
482
|
...
|
|
482
483
|
|
|
483
|
-
def x509_alt_name(gen_names: Any, repr_kind: int = 0) ->
|
|
484
|
+
def x509_alt_name(gen_names: Any, repr_kind: int = 0) -> str | list[str]:
|
|
484
485
|
"""Get X.509 alternative name representation."""
|
|
485
486
|
...
|
|
486
487
|
|
|
@@ -530,9 +531,9 @@ def pkcs12_set_nickname_collision_callback(callback: Callable[..., Any]) -> None
|
|
|
530
531
|
|
|
531
532
|
def pkcs12_export(
|
|
532
533
|
nickname: str,
|
|
533
|
-
output_file:
|
|
534
|
-
pk12_passwd:
|
|
535
|
-
cert_db_passwd:
|
|
534
|
+
output_file: str | None = None,
|
|
535
|
+
pk12_passwd: str | None = None,
|
|
536
|
+
cert_db_passwd: str | None = None,
|
|
536
537
|
*args: Any,
|
|
537
538
|
**kwargs: Any,
|
|
538
539
|
) -> Any:
|
|
@@ -582,7 +583,7 @@ SEC_OID_HMAC_SHA1: int
|
|
|
582
583
|
class SecItem:
|
|
583
584
|
"""Represents a security item (binary data)."""
|
|
584
585
|
|
|
585
|
-
def __init__(self, data:
|
|
586
|
+
def __init__(self, data: bytes | str | None = None, ascii: bool = False) -> None:
|
|
586
587
|
"""
|
|
587
588
|
Create a SecItem.
|
|
588
589
|
|
|
@@ -621,7 +622,7 @@ class Certificate:
|
|
|
621
622
|
cls,
|
|
622
623
|
flags: int,
|
|
623
624
|
repr_kind: int = ...,
|
|
624
|
-
) ->
|
|
625
|
+
) -> str | list[str] | list[int]:
|
|
625
626
|
"""Decode an integer trust-flag bitmask into a list of
|
|
626
627
|
flag names / enums / descriptions.
|
|
627
628
|
|
|
@@ -692,7 +693,7 @@ class Certificate:
|
|
|
692
693
|
...
|
|
693
694
|
|
|
694
695
|
@property
|
|
695
|
-
def extensions(self) ->
|
|
696
|
+
def extensions(self) -> list[CertificateExtension]:
|
|
696
697
|
"""List of X.509 extensions on the certificate."""
|
|
697
698
|
...
|
|
698
699
|
|
|
@@ -731,7 +732,7 @@ class Certificate:
|
|
|
731
732
|
"""Verify the certificate hostname."""
|
|
732
733
|
...
|
|
733
734
|
|
|
734
|
-
def check_valid_times(self, time:
|
|
735
|
+
def check_valid_times(self, time: int | None = None, allow_override: bool = False) -> int:
|
|
735
736
|
"""Check whether the certificate is currently within its
|
|
736
737
|
validity period."""
|
|
737
738
|
...
|
|
@@ -764,7 +765,7 @@ class Certificate:
|
|
|
764
765
|
"""
|
|
765
766
|
...
|
|
766
767
|
|
|
767
|
-
def format_lines(self, level: int = 0) ->
|
|
768
|
+
def format_lines(self, level: int = 0) -> list[tuple[int, str]]:
|
|
768
769
|
"""Format certificate as indented lines."""
|
|
769
770
|
...
|
|
770
771
|
|
|
@@ -786,18 +787,18 @@ class SymKey:
|
|
|
786
787
|
"""Get the key length in bits."""
|
|
787
788
|
...
|
|
788
789
|
|
|
789
|
-
def format_lines(self, level: int = 0) ->
|
|
790
|
+
def format_lines(self, level: int = 0) -> list[tuple[int, str]]:
|
|
790
791
|
"""Format key information as indented lines."""
|
|
791
792
|
...
|
|
792
793
|
|
|
793
794
|
class AlgorithmID:
|
|
794
795
|
"""Represents a cryptographic algorithm identifier."""
|
|
795
796
|
|
|
796
|
-
def get_pbe_crypto_mechanism(self, key: SymKey) ->
|
|
797
|
+
def get_pbe_crypto_mechanism(self, key: SymKey) -> tuple[int, SecItem]:
|
|
797
798
|
"""Get the cryptographic mechanism and parameters."""
|
|
798
799
|
...
|
|
799
800
|
|
|
800
|
-
def format_lines(self, level: int = 0) ->
|
|
801
|
+
def format_lines(self, level: int = 0) -> list[tuple[int, str]]:
|
|
801
802
|
"""Format algorithm ID information as indented lines."""
|
|
802
803
|
...
|
|
803
804
|
|
|
@@ -925,11 +926,11 @@ class PK11Slot:
|
|
|
925
926
|
|
|
926
927
|
def generate_key_pair(
|
|
927
928
|
self, mechanism: int, params: Any | None = None, *pin_args: Any
|
|
928
|
-
) ->
|
|
929
|
+
) -> tuple[Any, Any]:
|
|
929
930
|
"""Generate a key pair."""
|
|
930
931
|
...
|
|
931
932
|
|
|
932
|
-
def list_certs(self) ->
|
|
933
|
+
def list_certs(self) -> list[Certificate]:
|
|
933
934
|
"""List all certificates in the slot."""
|
|
934
935
|
...
|
|
935
936
|
|
|
@@ -937,7 +938,7 @@ class PK11Slot:
|
|
|
937
938
|
"""Generate a password-based encryption key."""
|
|
938
939
|
...
|
|
939
940
|
|
|
940
|
-
def format_lines(self, level: int = 0) ->
|
|
941
|
+
def format_lines(self, level: int = 0) -> list[tuple[int, str]]:
|
|
941
942
|
"""Format slot information as indented lines."""
|
|
942
943
|
...
|
|
943
944
|
|
|
@@ -992,7 +993,7 @@ class PK11SymKey:
|
|
|
992
993
|
"""Unwrap a symmetric key."""
|
|
993
994
|
...
|
|
994
995
|
|
|
995
|
-
def format_lines(self, level: int = 0) ->
|
|
996
|
+
def format_lines(self, level: int = 0) -> list[tuple[int, str]]:
|
|
996
997
|
"""Format key information as indented lines."""
|
|
997
998
|
...
|
|
998
999
|
|
|
@@ -1059,9 +1060,9 @@ class DN:
|
|
|
1059
1060
|
|
|
1060
1061
|
def __len__(self) -> int: ...
|
|
1061
1062
|
def __iter__(self) -> Any: ...
|
|
1062
|
-
def __getitem__(self, key:
|
|
1063
|
+
def __getitem__(self, key: int | slice | str) -> Any: ...
|
|
1063
1064
|
def __contains__(self, key: object) -> bool: ...
|
|
1064
|
-
def has_key(self, key:
|
|
1065
|
+
def has_key(self, key: str | int | SecItem) -> bool:
|
|
1065
1066
|
"""Check if the DN has a specific key."""
|
|
1066
1067
|
...
|
|
1067
1068
|
|
|
@@ -1103,13 +1104,13 @@ class RDN:
|
|
|
1103
1104
|
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
|
1104
1105
|
def __len__(self) -> int: ...
|
|
1105
1106
|
def __iter__(self) -> Any: ...
|
|
1106
|
-
def __getitem__(self, key:
|
|
1107
|
+
def __getitem__(self, key: int | slice | str) -> Any: ...
|
|
1107
1108
|
def __contains__(self, key: object) -> bool: ...
|
|
1108
1109
|
def __lt__(self, other: RDN) -> bool: ...
|
|
1109
1110
|
def __le__(self, other: RDN) -> bool: ...
|
|
1110
1111
|
def __gt__(self, other: RDN) -> bool: ...
|
|
1111
1112
|
def __ge__(self, other: RDN) -> bool: ...
|
|
1112
|
-
def has_key(self, key:
|
|
1113
|
+
def has_key(self, key: str | int | SecItem) -> bool:
|
|
1113
1114
|
"""Check if the RDN has a specific key."""
|
|
1114
1115
|
...
|
|
1115
1116
|
|
|
@@ -1147,7 +1148,7 @@ class AVA:
|
|
|
1147
1148
|
class GeneralName:
|
|
1148
1149
|
"""Represents a general name in a certificate."""
|
|
1149
1150
|
|
|
1150
|
-
def get_name(self, repr_kind: int = 0) ->
|
|
1151
|
+
def get_name(self, repr_kind: int = 0) -> str | tuple[int, str]:
|
|
1151
1152
|
"""Get the name representation."""
|
|
1152
1153
|
...
|
|
1153
1154
|
|
|
@@ -1162,7 +1163,7 @@ class CRLDistributionPt:
|
|
|
1162
1163
|
"""Get the reasons."""
|
|
1163
1164
|
...
|
|
1164
1165
|
|
|
1165
|
-
def format_lines(self, level: int = 0) ->
|
|
1166
|
+
def format_lines(self, level: int = 0) -> list[tuple[int, str]]:
|
|
1166
1167
|
"""Format as indented lines."""
|
|
1167
1168
|
...
|
|
1168
1169
|
|
|
@@ -1195,7 +1196,7 @@ class CertificateExtension:
|
|
|
1195
1196
|
"""Get the extension value."""
|
|
1196
1197
|
...
|
|
1197
1198
|
|
|
1198
|
-
def format_lines(self, level: int = 0) ->
|
|
1199
|
+
def format_lines(self, level: int = 0) -> list[tuple[int, str]]:
|
|
1199
1200
|
"""Format as indented lines."""
|
|
1200
1201
|
...
|
|
1201
1202
|
|
|
@@ -1219,7 +1220,7 @@ class PublicKey:
|
|
|
1219
1220
|
"""Get the key type."""
|
|
1220
1221
|
...
|
|
1221
1222
|
|
|
1222
|
-
def format_lines(self, level: int = 0) ->
|
|
1223
|
+
def format_lines(self, level: int = 0) -> list[tuple[int, str]]:
|
|
1223
1224
|
"""Format as indented lines."""
|
|
1224
1225
|
...
|
|
1225
1226
|
|
|
@@ -1240,7 +1241,7 @@ class RSAPublicKey:
|
|
|
1240
1241
|
"""Get the exponent."""
|
|
1241
1242
|
...
|
|
1242
1243
|
|
|
1243
|
-
def format_lines(self, level: int = 0) ->
|
|
1244
|
+
def format_lines(self, level: int = 0) -> list[tuple[int, str]]:
|
|
1244
1245
|
"""Format as indented lines."""
|
|
1245
1246
|
...
|
|
1246
1247
|
|
|
@@ -1251,7 +1252,7 @@ class RSAPublicKey:
|
|
|
1251
1252
|
class DSAPublicKey:
|
|
1252
1253
|
"""Represents a DSA public key."""
|
|
1253
1254
|
|
|
1254
|
-
def format_lines(self, level: int = 0) ->
|
|
1255
|
+
def format_lines(self, level: int = 0) -> list[tuple[int, str]]:
|
|
1255
1256
|
"""Format as indented lines."""
|
|
1256
1257
|
...
|
|
1257
1258
|
|
|
@@ -1272,7 +1273,7 @@ class SignedData:
|
|
|
1272
1273
|
"""Get the signature."""
|
|
1273
1274
|
...
|
|
1274
1275
|
|
|
1275
|
-
def format_lines(self, level: int = 0) ->
|
|
1276
|
+
def format_lines(self, level: int = 0) -> list[tuple[int, str]]:
|
|
1276
1277
|
"""Format as indented lines."""
|
|
1277
1278
|
...
|
|
1278
1279
|
|
|
@@ -1283,7 +1284,7 @@ class SignedData:
|
|
|
1283
1284
|
class SubjectPublicKeyInfo:
|
|
1284
1285
|
"""Represents subject public key info."""
|
|
1285
1286
|
|
|
1286
|
-
def format_lines(self, level: int = 0) ->
|
|
1287
|
+
def format_lines(self, level: int = 0) -> list[tuple[int, str]]:
|
|
1287
1288
|
"""Format as indented lines."""
|
|
1288
1289
|
...
|
|
1289
1290
|
|
|
@@ -1294,7 +1295,7 @@ class SubjectPublicKeyInfo:
|
|
|
1294
1295
|
class KEYPQGParams:
|
|
1295
1296
|
"""Represents PQG parameters for key generation."""
|
|
1296
1297
|
|
|
1297
|
-
def format_lines(self, level: int = 0) ->
|
|
1298
|
+
def format_lines(self, level: int = 0) -> list[tuple[int, str]]:
|
|
1298
1299
|
"""Format as indented lines."""
|
|
1299
1300
|
...
|
|
1300
1301
|
|
|
@@ -1316,7 +1317,7 @@ class AuthKeyID:
|
|
|
1316
1317
|
"""X.509 Authority Key Identifier extension wrapper."""
|
|
1317
1318
|
|
|
1318
1319
|
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
|
1319
|
-
def format_lines(self, level: int = 0) ->
|
|
1320
|
+
def format_lines(self, level: int = 0) -> list[tuple[int, str]]:
|
|
1320
1321
|
"""Format as indented lines."""
|
|
1321
1322
|
...
|
|
1322
1323
|
|
|
@@ -1330,7 +1331,7 @@ class BasicConstraints:
|
|
|
1330
1331
|
"""X.509 Basic Constraints extension wrapper."""
|
|
1331
1332
|
|
|
1332
1333
|
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
|
1333
|
-
def format_lines(self, level: int = 0) ->
|
|
1334
|
+
def format_lines(self, level: int = 0) -> list[tuple[int, str]]:
|
|
1334
1335
|
"""Format as indented lines."""
|
|
1335
1336
|
...
|
|
1336
1337
|
|
|
@@ -1346,8 +1347,8 @@ class CRLDistributionPts:
|
|
|
1346
1347
|
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
|
1347
1348
|
def __len__(self) -> int: ...
|
|
1348
1349
|
def __iter__(self) -> Any: ...
|
|
1349
|
-
def __getitem__(self, key:
|
|
1350
|
-
def format_lines(self, level: int = 0) ->
|
|
1350
|
+
def __getitem__(self, key: int | slice) -> Any: ...
|
|
1351
|
+
def format_lines(self, level: int = 0) -> list[tuple[int, str]]:
|
|
1351
1352
|
"""Format as indented lines."""
|
|
1352
1353
|
...
|
|
1353
1354
|
|
|
@@ -1363,8 +1364,8 @@ class AuthorityInfoAccesses:
|
|
|
1363
1364
|
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
|
1364
1365
|
def __len__(self) -> int: ...
|
|
1365
1366
|
def __iter__(self) -> Any: ...
|
|
1366
|
-
def __getitem__(self, key:
|
|
1367
|
-
def format_lines(self, level: int = 0) ->
|
|
1367
|
+
def __getitem__(self, key: int | slice) -> Any: ...
|
|
1368
|
+
def format_lines(self, level: int = 0) -> list[tuple[int, str]]:
|
|
1368
1369
|
"""Format as indented lines."""
|
|
1369
1370
|
...
|
|
1370
1371
|
|
|
@@ -1392,7 +1393,7 @@ class PKCS12Decoder:
|
|
|
1392
1393
|
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
|
1393
1394
|
def __iter__(self) -> Any: ...
|
|
1394
1395
|
def __len__(self) -> int: ...
|
|
1395
|
-
def __getitem__(self, key:
|
|
1396
|
+
def __getitem__(self, key: int | slice) -> Any: ...
|
|
1396
1397
|
def __getattr__(self, name: str) -> Any: ...
|
|
1397
1398
|
|
|
1398
1399
|
# ---------------------------------------------------------------------------
|
|
@@ -8,7 +8,8 @@ This file provides type hints for the C extension module nss.ssl.
|
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
10
|
import socket
|
|
11
|
-
from
|
|
11
|
+
from collections.abc import Callable
|
|
12
|
+
from typing import Any
|
|
12
13
|
|
|
13
14
|
# SSL Policy
|
|
14
15
|
def set_domestic_policy() -> None:
|
|
@@ -54,12 +55,12 @@ def get_cipher_policy(cipher: int) -> int:
|
|
|
54
55
|
# Functions returning a version range accept the optional ``repr_kind``
|
|
55
56
|
# keyword argument (one of the ``nss.As*`` constants) to control how
|
|
56
57
|
# the returned tuple members are represented.
|
|
57
|
-
def get_default_ssl_version_range(repr_kind: int = ...) ->
|
|
58
|
+
def get_default_ssl_version_range(repr_kind: int = ...) -> tuple[Any, Any]:
|
|
58
59
|
"""Get the default SSL/TLS version range."""
|
|
59
60
|
...
|
|
60
61
|
|
|
61
62
|
def set_default_ssl_version_range(
|
|
62
|
-
min_version:
|
|
63
|
+
min_version: int | str, max_version: int | str, variant: int = 0
|
|
63
64
|
) -> None:
|
|
64
65
|
"""Set the default SSL/TLS version range.
|
|
65
66
|
|
|
@@ -69,7 +70,7 @@ def set_default_ssl_version_range(
|
|
|
69
70
|
"""
|
|
70
71
|
...
|
|
71
72
|
|
|
72
|
-
def get_supported_ssl_version_range(repr_kind: int = ...) ->
|
|
73
|
+
def get_supported_ssl_version_range(repr_kind: int = ...) -> tuple[Any, Any]:
|
|
73
74
|
"""Get the supported SSL/TLS version range."""
|
|
74
75
|
...
|
|
75
76
|
|
|
@@ -305,8 +306,8 @@ class SSLSocket:
|
|
|
305
306
|
|
|
306
307
|
def set_ssl_version_range(
|
|
307
308
|
self,
|
|
308
|
-
min_version:
|
|
309
|
-
max_version:
|
|
309
|
+
min_version: int | str,
|
|
310
|
+
max_version: int | str,
|
|
310
311
|
) -> None:
|
|
311
312
|
"""
|
|
312
313
|
Set the SSL/TLS version range for this socket.
|
|
@@ -321,7 +322,7 @@ class SSLSocket:
|
|
|
321
322
|
"""
|
|
322
323
|
...
|
|
323
324
|
|
|
324
|
-
def get_ssl_version_range(self, repr_kind: int = ...) ->
|
|
325
|
+
def get_ssl_version_range(self, repr_kind: int = ...) -> tuple[Any, Any]:
|
|
325
326
|
"""
|
|
326
327
|
Get the SSL/TLS version range.
|
|
327
328
|
|
|
@@ -368,7 +369,7 @@ class SSLSocket:
|
|
|
368
369
|
"""Check if data is pending on the socket."""
|
|
369
370
|
...
|
|
370
371
|
|
|
371
|
-
def get_security_status(self) ->
|
|
372
|
+
def get_security_status(self) -> tuple[int, str, int, int, str, str, str]:
|
|
372
373
|
"""Get security status information."""
|
|
373
374
|
...
|
|
374
375
|
|
|
@@ -454,7 +455,7 @@ class SSLSocket:
|
|
|
454
455
|
"""Listen for connections."""
|
|
455
456
|
...
|
|
456
457
|
|
|
457
|
-
def accept(self, timeout: int | None = None) ->
|
|
458
|
+
def accept(self, timeout: int | None = None) -> tuple[SSLSocket, Any]:
|
|
458
459
|
"""
|
|
459
460
|
Accept an incoming connection.
|
|
460
461
|
|