@@ -3126,6 +3126,9 @@ msgid ""
31263126"instance, while the *outgoing* BIO is used to pass data the other way "
31273127"around."
31283128msgstr ""
3129+ "这个类没有公有构造器。 :class:`SSLObject` 实例必须使用 :meth:`~SSLContext.wrap_bio` 方法来创建。 "
3130+ "此方法将创建 :class:`SSLObject` 实例并将其绑定到一个 BIO 对。 其中 *incoming* BIO 用来将数据从 Python "
3131+ "传递到 SSL 协议实例,而 *outgoing* BIO 用来进行数据反向传递。"
31293132
31303133#: ../../library/ssl.rst:2479
31313134msgid "The following methods are available:"
@@ -3211,43 +3214,49 @@ msgstr ":meth:`~SSLSocket.version`"
32113214msgid ""
32123215"When compared to :class:`SSLSocket`, this object lacks the following "
32133216"features:"
3214- msgstr ""
3217+ msgstr "与 :class:`SSLSocket` 相比,此对象缺少下列特性: "
32153218
32163219#: ../../library/ssl.rst:2504
32173220msgid ""
32183221"Any form of network IO; ``recv()`` and ``send()`` read and write only to the"
32193222" underlying :class:`MemoryBIO` buffers."
32203223msgstr ""
3224+ "任何形式的网络 IO; ``recv()`` 和 ``send()`` 仅对下层的 :class:`MemoryBIO` 缓冲区执行读取和写入。"
32213225
32223226#: ../../library/ssl.rst:2507
32233227msgid ""
32243228"There is no *do_handshake_on_connect* machinery. You must always manually "
32253229"call :meth:`~SSLSocket.do_handshake` to start the handshake."
32263230msgstr ""
3231+ "不存在 *do_handshake_on_connect* 机制。 你必须总是手动调用 :meth:`~SSLSocket.do_handshake` "
3232+ "来开始握手操作。"
32273233
32283234#: ../../library/ssl.rst:2510
32293235msgid ""
32303236"There is no handling of *suppress_ragged_eofs*. All end-of-file conditions "
32313237"that are in violation of the protocol are reported via the "
32323238":exc:`SSLEOFError` exception."
32333239msgstr ""
3240+ "不存在对 *suppress_ragged_eofs* 的处理。 所有违反协议的文件结束条件将通过 :exc:`SSLEOFError` 异常来报告。"
32343241
32353242#: ../../library/ssl.rst:2514
32363243msgid ""
32373244"The method :meth:`~SSLSocket.unwrap` call does not return anything, unlike "
32383245"for an SSL socket where it returns the underlying socket."
3239- msgstr ""
3246+ msgstr "方法 :meth:`~SSLSocket.unwrap` 的调用不返回任何东西,不会如 SSL 套接字那样返回下层的套接字。 "
32403247
32413248#: ../../library/ssl.rst:2517
32423249msgid ""
32433250"The *server_name_callback* callback passed to "
32443251":meth:`SSLContext.set_servername_callback` will get an :class:`SSLObject` "
32453252"instance instead of a :class:`SSLSocket` instance as its first parameter."
32463253msgstr ""
3254+ "*server_name_callback* 回调被传给 :meth:`SSLContext.set_servername_callback` "
3255+ "时将获得一个 :class:`SSLObject` 实例而非 :class:`SSLSocket` 实例作为其第一个形参。"
32473256
32483257#: ../../library/ssl.rst:2521
32493258msgid "Some notes related to the use of :class:`SSLObject`:"
3250- msgstr ""
3259+ msgstr "有关 :class:`SSLObject` 用法的一些说明: "
32513260
32523261#: ../../library/ssl.rst:2523
32533262msgid ""
@@ -3256,43 +3265,52 @@ msgid ""
32563265":exc:`SSLWantReadError` if it needs more data than the incoming BIO has "
32573266"available."
32583267msgstr ""
3268+ "在 :class:`SSLObject` 上的所有 IO 都是 :ref:`非阻塞的 <ssl-nonblocking>`。 这意味着例如 "
3269+ ":meth:`~SSLSocket.read` 在其需要比 incoming BIO 可用的更多数据时将会引发 "
3270+ ":exc:`SSLWantReadError`。"
32593271
32603272#: ../../library/ssl.rst:2528
32613273msgid ""
32623274"There is no module-level ``wrap_bio()`` call like there is for "
32633275":meth:`~SSLContext.wrap_socket`. An :class:`SSLObject` is always created via"
32643276" an :class:`SSLContext`."
32653277msgstr ""
3278+ "不存在模块层级的 ``wrap_bio()`` 调用,就像 :meth:`~SSLContext.wrap_socket` 那样。 "
3279+ ":class:`SSLObject` 总是通过 :class:`SSLContext` 来创建。"
32663280
32673281#: ../../library/ssl.rst:2532
32683282msgid ""
32693283":class:`SSLObject` instances must to created with "
32703284":meth:`~SSLContext.wrap_bio`. In earlier versions, it was possible to create"
32713285" instances directly. This was never documented or officially supported."
32723286msgstr ""
3287+ ":class:`SSLObject` 的实例必须使用 :meth:`~SSLContext.wrap_bio` 来创建。 "
3288+ "在较早的版本中,直接创建实例是可能的。 但这从未被记入文档或是被正式支持。"
32733289
32743290#: ../../library/ssl.rst:2538
32753291msgid ""
32763292"An SSLObject communicates with the outside world using memory buffers. The "
32773293"class :class:`MemoryBIO` provides a memory buffer that can be used for this "
32783294"purpose. It wraps an OpenSSL memory BIO (Basic IO) object:"
32793295msgstr ""
3296+ "SSLObject 会使用内存缓冲区与外部世界通信。 :class:`MemoryBIO` 类提供了可被用于此目的的内存缓冲区。 它包装了一个 "
3297+ "OpenSSL 内存 BIO (Basic IO) 对象:"
32803298
32813299#: ../../library/ssl.rst:2544
32823300msgid ""
32833301"A memory buffer that can be used to pass data between Python and an SSL "
32843302"protocol instance."
3285- msgstr ""
3303+ msgstr "一个可被用来在 Python 和 SSL 协议实例之间传递数据的内存缓冲区。 "
32863304
32873305#: ../../library/ssl.rst:2549
32883306msgid "Return the number of bytes currently in the memory buffer."
3289- msgstr ""
3307+ msgstr "返回当前存在于内存缓冲区的字节数。 "
32903308
32913309#: ../../library/ssl.rst:2553
32923310msgid ""
32933311"A boolean indicating whether the memory BIO is current at the end-of-file "
32943312"position."
3295- msgstr ""
3313+ msgstr "一个表明内存 BIO 目前是否位于文件末尾的布尔值。 "
32963314
32973315#: ../../library/ssl.rst:2558
32983316msgid ""
0 commit comments