@@ -7,7 +7,7 @@ msgstr ""
7
7
"Project-Id-Version : Python 3.12\n "
8
8
"Report-Msgid-Bugs-To : \n "
9
9
"POT-Creation-Date : 2024-08-04 00:03+0000\n "
10
- "PO-Revision-Date : 2024-08-28 00:43 +0800\n "
10
+ "PO-Revision-Date : 2024-09-08 22:30 +0800\n "
11
11
"Last-Translator : Adrian Liaw <adrianliaw2000@gmail.com>\n "
12
12
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
13
13
"tw)\n "
@@ -1471,29 +1471,38 @@ msgid ""
1471
1471
"active SSL connection, i.e. the handshake was completed and :meth:`SSLSocket."
1472
1472
"unwrap` was not called."
1473
1473
msgstr ""
1474
+ ":meth:`~SSLSocket.read` 和 :meth:`~SSLSocket.write` 方法為低階的方法,負責讀"
1475
+ "取和寫入未加密的應用數據,並將其加密/解密為加密的寫入數據。這些方法需要一個已"
1476
+ "建立的 SSL 連接,即握手已完成,且未呼叫 :meth:`SSLSocket.unwrap`。"
1474
1477
1475
1478
#: ../../library/ssl.rst:1123
1476
1479
msgid ""
1477
1480
"Normally you should use the socket API methods like :meth:`~socket.socket."
1478
1481
"recv` and :meth:`~socket.socket.send` instead of these methods."
1479
1482
msgstr ""
1483
+ "通常你應該使用像 :meth:`~socket.socket.recv` 和 :meth:`~socket.socket.send` "
1484
+ "這樣的 socket API 方法,而不是直接使用這些方法。"
1480
1485
1481
1486
#: ../../library/ssl.rst:1129
1482
1487
msgid "Perform the SSL setup handshake."
1483
- msgstr ""
1488
+ msgstr "執行 SSL 設定握手。 "
1484
1489
1485
1490
#: ../../library/ssl.rst:1131
1486
1491
msgid ""
1487
1492
"The handshake method also performs :func:`match_hostname` when the :attr:"
1488
1493
"`~SSLContext.check_hostname` attribute of the socket's :attr:`~SSLSocket."
1489
1494
"context` is true."
1490
1495
msgstr ""
1496
+ "當 socket 的 :attr:`~SSLSocket.context` 的 :attr:`~SSLContext."
1497
+ "check_hostname` 屬性質為 true 時,握手方法也會執行 :func:`match_hostname`。"
1491
1498
1492
1499
#: ../../library/ssl.rst:1136
1493
1500
msgid ""
1494
1501
"The socket timeout is no longer reset each time bytes are received or sent. "
1495
1502
"The socket timeout is now the maximum total duration of the handshake."
1496
1503
msgstr ""
1504
+ "Socket 超時時間已經不會在每次接收或傳送位元組時重置。現在,超時時間是握手過程"
1505
+ "的最大總持續時間。"
1497
1506
1498
1507
#: ../../library/ssl.rst:1140
1499
1508
msgid ""
@@ -1502,13 +1511,18 @@ msgid ""
1502
1511
"or IP address, the handshake is aborted early and a TLS alert message is "
1503
1512
"sent to the peer."
1504
1513
msgstr ""
1514
+ "在握手過程中,OpenSSL 會去配對主機名稱或 IP 地址。已不再使用 :func:"
1515
+ "`match_hostname` 函數。如果 OpenSSL 拒絕某個主機名稱或 IP 地址,握手將會提前"
1516
+ "中止,並向對方發送 TLS 警報訊息。"
1505
1517
1506
1518
#: ../../library/ssl.rst:1148
1507
1519
msgid ""
1508
1520
"If there is no certificate for the peer on the other end of the connection, "
1509
1521
"return ``None``. If the SSL handshake hasn't been done yet, raise :exc:"
1510
1522
"`ValueError`."
1511
1523
msgstr ""
1524
+ "如果連線端沒有證書,則返回 ``None``。如果 SSL 握手尚未完成,則引發 :exc:"
1525
+ "`ValueError`。"
1512
1526
1513
1527
#: ../../library/ssl.rst:1152
1514
1528
msgid ""
@@ -1521,6 +1535,11 @@ msgid ""
1521
1535
"of the *Subject Alternative Name* extension (see :rfc:`3280`), there will "
1522
1536
"also be a ``subjectAltName`` key in the dictionary."
1523
1537
msgstr ""
1538
+ "如果 ``binary_form`` 參數為 :const:`False`,且從對端接收到證書,則該方法返回"
1539
+ "一個 :class:`dict` 實例。如果證書未被驗證,則該字典為空。若證書已被驗證,則返"
1540
+ "回的字典將包含數個鍵值,包括 ``subject`` (證書所簽發的對象) 和 ``issuer`` (簽"
1541
+ "發證書的主體)。如果證書中包含 *Subject Alternative Name* 擴充 (參考\\ :rfc:"
1542
+ "`3280`\\ ),字典中還會有一個 ``subjectAltName`` 鍵。"
1524
1543
1525
1544
#: ../../library/ssl.rst:1161
1526
1545
msgid ""
@@ -1529,6 +1548,9 @@ msgid ""
1529
1548
"structure for the respective fields, and each RDN is a sequence of name-"
1530
1549
"value pairs. Here is a real-world example::"
1531
1550
msgstr ""
1551
+ "``subject`` 和 ``issuer`` 欄位欄位是包含相對識別名稱 (relative distinguished "
1552
+ "names, RDNs) 序列的元組,這些 RDN 來自證書資料結構中的相應欄位。每個 RDN 都是"
1553
+ "一組名稱與值的對。以下是現實中的範例::"
1532
1554
1533
1555
#: ../../library/ssl.rst:1185
1534
1556
msgid ""
@@ -1538,12 +1560,15 @@ msgid ""
1538
1560
"certificate. Whether the peer provides a certificate depends on the SSL "
1539
1561
"socket's role:"
1540
1562
msgstr ""
1563
+ "如果 ``binary_form`` 參數設定為 :const:`True`,且對端提供了證書,則該方法會"
1564
+ "以 DER 編碼形式 將整個證書以位元組序列形式回傳。如果對端未提供證書,則返回 :"
1565
+ "const:`None`。對端是否提供證書取決於 SSL socket 的腳色。"
1541
1566
1542
1567
#: ../../library/ssl.rst:1191
1543
1568
msgid ""
1544
1569
"for a client SSL socket, the server will always provide a certificate, "
1545
1570
"regardless of whether validation was required;"
1546
- msgstr ""
1571
+ msgstr "對於客戶端 SSL socket,伺服器將永遠提供證書,無論是否需要進行驗證。 "
1547
1572
1548
1573
#: ../../library/ssl.rst:1194
1549
1574
msgid ""
@@ -1552,6 +1577,9 @@ msgid ""
1552
1577
"`None` if you used :const:`CERT_NONE` (rather than :const:`CERT_OPTIONAL` "
1553
1578
"or :const:`CERT_REQUIRED`)."
1554
1579
msgstr ""
1580
+ "對於伺服器 SSL socket,客戶端僅在伺服器要求時才會提供證書;因此,如果你使用的"
1581
+ "是 :const:`CERT_NONE` (而非 :const:`CERT_OPTIONAL` 或 :const:"
1582
+ "`CERT_REQUIRED`),則 :meth:`getpeercert` 會回傳 :const:`None`。"
1555
1583
1556
1584
#: ../../library/ssl.rst:1199
1557
1585
msgid "See also :attr:`SSLContext.check_hostname`."
0 commit comments