Skip to content

Work on ssl #953

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 31 additions & 10 deletions library/ssl.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-08-04 00:03+0000\n"
"PO-Revision-Date: 2024-08-27 01:29+0800\n"
"PO-Revision-Date: 2024-08-28 00:43+0800\n"
"Last-Translator: Adrian Liaw <[email protected]>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
"tw)\n"
Expand Down Expand Up @@ -1196,8 +1196,7 @@ msgid ""
"sockets)."
msgstr ""
":func:`create_default_context` 和 :meth:`SSLContext.load_default_certs` 的選"
"項。此值表示該語境可能會用於驗證網頁伺服器 (因此它將用於建立用戶端 "
"socket)。"
"項。此值表示該語境可能會用於驗證網頁伺服器 (因此它將用於建立用戶端 socket)。"

#: ../../library/ssl.rst:976
msgid ""
Expand All @@ -1219,8 +1218,8 @@ msgid ""
":class:`enum.IntEnum` collection of SSL and TLS versions for :attr:"
"`SSLContext.maximum_version` and :attr:`SSLContext.minimum_version`."
msgstr ""
"用於 :attr:`SSLContext.maximum_version` 和 :attr:"
"`SSLContext.minimum_version` 的 SSL 和 TLS 版本 :class:`enum.IntEnum` 集合。"
"用於 :attr:`SSLContext.maximum_version` 和 :attr:`SSLContext."
"minimum_version` 的 SSL 和 TLS 版本 :class:`enum.IntEnum` 集合。"

#: ../../library/ssl.rst:999
msgid ""
Expand Down Expand Up @@ -1308,8 +1307,8 @@ msgid ""
":meth:`~socket.socket.recv()`, :meth:`~socket.socket.recv_into()` (but "
"passing a non-zero ``flags`` argument is not allowed)"
msgstr ""
":meth:`~socket.socket.recv()`、:meth:`~socket.socket.recv_into()` (但不允許傳"
"遞非零的 ``flags`` 引數)"
":meth:`~socket.socket.recv()`、:meth:`~socket.socket.recv_into()` (但不允許"
"傳遞非零的 ``flags`` 引數)"

#: ../../library/ssl.rst:1038
msgid ""
Expand Down Expand Up @@ -1339,8 +1338,8 @@ msgid ""
"on non-blocking sockets <ssl-nonblocking>`."
msgstr ""
"然而,由於 SSL(和 TLS)協定在 TCP 之上有自己的框架,因此在某些方面,SSL "
"sockets 的抽象可能會與普通操作系統級別的 sockets 規範有所不同。特別是請參"
"\\ :ref:`關於 non-blocking sockets 的說明 <ssl-nonblocking>`。"
"sockets 的抽象可能會與普通操作系統級別的 sockets 規範有所不同。特別是請參閱"
"\\ :ref:`關於 non-blocking sockets 的說明 <ssl-nonblocking>`。"

#: ../../library/ssl.rst:1049
msgid ""
Expand All @@ -1359,56 +1358,71 @@ msgid ""
"received or sent. The socket timeout is now the maximum total duration of "
"the shutdown."
msgstr ""
":meth:`shutdown` 不會在每次接收或發送位元組時重置 socket 超時時間。現在,"
"socket 超時時間是關閉操作的最大總持續時間。"

#: ../../library/ssl.rst:1060
msgid ""
"It is deprecated to create a :class:`SSLSocket` instance directly, use :meth:"
"`SSLContext.wrap_socket` to wrap a socket."
msgstr ""
"直接建立 :class:`SSLSocket` 實例的方式已被棄用,請使用 :meth:`SSLContext."
"wrap_socket` 來包裝 socket。"

#: ../../library/ssl.rst:1064
msgid ""
":class:`SSLSocket` instances must to created with :meth:`~SSLContext."
"wrap_socket`. In earlier versions, it was possible to create instances "
"directly. This was never documented or officially supported."
msgstr ""
":class:`SSLSocket` 實例必須使用 :meth:`~SSLContext.wrap_socket` 建立。在較早"
"的版本中可以直接建立實例,但這從未被記錄或正式支援。"

#: ../../library/ssl.rst:1070
msgid ""
"Python now uses ``SSL_read_ex`` and ``SSL_write_ex`` internally. The "
"functions support reading and writing of data larger than 2 GB. Writing zero-"
"length data no longer fails with a protocol violation error."
msgstr ""
"Python 現在內部使用了 ``SSL_read_ex`` 和 ``SSL_write_ex`` 函式。這些函式支援"
"讀取和寫入大於 2 GB 的資料。寫入零長度的資料不再會導致協定違規錯誤。"

#: ../../library/ssl.rst:1075
msgid "SSL sockets also have the following additional methods and attributes:"
msgstr ""
msgstr "SSL sockets 還具有以下附加方法和屬性:"

#: ../../library/ssl.rst:1079
msgid ""
"Read up to *len* bytes of data from the SSL socket and return the result as "
"a ``bytes`` instance. If *buffer* is specified, then read into the buffer "
"instead, and return the number of bytes read."
msgstr ""
"從 SSL socket 讀取 *len* 位元組的資料,並將結果以 ``bytes`` 實例的形式回傳。"
"如果指定了 *buffer*,則將資料讀入緩衝區,並回傳讀取的位元組。"

#: ../../library/ssl.rst:1083
msgid ""
"Raise :exc:`SSLWantReadError` or :exc:`SSLWantWriteError` if the socket is :"
"ref:`non-blocking <ssl-nonblocking>` and the read would block."
msgstr ""
"如果 socket 是\\ :ref:`非阻塞的 <ssl-nonblocking>`\\ 則會引發 :exc:"
"`SSLWantReadError` 或 :exc:`SSLWantWriteError` 並且讀取操作將會被阻塞。"

#: ../../library/ssl.rst:1086
msgid ""
"As at any time a re-negotiation is possible, a call to :meth:`read` can also "
"cause write operations."
msgstr ""
"由於在任何時刻都可能發生重新協商,呼叫 :meth:`read` 也可能觸發寫入操作。"

#: ../../library/ssl.rst:1089
msgid ""
"The socket timeout is no longer reset each time bytes are received or sent. "
"The socket timeout is now the maximum total duration to read up to *len* "
"bytes."
msgstr ""
"當接收或發送位元組時,socket 的超時時間將不再重置。現在,socket 超時時間是讀"
"取最多 *len* 位元組的總最大持續時間。"

#: ../../library/ssl.rst:1094
msgid "Use :meth:`~SSLSocket.recv` instead of :meth:`~SSLSocket.read`."
Expand All @@ -1419,24 +1433,31 @@ msgid ""
"Write *buf* to the SSL socket and return the number of bytes written. The "
"*buf* argument must be an object supporting the buffer interface."
msgstr ""
"將 *buf* 寫入 SSL socket 並回傳寫入的位元組數量。*buf* 引數必須是支援緩衝區介"
"面的物件。"

#: ../../library/ssl.rst:1102
msgid ""
"Raise :exc:`SSLWantReadError` or :exc:`SSLWantWriteError` if the socket is :"
"ref:`non-blocking <ssl-nonblocking>` and the write would block."
msgstr ""
"如果 socket 是\\ :ref:`非阻塞的 <ssl-nonblocking>`\\ 則會引發 :exc:"
"`SSLWantReadError` 或 :exc:`SSLWantWriteError` 並且寫入操作將會被阻塞。"

#: ../../library/ssl.rst:1105
msgid ""
"As at any time a re-negotiation is possible, a call to :meth:`write` can "
"also cause read operations."
msgstr ""
"由於在任何時刻都可能發生重新協商,呼叫 :meth:`write` 也可能觸發讀取操作。"

#: ../../library/ssl.rst:1108
msgid ""
"The socket timeout is no longer reset each time bytes are received or sent. "
"The socket timeout is now the maximum total duration to write *buf*."
msgstr ""
"當接收或發送位元組時,socket 的超時時間將不再重置。現在,socket 超時時間是寫"
"入 *buf* 的總最大持續時間。"

#: ../../library/ssl.rst:1112
msgid "Use :meth:`~SSLSocket.send` instead of :meth:`~SSLSocket.write`."
Expand Down