From 27b1e6c4c2b38c4cd4584a86093edfdcf97939bc Mon Sep 17 00:00:00 2001 From: timmy0123 <48618505+timmy0123@users.noreply.github.com> Date: Thu, 4 Jan 2024 16:39:21 +0800 Subject: [PATCH] work on ssl (#786) * work on ssl * update commit * update commit * Apply suggestions from code review Co-authored-by: Wei-Hsiang (Matt) Wang * update commit * update commit * Update library/ssl.po Co-authored-by: Wei-Hsiang (Matt) Wang --------- Co-authored-by: Wei-Hsiang (Matt) Wang --- library/ssl.po | 53 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 18 deletions(-) diff --git a/library/ssl.po b/library/ssl.po index f04e8d87a8..5f5d13a377 100644 --- a/library/ssl.po +++ b/library/ssl.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-12-21 18:18+0000\n" -"PO-Revision-Date: 2024-01-02 10:14+0800\n" +"PO-Revision-Date: 2024-01-04 14:19+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -185,7 +185,7 @@ msgid "" "constructor directly." msgstr "" "回傳一個新的 :class:`SSLContext` 物件,使用給定 *purpose* 的預設值。這些設定" -"是由 :mod:`ssl` 選擇,通常比直接使用 :class:`SSLContext` 有更高的安全性。" +"是由 :mod:`ssl` 選擇,通常比直接呼叫 :class:`SSLContext` 有更高的安全性。" #: ../../library/ssl.rst:133 msgid "" @@ -264,15 +264,15 @@ msgstr "" #: ../../library/ssl.rst:177 msgid "RC4 was dropped from the default cipher string." -msgstr "把 RC4 從預設密碼中捨棄。" +msgstr "把 RC4 從預設密碼字串中捨棄。" #: ../../library/ssl.rst:181 msgid "ChaCha20/Poly1305 was added to the default cipher string." -msgstr "把 ChaCha20/Poly1305 加入預設密碼。" +msgstr "把 ChaCha20/Poly1305 加入預設密碼字串。" #: ../../library/ssl.rst:183 msgid "3DES was dropped from the default cipher string." -msgstr "把 3DES 從預設密碼中捨棄。" +msgstr "把 3DES 從預設密碼字串中捨棄。" #: ../../library/ssl.rst:187 msgid "Support for key logging to :envvar:`SSLKEYLOGFILE` was added." @@ -420,9 +420,9 @@ msgid "" "Cryptographically_secure_pseudorandom_number_generator>`_, to get the " "requirements of a cryptographically strong generator." msgstr "" -"請閱讀維基百科的\\ `密碼學安全偽隨機數產生器 (CSPRNG) `_\\ 文章來了解" -"密碼學安全偽隨機數產生器的需求。" +"請閱讀維基百科的\\ `密碼學安全偽隨機數產生器 (CSPRNG) `_\\ 文章來了" +"解密碼學安全偽隨機數產生器的需求。" #: ../../library/ssl.rst:314 msgid "" @@ -442,9 +442,9 @@ msgid "" "string (so you can always use ``0.0``). See :rfc:`1750` for more " "information on sources of entropy." msgstr "" -"將給定的 *bytes* 混進 SSL 隨機偽隨機數產生器中。 *entropy* 參數(float 值)是指" -"字符串中包含熵值的下限(因此你可以將其設為 ``0.0``\\ )。請參閱 :rfc:`1750` 了解" -"有關熵源的更多資訊。" +"將給定的 *bytes* 混進 SSL 隨機偽隨機數產生器中。 *entropy* 參數(float 值)是" +"指字串中包含熵值的下限(因此你可以將其設為 ``0.0``\\ )。請參閱 :rfc:`1750` " +"了解有關熵源的更多資訊。" #: ../../library/ssl.rst:326 msgid "Writable :term:`bytes-like object` is now accepted." @@ -460,9 +460,9 @@ msgid "" "representing the \"notBefore\" or \"notAfter\" date from a certificate in " "``\"%b %d %H:%M:%S %Y %Z\"`` strptime format (C locale)." msgstr "" -"回傳自紀元以來的秒數,給定的 ``cert_time`` 字串表示證書的 \"notBefore\" 或 " -"\"notAfter\" 日期,字串採用 ``\"%b %d %H:%M:%S %Y %Z\"`` 格式(C 語言區" -"域設定)。" +"回傳自紀元以來的秒數,給定的 ``cert_time`` 字串表示憑證的 \"notBefore\" 或 " +"\"notAfter\" 日期,字串採用 ``\"%b %d %H:%M:%S %Y %Z\"`` 格式(C 語言區域設" +"定)。" #: ../../library/ssl.rst:343 msgid "Here's an example:" @@ -478,6 +478,8 @@ msgid "" "the input string. Local timezone was used previously. Return an integer (no " "fractions of a second in the input format)" msgstr "" +"將輸入的時間直譯為 UTC 時間,如輸入字串中指定的 'GMT' 時區。在之前是使用本地" +"的時區。回傳一個整數(在輸入格式中不包括秒的小數部分)。" #: ../../library/ssl.rst:366 msgid "" @@ -492,6 +494,13 @@ msgid "" "validation attempt fails. A timeout can be specified with the ``timeout`` " "parameter." msgstr "" +"輸入使用 SSL 保護的伺服器的地址 ``addr``,輸入形式為一個 pair (*hostname*, " +"*port-number*),獲取該伺服器的憑證,並以 PEM 編碼字串的形式回傳。如果指定了" +"``ssl_version``,則使用指定的 SSL 協議來嘗試與伺服器連線。如果指定 " +"*ca_certs*,則它應該是一個包含根憑證列表的檔案,並與 :meth:`SSLContext." +"load_verify_locations` 中的參數 *cafile* 所使用的格式相同。此呼叫將嘗試使用該" +"組根憑證對伺服器憑證進行驗證,如果驗證失敗,呼叫將失敗。可以使用 ``timeout`` " +"參數指定超時時間。" #: ../../library/ssl.rst:377 msgid "This function is now IPv6-compatible." @@ -502,6 +511,8 @@ msgid "" "The default *ssl_version* is changed from :data:`PROTOCOL_SSLv3` to :data:" "`PROTOCOL_TLS` for maximum compatibility with modern servers." msgstr "" +"預設的 *ssl_version* 已經從 :data:`PROTOCOL_SSLv3` 改為 :data:" +"`PROTOCOL_TLS`,已確保與現今的伺服器有最大的相容性。" #: ../../library/ssl.rst:384 msgid "The *timeout* parameter was added." @@ -512,12 +523,15 @@ msgid "" "Given a certificate as a DER-encoded blob of bytes, returns a PEM-encoded " "string version of the same certificate." msgstr "" +"給定一個以 DER 編碼的位元組 blob 作為憑證,回傳以 PEM 編碼字串版本的相同憑" +"證。" #: ../../library/ssl.rst:394 msgid "" "Given a certificate as an ASCII PEM string, returns a DER-encoded sequence " "of bytes for that same certificate." msgstr "" +"給定一個以 ASCII PEM 的字串作為憑證,回傳以 DER 編碼的位元組序列的相同憑證。" #: ../../library/ssl.rst:399 msgid "" @@ -525,24 +539,27 @@ msgid "" "paths are the same as used by :meth:`SSLContext.set_default_verify_paths`. " "The return value is a :term:`named tuple` ``DefaultVerifyPaths``:" msgstr "" +"回傳一個具有 OpenSSL 的預設 cafile 和 capath 路徑的附名元組。這些路徑與 :" +"meth:`SSLContext.set_default_verify_paths` 使用的相同。回傳值是一個 :term:" +"`named tuple` ``DefaultVerifyPaths``:" #: ../../library/ssl.rst:404 msgid "" ":attr:`cafile` - resolved path to cafile or ``None`` if the file doesn't " "exist," -msgstr "" +msgstr ":attr:`cafile` - 解析後的 cafile 路徑,如果檔案不存在則為 ``None``," #: ../../library/ssl.rst:405 msgid "" ":attr:`capath` - resolved path to capath or ``None`` if the directory " "doesn't exist," -msgstr "" +msgstr ":attr:`capath` - 解析後的 capath 路徑,如果目錄不存在則為 ``None``," #: ../../library/ssl.rst:406 msgid "" ":attr:`openssl_cafile_env` - OpenSSL's environment key that points to a " "cafile," -msgstr "" +msgstr ":attr:`openssl_cafile_env` - 指向 cafile 的 OpenSSL 環境密鑰," #: ../../library/ssl.rst:407 msgid ":attr:`openssl_cafile` - hard coded path to a cafile," @@ -552,7 +569,7 @@ msgstr ":attr:`openssl_cafile` - hard coded 的 cafile 路徑," msgid "" ":attr:`openssl_capath_env` - OpenSSL's environment key that points to a " "capath," -msgstr "" +msgstr ":attr:`openssl_capath_env` - 指向 capath 的 OpenSSL 環境密鑰," #: ../../library/ssl.rst:409 msgid ":attr:`openssl_capath` - hard coded path to a capath directory"