|
5 | 5 | # |
6 | 6 | # Translators: |
7 | 7 | # Rafael Fontenelle <rffontenelle@gmail.com>, 2026 |
8 | | -# Freesand Leo <yuqinju@163.com>, 2026 |
9 | 8 | # Alpha Du <alphanow@gmail.com>, 2026 |
| 9 | +# Freesand Leo <yuqinju@163.com>, 2026 |
10 | 10 | # |
11 | 11 | #, fuzzy |
12 | 12 | msgid "" |
13 | 13 | msgstr "" |
14 | 14 | "Project-Id-Version: Python 3.14\n" |
15 | 15 | "Report-Msgid-Bugs-To: \n" |
16 | | -"POT-Creation-Date: 2026-10-23 18:56+0000\n" |
| 16 | +"POT-Creation-Date: 2026-10-25 18:12+0000\n" |
17 | 17 | "PO-Revision-Date: 2026-05-08 17:18+0000\n" |
18 | | -"Last-Translator: Alpha Du <alphanow@gmail.com>, 2026\n" |
| 18 | +"Last-Translator: Freesand Leo <yuqinju@163.com>, 2026\n" |
19 | 19 | "Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n" |
20 | 20 | "MIME-Version: 1.0\n" |
21 | 21 | "Content-Type: text/plain; charset=UTF-8\n" |
@@ -3091,6 +3091,22 @@ msgid "" |
3091 | 3091 | " return 'ClientId_1', psk_table.get(hint, b'')\n" |
3092 | 3092 | "context.set_psk_client_callback(callback)" |
3093 | 3093 | msgstr "" |
| 3094 | +"context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)\n" |
| 3095 | +"context.check_hostname = False\n" |
| 3096 | +"context.maximum_version = ssl.TLSVersion.TLSv1_2\n" |
| 3097 | +"context.set_ciphers('PSK')\n" |
| 3098 | +"\n" |
| 3099 | +"# A simple lambda:\n" |
| 3100 | +"psk = bytes.fromhex('c0ffee')\n" |
| 3101 | +"context.set_psk_client_callback(lambda hint: (None, psk))\n" |
| 3102 | +"\n" |
| 3103 | +"# A table using the hint from the server:\n" |
| 3104 | +"psk_table = { 'ServerId_1': bytes.fromhex('c0ffee'),\n" |
| 3105 | +" 'ServerId_2': bytes.fromhex('facade')\n" |
| 3106 | +"}\n" |
| 3107 | +"def callback(hint):\n" |
| 3108 | +" return 'ClientId_1', psk_table.get(hint, b'')\n" |
| 3109 | +"context.set_psk_client_callback(callback)" |
3094 | 3110 |
|
3095 | 3111 | #: ../../library/ssl.rst:2148 ../../library/ssl.rst:2205 |
3096 | 3112 | msgid "" |
@@ -3124,7 +3140,7 @@ msgstr "" |
3124 | 3140 |
|
3125 | 3141 | #: ../../library/ssl.rst:2175 |
3126 | 3142 | msgid "the ``identity_hint`` parameter is not sent to the client." |
3127 | | -msgstr "" |
| 3143 | +msgstr "``identity_hint`` 形参不会被发给客户端。" |
3128 | 3144 |
|
3129 | 3145 | #: ../../library/ssl.rst:2176 |
3130 | 3146 | msgid "" |
|
0 commit comments