@@ -2381,6 +2381,12 @@ msgid ""
2381
2381
"the appropriate stdlib API. (Contributed by Christian Heimes in "
2382
2382
":issue:`19689`.)"
2383
2383
msgstr ""
2384
+ "新增的函数 :func:`~ssl.create_default_context` 提供了获取 :class:`~ssl.SSLContext` "
2385
+ "的标准方式,其设置旨在合理兼顾兼容性和安全性。 这些设置比 :class:`~ssl.SSLContext` "
2386
+ "构造器所提供的默认设置更为严格,如果最佳实践的安全要求发生变化,将来可能会对其进行调整,而不预先提示弃用。 对于使用支持 SSL 的 stdlib "
2387
+ "库来新推荐的最佳实践是使用 :func:`~ssl.create_default_context` 来获取 "
2388
+ ":class:`~ssl.SSLContext` 对象,必要时对其进行修改,然后将其作为相应 stdlib API 的 *contex* 参数传入。 "
2389
+ "(由 Christian Heimes 在 :issue:`19689` 中贡献。)"
2384
2390
2385
2391
#: ../../whatsnew/3.4.rst:1441
2386
2392
msgid ""
@@ -2390,6 +2396,9 @@ msgid ""
2390
2396
"certificates directly via strings or bytes, respectively. (Contributed by "
2391
2397
"Christian Heimes in :issue:`18138`.)"
2392
2398
msgstr ""
2399
+ ":class:`~ssl.SSLContext` 方法 :meth:`~ssl.SSLContext.load_verify_locations` "
2400
+ "接受新增的可选参数 *cadata*,它可被来分别通过字符串或字节串来直接提供 PEM 或 DER 编码的证书。 (由 Christian Heimes"
2401
+ " 在 :issue:`18138` 中贡献。)"
2393
2402
2394
2403
#: ../../whatsnew/3.4.rst:1446
2395
2404
msgid ""
@@ -2400,6 +2409,10 @@ msgid ""
2400
2409
"debugging default verification issues. (Contributed by Christian Heimes in "
2401
2410
":issue:`18143`.)"
2402
2411
msgstr ""
2412
+ "新增的函数 :func:`~ssl.get_default_verify_paths` 可返回一个由路径和环境变量组成的具名元组, 供 "
2413
+ ":meth:`~ssl.SSLContext.set_default_verify_paths` 方法用来设置 OpenSSL 的默认 "
2414
+ "``cafile`` 和``capath``。 这有助于对默认的验证问题进行调试。 (由 Christian Heimes 在 "
2415
+ ":issue:`18143` 中贡献。)"
2403
2416
2404
2417
#: ../../whatsnew/3.4.rst:1453
2405
2418
msgid ""
0 commit comments