Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd4192a4

Browse files
committed
Work on ssl
1 parent0c18738 commitd4192a4

File tree

1 file changed

+31
-3
lines changed

1 file changed

+31
-3
lines changed

‎library/ssl.po‎

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgstr ""
77
"Project-Id-Version:Python 3.12\n"
88
"Report-Msgid-Bugs-To:\n"
99
"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"
1111
"Last-Translator:Adrian Liaw <adrianliaw2000@gmail.com>\n"
1212
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
1313
"tw)\n"
@@ -1471,29 +1471,38 @@ msgid ""
14711471
"active SSL connection, i.e. the handshake was completed and :meth:`SSLSocket."
14721472
"unwrap` was not called."
14731473
msgstr""
1474+
":meth:`~SSLSocket.read` 和 :meth:`~SSLSocket.write` 方法為低階的方法,負責讀"
1475+
"取和寫入未加密的應用數據,並將其加密/解密為加密的寫入數據。這些方法需要一個已"
1476+
"建立的 SSL 連接,即握手已完成,且未呼叫 :meth:`SSLSocket.unwrap`。"
14741477

14751478
#:../../library/ssl.rst:1123
14761479
msgid""
14771480
"Normally you should use the socket API methods like :meth:`~socket.socket."
14781481
"recv` and :meth:`~socket.socket.send` instead of these methods."
14791482
msgstr""
1483+
"通常你應該使用像 :meth:`~socket.socket.recv` 和 :meth:`~socket.socket.send` "
1484+
"這樣的 socket API 方法,而不是直接使用這些方法。"
14801485

14811486
#:../../library/ssl.rst:1129
14821487
msgid"Perform the SSL setup handshake."
1483-
msgstr""
1488+
msgstr"執行 SSL 設定握手。"
14841489

14851490
#:../../library/ssl.rst:1131
14861491
msgid""
14871492
"The handshake method also performs :func:`match_hostname` when the :attr:"
14881493
"`~SSLContext.check_hostname` attribute of the socket's :attr:`~SSLSocket."
14891494
"context` is true."
14901495
msgstr""
1496+
"當 socket 的 :attr:`~SSLSocket.context` 的 :attr:`~SSLContext."
1497+
"check_hostname` 屬性質為 true 時,握手方法也會執行 :func:`match_hostname`。"
14911498

14921499
#:../../library/ssl.rst:1136
14931500
msgid""
14941501
"The socket timeout is no longer reset each time bytes are received or sent. "
14951502
"The socket timeout is now the maximum total duration of the handshake."
14961503
msgstr""
1504+
"Socket 超時時間已經不會在每次接收或傳送位元組時重置。現在,超時時間是握手過程"
1505+
"的最大總持續時間。"
14971506

14981507
#:../../library/ssl.rst:1140
14991508
msgid""
@@ -1502,13 +1511,18 @@ msgid ""
15021511
"or IP address, the handshake is aborted early and a TLS alert message is "
15031512
"sent to the peer."
15041513
msgstr""
1514+
"在握手過程中,OpenSSL 會去配對主機名稱或 IP 地址。已不再使用 :func:"
1515+
"`match_hostname` 函數。如果 OpenSSL 拒絕某個主機名稱或 IP 地址,握手將會提前"
1516+
"中止,並向對方發送 TLS 警報訊息。"
15051517

15061518
#:../../library/ssl.rst:1148
15071519
msgid""
15081520
"If there is no certificate for the peer on the other end of the connection, "
15091521
"return ``None``. If the SSL handshake hasn't been done yet, raise :exc:"
15101522
"`ValueError`."
15111523
msgstr""
1524+
"如果連線端沒有證書,則返回 ``None``。如果 SSL 握手尚未完成,則引發 :exc:"
1525+
"`ValueError`。"
15121526

15131527
#:../../library/ssl.rst:1152
15141528
msgid""
@@ -1521,6 +1535,11 @@ msgid ""
15211535
"of the *Subject Alternative Name* extension (see :rfc:`3280`), there will "
15221536
"also be a ``subjectAltName`` key in the dictionary."
15231537
msgstr""
1538+
"如果 ``binary_form`` 參數為 :const:`False`,且從對端接收到證書,則該方法返回"
1539+
"一個 :class:`dict` 實例。如果證書未被驗證,則該字典為空。若證書已被驗證,則返"
1540+
"回的字典將包含數個鍵值,包括 ``subject`` (證書所簽發的對象) 和 ``issuer`` (簽"
1541+
"發證書的主體)。如果證書中包含 *Subject Alternative Name* 擴充 (參考\\ :rfc:"
1542+
"`3280`\\ ),字典中還會有一個 ``subjectAltName`` 鍵。"
15241543

15251544
#:../../library/ssl.rst:1161
15261545
msgid""
@@ -1529,6 +1548,9 @@ msgid ""
15291548
"structure for the respective fields, and each RDN is a sequence of name-"
15301549
"value pairs. Here is a real-world example::"
15311550
msgstr""
1551+
"``subject`` 和 ``issuer`` 欄位欄位是包含相對識別名稱 (relative distinguished "
1552+
"names, RDNs) 序列的元組,這些 RDN 來自證書資料結構中的相應欄位。每個 RDN 都是"
1553+
"一組名稱與值的對。以下是現實中的範例::"
15321554

15331555
#:../../library/ssl.rst:1185
15341556
msgid""
@@ -1538,12 +1560,15 @@ msgid ""
15381560
"certificate. Whether the peer provides a certificate depends on the SSL "
15391561
"socket's role:"
15401562
msgstr""
1563+
"如果 ``binary_form`` 參數設定為 :const:`True`,且對端提供了證書,則該方法會"
1564+
"以 DER 編碼形式 將整個證書以位元組序列形式回傳。如果對端未提供證書,則返回 :"
1565+
"const:`None`。對端是否提供證書取決於 SSL socket 的腳色。"
15411566

15421567
#:../../library/ssl.rst:1191
15431568
msgid""
15441569
"for a client SSL socket, the server will always provide a certificate, "
15451570
"regardless of whether validation was required;"
1546-
msgstr""
1571+
msgstr"對於客戶端 SSL socket,伺服器將永遠提供證書,無論是否需要進行驗證。"
15471572

15481573
#:../../library/ssl.rst:1194
15491574
msgid""
@@ -1552,6 +1577,9 @@ msgid ""
15521577
"`None` if you used :const:`CERT_NONE` (rather than :const:`CERT_OPTIONAL` "
15531578
"or :const:`CERT_REQUIRED`)."
15541579
msgstr""
1580+
"對於伺服器 SSL socket,客戶端僅在伺服器要求時才會提供證書;因此,如果你使用的"
1581+
"是 :const:`CERT_NONE` (而非 :const:`CERT_OPTIONAL` 或 :const:"
1582+
"`CERT_REQUIRED`),則 :meth:`getpeercert` 會回傳 :const:`None`。"
15551583

15561584
#:../../library/ssl.rst:1199
15571585
msgid"See also :attr:`SSLContext.check_hostname`."

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp