From eb3a844faa369dcc98ccbdf19e4298e865f6e389 Mon Sep 17 00:00:00 2001 From: timmy0123 <48618505+timmy0123@users.noreply.github.com> Date: Wed, 3 Jan 2024 09:09:35 +0800 Subject: [PATCH] work on ssl (#785) * work on ssl * Apply suggestions from code review Co-authored-by: Wei-Hsiang (Matt) Wang --------- Co-authored-by: Wei-Hsiang (Matt) Wang --- library/ssl.po | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/library/ssl.po b/library/ssl.po index 5d9c73113c..f04e8d87a8 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: 2023-12-29 14:21+0800\n" +"PO-Revision-Date: 2024-01-02 10:14+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -314,8 +314,8 @@ msgid "" "occurred, such as ``SSL``, ``PEM`` or ``X509``. The range of possible " "values depends on the OpenSSL version." msgstr "" -"一個字串符號 (string mnemonic),用來指定發生錯誤的 OpenSSL 子模組,如:``SSL``、" -"``PEM`` 或 ``X509``。可能值的範圍取決於 OpenSSL 的版本。" +"一個字串符號 (string mnemonic),用來指定發生錯誤的 OpenSSL 子模組,如:" +"``SSL``、``PEM`` 或 ``X509``。可能值的範圍取決於 OpenSSL 的版本。" #: ../../library/ssl.rst:221 msgid "" @@ -323,8 +323,8 @@ msgid "" "``CERTIFICATE_VERIFY_FAILED``. The range of possible values depends on the " "OpenSSL version." msgstr "" -"一個字串符號,用來指定發生錯誤的原因,如:" -"``CERTIFICATE_VERIFY_FAILED``。可能值的範圍取決於 OpenSSL 的版本。" +"一個字串符號,用來指定發生錯誤的原因,如:``CERTIFICATE_VERIFY_FAILED``。可能" +"值的範圍取決於 OpenSSL 的版本。" #: ../../library/ssl.rst:229 msgid "" @@ -404,6 +404,10 @@ msgid "" "can be used to check the status of the PRNG and :func:`RAND_add` can be used " "to seed the PRNG." msgstr "" +"回傳 *num* 個加密性強的偽隨機位元組。如果 PRNG 未使用足夠的資料做為隨機種子 " +"(seed) 或是目前的 RAND 方法不支持該操作則會導致 :class:`SSLError` 錯誤。:" +"func:`RAND_status` 函式可以用來檢查 PRNG 函式,而 :func:`RAND_add` 則可以用來" +"為 PRNG 設定隨機種子。" #: ../../library/ssl.rst:303 msgid "For almost all applications :func:`os.urandom` is preferable." @@ -416,6 +420,9 @@ msgid "" "Cryptographically_secure_pseudorandom_number_generator>`_, to get the " "requirements of a cryptographically strong generator." msgstr "" +"請閱讀維基百科的\\ `密碼學安全偽隨機數產生器 (CSPRNG) `_\\ 文章來了解" +"密碼學安全偽隨機數產生器的需求。" #: ../../library/ssl.rst:314 msgid "" @@ -424,6 +431,9 @@ msgid "" "RAND_egd` and :func:`ssl.RAND_add` to increase the randomness of the pseudo-" "random number generator." msgstr "" +"如果 SSL 偽隨機數產生器已經使用「足夠的」隨機性進行隨機種子生成,則回傳 " +"``True`` ,否則回傳 ``False``。你可以使用 :func:`ssl.RAND_egd` 函式和 :func:" +"`ssl.RAND_add` 函式來增加偽隨機數產生器的隨機性。" #: ../../library/ssl.rst:321 msgid "" @@ -432,6 +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` 了解" +"有關熵源的更多資訊。" #: ../../library/ssl.rst:326 msgid "Writable :term:`bytes-like object` is now accepted." @@ -447,6 +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 語言區" +"域設定)。" #: ../../library/ssl.rst:343 msgid "Here's an example:"