-
-
Notifications
You must be signed in to change notification settings - Fork 224
Expand file tree
/
Copy pathssl.po
More file actions
4160 lines (3613 loc) · 158 KB
/
ssl.po
File metadata and controls
4160 lines (3613 loc) · 158 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright (C) 2001 Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: Python 3.14\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-10 16:45+0000\n"
"PO-Revision-Date: 2024-08-28 00:43+0800\n"
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
"tw)\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 3.4.4\n"
#: ../../library/ssl.rst:2
msgid ":mod:`!ssl` --- TLS/SSL wrapper for socket objects"
msgstr ":mod:`!ssl` --- socket 物件的 TLS/SSL 包裝器"
#: ../../library/ssl.rst:10
msgid "**Source code:** :source:`Lib/ssl.py`"
msgstr "**原始碼:**\\ :source:`Lib/ssl.py`"
#: ../../library/ssl.rst:18
msgid ""
"This module provides access to Transport Layer Security (often known as "
"\"Secure Sockets Layer\") encryption and peer authentication facilities for "
"network sockets, both client-side and server-side. This module uses the "
"OpenSSL library."
msgstr ""
"這個模組向用戶端及伺服器端提供了對於網路 socket 的傳輸層安全性協定(或稱為"
"「安全通訊協定 (Secure Sockets Layer)」)加密及身分驗證功能。這個模組使用 "
"OpenSSL 套件。"
#: ../../includes/optional-module.rst:1
msgid ""
"This is an :term:`optional module`. If it is missing from your copy of "
"CPython, look for documentation from your distributor (that is, whoever "
"provided Python to you). If you are the distributor, see :ref:`optional-"
"module-requirements`."
msgstr ""
#: ../../library/ssl.rst:27
msgid ""
"Some behavior may be platform dependent, since calls are made to the "
"operating system socket APIs. The installed version of OpenSSL may also "
"cause variations in behavior. For example, TLSv1.3 comes with OpenSSL "
"version 1.1.1."
msgstr ""
"由於呼叫了作業系統的 socket APIs,有些行為會根據平台而有所不同。OpenSSL 的安"
"裝版本也會對模組的運作產生影響。例如,OpenSSL 版本 1.1.1 附帶 TLSv1.3。"
#: ../../library/ssl.rst:33
msgid ""
"Don't use this module without reading the :ref:`ssl-security`. Doing so may "
"lead to a false sense of security, as the default settings of the ssl module "
"are not necessarily appropriate for your application."
msgstr ""
"在使用此模組之前,請閱讀 :ref:`ssl-security`。如果不這樣做,可能會產生錯誤的"
"安全性認知,因為 ssl 模組的預設設定未必適合你的應用程式。"
#: ../../library/ssl.rst:456 ../../library/ssl.rst:471
#: ../../includes/wasm-notavail.rst:3
msgid "Availability"
msgstr "可用性"
#: ../../includes/wasm-notavail.rst:5
msgid ""
"This module does not work or is not available on WebAssembly. See :ref:`wasm-"
"availability` for more information."
msgstr ""
"此模組在 WebAssembly 平台上不起作用或無法使用。更多資訊請參閱 :ref:`wasm-"
"availability`。"
#: ../../library/ssl.rst:39
msgid ""
"This section documents the objects and functions in the ``ssl`` module; for "
"more general information about TLS, SSL, and certificates, the reader is "
"referred to the documents in the \"See Also\" section at the bottom."
msgstr ""
"這個章節記錄了 ``ssl`` 模組的物件及函式;關於 TSL、SSL、以及憑證的更多資訊,"
"可以去參考此章節底部的「詳情」部分。"
#: ../../library/ssl.rst:43
msgid ""
"This module provides a class, :class:`ssl.SSLSocket`, which is derived from "
"the :class:`socket.socket` type, and provides a socket-like wrapper that "
"also encrypts and decrypts the data going over the socket with SSL. It "
"supports additional methods such as :meth:`getpeercert`, which retrieves the "
"certificate of the other side of the connection, :meth:`cipher`, which "
"retrieves the cipher being used for the secure connection or :meth:"
"`get_verified_chain`, :meth:`get_unverified_chain` which retrieves "
"certificate chain."
msgstr ""
"此模組提供了一個 :class:`ssl.SSLSocket` 類別,它是從 :class:`socket.socket` "
"衍生出來的,並且提供類似 socket 的包裝器,讓使用 SSL 進行資料傳輸時,可以進行"
"資料的加密及解密。它也提供了一些額外的方法,如 :meth:`getpeercert`,用於取得"
"連結另一端的憑證;以及 :meth:`cipher`,用於搜尋用於安全連接的加密方法 "
"(cipher);和 :meth:`get_verified_chain`、:meth:`get_unverified_chain` 能用於"
"取得憑證鏈。"
#: ../../library/ssl.rst:52
msgid ""
"For more sophisticated applications, the :class:`ssl.SSLContext` class helps "
"manage settings and certificates, which can then be inherited by SSL sockets "
"created through the :meth:`SSLContext.wrap_socket` method."
msgstr ""
"對於更複雜的應用程式,:class:`ssl.SSLContext` 類別有助於管理設定及認證,然後"
"可以透過 :meth:`SSLContext.wrap_socket` 方法建立的 SSL socket 繼承這些設定和"
"認證。"
#: ../../library/ssl.rst:56
msgid "Updated to support linking with OpenSSL 1.1.0"
msgstr "更新以支援與 OpenSSL 1.1.0 進行連結"
#: ../../library/ssl.rst:61
msgid ""
"OpenSSL 0.9.8, 1.0.0 and 1.0.1 are deprecated and no longer supported. In "
"the future the ssl module will require at least OpenSSL 1.0.2 or 1.1.0."
msgstr ""
"OpenSSL 0.9.8, 1.0.0 及 1.0.1 版本已被棄用且不再支援。在未來 ssl 模組將需要至"
"少 OpenSSL 1.0.2 版本或 1.1.0 版本。"
#: ../../library/ssl.rst:67
msgid ""
":pep:`644` has been implemented. The ssl module requires OpenSSL 1.1.1 or "
"newer."
msgstr ":pep:`644` 已經被實作。ssl 模組需要 OpenSSL 1.1.1 以上的版本才能使用。"
#: ../../library/ssl.rst:70
msgid ""
"Use of deprecated constants and functions result in deprecation warnings."
msgstr "使用已經被棄用的常數或函式將會導致棄用警示。"
#: ../../library/ssl.rst:74
msgid "Functions, Constants, and Exceptions"
msgstr "函式、常數與例外"
#: ../../library/ssl.rst:78
msgid "Socket creation"
msgstr "Socket 建立"
#: ../../library/ssl.rst:80
msgid ""
"Instances of :class:`SSLSocket` must be created using the :meth:`SSLContext."
"wrap_socket` method. The helper function :func:`create_default_context` "
"returns a new context with secure default settings."
msgstr ""
":class:`SSLSocket` 實例必須使用 :meth:`SSLContext.wrap_socket` 方法來建立。輔"
"助函式 :func:`create_default_context` 會回傳有安全預設設定的新語境 "
"(context)。"
#: ../../library/ssl.rst:85
msgid "Client socket example with default context and IPv4/IPv6 dual stack::"
msgstr "使用預設語境及 IPv4/IPv6 雙協定堆疊的用戶端 socket 範例: ::"
#: ../../library/ssl.rst:87
msgid ""
"import socket\n"
"import ssl\n"
"\n"
"hostname = 'www.python.org'\n"
"context = ssl.create_default_context()\n"
"\n"
"with socket.create_connection((hostname, 443)) as sock:\n"
" with context.wrap_socket(sock, server_hostname=hostname) as ssock:\n"
" print(ssock.version())"
msgstr ""
"import socket\n"
"import ssl\n"
"\n"
"hostname = 'www.python.org'\n"
"context = ssl.create_default_context()\n"
"\n"
"with socket.create_connection((hostname, 443)) as sock:\n"
" with context.wrap_socket(sock, server_hostname=hostname) as ssock:\n"
" print(ssock.version())"
#: ../../library/ssl.rst:98
msgid "Client socket example with custom context and IPv4::"
msgstr "使用自訂語境及 IPv4 的用戶端 socket範例: ::"
#: ../../library/ssl.rst:100
msgid ""
"hostname = 'www.python.org'\n"
"# PROTOCOL_TLS_CLIENT requires valid cert chain and hostname\n"
"context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)\n"
"context.load_verify_locations('path/to/cabundle.pem')\n"
"\n"
"with socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) as sock:\n"
" with context.wrap_socket(sock, server_hostname=hostname) as ssock:\n"
" print(ssock.version())"
msgstr ""
#: ../../library/ssl.rst:110
msgid "Server socket example listening on localhost IPv4::"
msgstr "在本地 IPv4 上監聽伺服器 socket 的範例: ::"
#: ../../library/ssl.rst:112
msgid ""
"context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)\n"
"context.load_cert_chain('/path/to/certchain.pem', '/path/to/private.key')\n"
"\n"
"with socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) as sock:\n"
" sock.bind(('127.0.0.1', 8443))\n"
" sock.listen(5)\n"
" with context.wrap_socket(sock, server_side=True) as ssock:\n"
" conn, addr = ssock.accept()\n"
" ..."
msgstr ""
"context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)\n"
"context.load_cert_chain('/path/to/certchain.pem', '/path/to/private.key')\n"
"\n"
"with socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) as sock:\n"
" sock.bind(('127.0.0.1', 8443))\n"
" sock.listen(5)\n"
" with context.wrap_socket(sock, server_side=True) as ssock:\n"
" conn, addr = ssock.accept()\n"
" ..."
#: ../../library/ssl.rst:124
msgid "Context creation"
msgstr "語境建立"
#: ../../library/ssl.rst:126
msgid ""
"A convenience function helps create :class:`SSLContext` objects for common "
"purposes."
msgstr "一個可以幫忙建立出 :class:`SSLContext` 物件以用於一般目的的方便函式。"
#: ../../library/ssl.rst:132
msgid ""
"Return a new :class:`SSLContext` object with default settings for the given "
"*purpose*. The settings are chosen by the :mod:`ssl` module, and usually "
"represent a higher security level than when calling the :class:`SSLContext` "
"constructor directly."
msgstr ""
"回傳一個新的 :class:`SSLContext` 物件,使用給定 *purpose* 的預設值。這些設定"
"是由 :mod:`ssl` 選擇,通常比直接呼叫 :class:`SSLContext` 有更高的安全性。"
#: ../../library/ssl.rst:137
msgid ""
"*cafile*, *capath*, *cadata* represent optional CA certificates to trust for "
"certificate verification, as in :meth:`SSLContext.load_verify_locations`. "
"If all three are :const:`None`, this function can choose to trust the "
"system's default CA certificates instead."
msgstr ""
"*cafile*, *capath*, *cadata* 是用來選擇用於憑證認證的 CA 憑證,就像 :meth:"
"`SSLContext.load_verify_locations` 一樣。如果三個值都是 :const:`None`,此函式"
"會自動選擇系統預設的 CA 憑證。"
# Skylull: `high encryption cipher` 可能是指 https://superuser.com/questions/1751902/how-to-check-which-ciphers-are-included-in-high-ciphers-constant
# 其文中表示可能是指 128bit 以上 key length 的加密算法,需要其他來源佐證。
# 或是 https://help.fortinet.com/fweb/582/Content/FortiWeb/fortiweb-admin/supported_cipher_suites.htm#ssl_414712646_1189301
#: ../../library/ssl.rst:143
msgid ""
"The settings are: :data:`PROTOCOL_TLS_CLIENT` or :data:"
"`PROTOCOL_TLS_SERVER`, :data:`OP_NO_SSLv2`, and :data:`OP_NO_SSLv3` with "
"high encryption cipher suites without RC4 and without unauthenticated cipher "
"suites. Passing :const:`~Purpose.SERVER_AUTH` as *purpose* sets :data:"
"`~SSLContext.verify_mode` to :data:`CERT_REQUIRED` and either loads CA "
"certificates (when at least one of *cafile*, *capath* or *cadata* is given) "
"or uses :meth:`SSLContext.load_default_certs` to load default CA "
"certificates."
msgstr ""
"這些設定包含::data:`PROTOCOL_TLS_CLIENT` 或 :data:`PROTOCOL_TLS_SERVER`、:"
"data:`OP_NO_SSLv2`、以及 :data:`OP_NO_SSLv3`,使用高等加密套件但不包含 RC4 和"
"未經身份驗證的加密套件。如果將 *purpose* 設定為 :const:`~Purpose."
"SERVER_AUTH`,則會把 :data:`~SSLContext.verify_mode` 設為 :data:"
"`CERT_REQUIRED` 並使用設定的 CA 憑證(當 *cafile*、*capath* 或 *cadata* 其中一"
"個值有被設定時) 或使用預設的 CA 憑證 :meth:`SSLContext."
"load_default_certs` 。"
#: ../../library/ssl.rst:152
msgid ""
"When :attr:`~SSLContext.keylog_filename` is supported and the environment "
"variable :envvar:`SSLKEYLOGFILE` is set, :func:`create_default_context` "
"enables key logging."
msgstr ""
"當系統有支援 :attr:`~SSLContext.keylog_filename` 並且有設定環境變數 :envvar:"
"`SSLKEYLOGFILE` 時 :func:`create_default_context` 會啟用密鑰日誌記錄 "
"(logging)。"
#: ../../library/ssl.rst:156
msgid ""
"The default settings for this context include :data:"
"`VERIFY_X509_PARTIAL_CHAIN` and :data:`VERIFY_X509_STRICT`. These make the "
"underlying OpenSSL implementation behave more like a conforming "
"implementation of :rfc:`5280`, in exchange for a small amount of "
"incompatibility with older X.509 certificates."
msgstr ""
#: ../../library/ssl.rst:163
msgid ""
"The protocol, options, cipher and other settings may change to more "
"restrictive values anytime without prior deprecation. The values represent "
"a fair balance between compatibility and security."
msgstr ""
"協定、選項、加密方式和其它設定可以在不捨棄舊值的情況下直接更改成新的值,這些"
"值代表了在相容性和安全性之間取得的合理平衡。"
#: ../../library/ssl.rst:167
msgid ""
"If your application needs specific settings, you should create a :class:"
"`SSLContext` and apply the settings yourself."
msgstr ""
"如果你的應用程式需要特殊的設定,你應該要自行建立一個 :class:`SSLContext` 並自"
"行調整設定。"
#: ../../library/ssl.rst:171
msgid ""
"If you find that when certain older clients or servers attempt to connect "
"with a :class:`SSLContext` created by this function that they get an error "
"stating \"Protocol or cipher suite mismatch\", it may be that they only "
"support SSL3.0 which this function excludes using the :data:`OP_NO_SSLv3`. "
"SSL3.0 is widely considered to be `completely broken <https://en.wikipedia."
"org/wiki/POODLE>`_. If you still wish to continue to use this function but "
"still allow SSL 3.0 connections you can re-enable them using::"
msgstr ""
"如果你發現某些舊的用戶端或伺服器常適用此函式建立的 :class:`SSLContext` 連線"
"時,收到 \"Protocol or cipher suite mismatch\" 錯誤,這可能是因為他們的系統僅"
"支援 SSL3.0,然而 SSL3.0 已被此函式用 :data:`OP_NO_SSLv3` 排除。目前廣泛認為 "
"SSL3.0 已經\\ `被完全破解 <https://en.wikipedia.org/wiki/POODLE>`_。如果你仍"
"然希望在允許 SSL3.0 連線的情況下使用此函式,可以使用下面的方法: ::"
#: ../../library/ssl.rst:180
msgid ""
"ctx = ssl.create_default_context(Purpose.CLIENT_AUTH)\n"
"ctx.options &= ~ssl.OP_NO_SSLv3"
msgstr ""
"ctx = ssl.create_default_context(Purpose.CLIENT_AUTH)\n"
"ctx.options &= ~ssl.OP_NO_SSLv3"
#: ../../library/ssl.rst:184
msgid ""
"This context enables :data:`VERIFY_X509_STRICT` by default, which may reject "
"pre-:rfc:`5280` or malformed certificates that the underlying OpenSSL "
"implementation otherwise would accept. While disabling this is not "
"recommended, you can do so using::"
msgstr ""
#: ../../library/ssl.rst:189
msgid ""
"ctx = ssl.create_default_context()\n"
"ctx.verify_flags &= ~ssl.VERIFY_X509_STRICT"
msgstr ""
"ctx = ssl.create_default_context()\n"
"ctx.verify_flags &= ~ssl.VERIFY_X509_STRICT"
#: ../../library/ssl.rst:196
msgid "RC4 was dropped from the default cipher string."
msgstr "把 RC4 從預設加密方法字串中捨棄。"
#: ../../library/ssl.rst:200
msgid "ChaCha20/Poly1305 was added to the default cipher string."
msgstr "把 ChaCha20/Poly1305 加入預設加密方法字串。"
#: ../../library/ssl.rst:202
msgid "3DES was dropped from the default cipher string."
msgstr "把 3DES 從預設加密方法字串中捨棄。"
#: ../../library/ssl.rst:206
msgid "Support for key logging to :envvar:`SSLKEYLOGFILE` was added."
msgstr "增加了 :envvar:`SSLKEYLOGFILE` 對密鑰日誌記錄 (logging) 的支援。"
#: ../../library/ssl.rst:210
msgid ""
"The context now uses :data:`PROTOCOL_TLS_CLIENT` or :data:"
"`PROTOCOL_TLS_SERVER` protocol instead of generic :data:`PROTOCOL_TLS`."
msgstr ""
"目前語境使用 :data:`PROTOCOL_TLS_CLIENT` 協定或 :data:`PROTOCOL_TLS_SERVER` "
"協定而非通用的 :data:`PROTOCOL_TLS`。"
#: ../../library/ssl.rst:216
msgid ""
"The context now uses :data:`VERIFY_X509_PARTIAL_CHAIN` and :data:"
"`VERIFY_X509_STRICT` in its default verify flags."
msgstr ""
#: ../../library/ssl.rst:221
msgid "Exceptions"
msgstr "例外"
#: ../../library/ssl.rst:225
msgid ""
"Raised to signal an error from the underlying SSL implementation (currently "
"provided by the OpenSSL library). This signifies some problem in the higher-"
"level encryption and authentication layer that's superimposed on the "
"underlying network connection. This error is a subtype of :exc:`OSError`. "
"The error code and message of :exc:`SSLError` instances are provided by the "
"OpenSSL library."
msgstr ""
"引發由底層 SSL 實作(目前由 OpenSSL 函式庫提供)所引發的錯誤訊息。這表示在覆"
"蓋底層網路連線的高階加密和身份驗證層中存在一些問題。這項錯誤是 :exc:"
"`OSError` 的一個子型別。:exc:`SSLError` 實例的錯誤程式代碼和訊息是由 OpenSSL "
"函式庫提供。"
#: ../../library/ssl.rst:232
msgid ":exc:`SSLError` used to be a subtype of :exc:`socket.error`."
msgstr ":exc:`SSLError` 曾經是 :exc:`socket.error` 的一個子型別。"
#: ../../library/ssl.rst:237
msgid ""
"A string mnemonic designating the OpenSSL submodule in which the error "
"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 的版本。"
#: ../../library/ssl.rst:245
msgid ""
"A string mnemonic designating the reason this error occurred, for example "
"``CERTIFICATE_VERIFY_FAILED``. The range of possible values depends on the "
"OpenSSL version."
msgstr ""
"一個字串符號,用來指定發生錯誤的原因,如:``CERTIFICATE_VERIFY_FAILED``。可能"
"值的範圍取決於 OpenSSL 的版本。"
#: ../../library/ssl.rst:253
msgid ""
"A subclass of :exc:`SSLError` raised when trying to read or write and the "
"SSL connection has been closed cleanly. Note that this doesn't mean that "
"the underlying transport (read TCP) has been closed."
msgstr ""
"一個 :exc:`SSLError` 的子類別,當嘗試去讀寫已經被完全關閉的 SSL 連線時會被引"
"發。請注意,這並不表示底層傳輸(例如 TCP)已經被關閉。"
#: ../../library/ssl.rst:261
msgid ""
"A subclass of :exc:`SSLError` raised by a :ref:`non-blocking SSL socket <ssl-"
"nonblocking>` when trying to read or write data, but more data needs to be "
"received on the underlying TCP transport before the request can be fulfilled."
msgstr ""
"一個 :exc:`SSLError` 的子類別,當嘗試去讀寫資料前,底層 TCP 傳輸需要先接收更"
"多資料時會由\\ :ref:`非阻塞的 SSL socket <ssl-nonblocking>` 引發該錯誤。"
#: ../../library/ssl.rst:270
msgid ""
"A subclass of :exc:`SSLError` raised by a :ref:`non-blocking SSL socket <ssl-"
"nonblocking>` when trying to read or write data, but more data needs to be "
"sent on the underlying TCP transport before the request can be fulfilled."
msgstr ""
"一個 :exc:`SSLError` 的子類別,當嘗試去讀寫資料前,底層 TCP 傳輸需要先發送更"
"多資料時會由\\ :ref:`非阻塞的 SSL socket <ssl-nonblocking>` 引發該錯誤。"
#: ../../library/ssl.rst:279
msgid ""
"A subclass of :exc:`SSLError` raised when a system error was encountered "
"while trying to fulfill an operation on a SSL socket. Unfortunately, there "
"is no easy way to inspect the original errno number."
msgstr ""
"一個 :exc:`SSLError` 的子類別,當嘗試去操作 SSL socket 時有系統錯誤產生會引發"
"此錯誤。不幸的是,目前沒有任何簡單的方法可以去檢查原本的的 errno 編號。"
#: ../../library/ssl.rst:287
msgid ""
"A subclass of :exc:`SSLError` raised when the SSL connection has been "
"terminated abruptly. Generally, you shouldn't try to reuse the underlying "
"transport when this error is encountered."
msgstr ""
"一個 :exc:`SSLError` 的子類別,當 SSL 連線被突然終止時會引發此錯誤。通常,當"
"此錯誤發生時,你不該再去重新使用底層傳輸。"
#: ../../library/ssl.rst:295
msgid ""
"A subclass of :exc:`SSLError` raised when certificate validation has failed."
msgstr "當憑證驗證失敗時會引發的一個 :exc:`SSLError` 子類別。"
#: ../../library/ssl.rst:302
msgid "A numeric error number that denotes the verification error."
msgstr "一個表示驗證錯誤的錯誤數值編號。"
#: ../../library/ssl.rst:306
msgid "A human readable string of the verification error."
msgstr "一個人類可讀的驗證錯誤字串。"
#: ../../library/ssl.rst:310
msgid "An alias for :exc:`SSLCertVerificationError`."
msgstr ":exc:`SSLCertVerificationError` 的別名。"
#: ../../library/ssl.rst:312
msgid "The exception is now an alias for :exc:`SSLCertVerificationError`."
msgstr "此例外現在是 :exc:`SSLCertVerificationError` 的別名。"
#: ../../library/ssl.rst:317
msgid "Random generation"
msgstr "隨機產生"
#: ../../library/ssl.rst:321
msgid ""
"Return *num* cryptographically strong pseudo-random bytes. Raises an :class:"
"`SSLError` if the PRNG has not been seeded with enough data or if the "
"operation is not supported by the current RAND method. :func:`RAND_status` "
"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:327
msgid "For almost all applications :func:`os.urandom` is preferable."
msgstr "在幾乎所有的應用程式中,:func:`os.urandom` 會是較好的選擇。"
#: ../../library/ssl.rst:329
msgid ""
"Read the Wikipedia article, `Cryptographically secure pseudorandom number "
"generator (CSPRNG) <https://en.wikipedia.org/wiki/"
"Cryptographically_secure_pseudorandom_number_generator>`_, to get the "
"requirements of a cryptographically strong generator."
msgstr ""
"請閱讀維基百科的\\ `密碼學安全偽隨機數產生器 (CSPRNG) <https://en.wikipedia."
"org/wiki/Cryptographically_secure_pseudorandom_number_generator>`_\\ 文章來了"
"解密碼學安全偽隨機數產生器的需求。"
#: ../../library/ssl.rst:338
msgid ""
"Return ``True`` if the SSL pseudo-random number generator has been seeded "
"with 'enough' randomness, and ``False`` otherwise. You can use :func:`ssl."
"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:345
msgid ""
"Mix the given *bytes* into the SSL pseudo-random number generator. The "
"parameter *entropy* (a float) is a lower bound on the entropy contained in "
"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:350
msgid "Writable :term:`bytes-like object` is now accepted."
msgstr "可寫入的\\ :term:`類位元組物件 <bytes-like object>`\\ 現在可被接受。"
#: ../../library/ssl.rst:354
msgid "Certificate handling"
msgstr "認證處理"
#: ../../library/ssl.rst:362
msgid ""
"Return the time in seconds since the Epoch, given the ``cert_time`` string "
"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:367
msgid "Here's an example:"
msgstr "以下是一個範例:"
#: ../../library/ssl.rst:369
msgid ""
">>> import ssl\n"
">>> timestamp = ssl.cert_time_to_seconds(\"Jan 5 09:34:43 2018 GMT\")\n"
">>> timestamp\n"
"1515144883\n"
">>> from datetime import datetime\n"
">>> print(datetime.utcfromtimestamp(timestamp))\n"
"2018-01-05 09:34:43"
msgstr ""
">>> import ssl\n"
">>> timestamp = ssl.cert_time_to_seconds(\"Jan 5 09:34:43 2018 GMT\")\n"
">>> timestamp\n"
"1515144883\n"
">>> from datetime import datetime\n"
">>> print(datetime.utcfromtimestamp(timestamp))\n"
"2018-01-05 09:34:43"
#: ../../library/ssl.rst:379
msgid "\"notBefore\" or \"notAfter\" dates must use GMT (:rfc:`5280`)."
msgstr "\"notBefore\" 或 \"notAfter\" 日期必須使用 GMT (:rfc:`5280`)。"
#: ../../library/ssl.rst:381
msgid ""
"Interpret the input time as a time in UTC as specified by 'GMT' timezone in "
"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:390
msgid ""
"Given the address ``addr`` of an SSL-protected server, as a (*hostname*, "
"*port-number*) pair, fetches the server's certificate, and returns it as a "
"PEM-encoded string. If ``ssl_version`` is specified, uses that version of "
"the SSL protocol to attempt to connect to the server. If *ca_certs* is "
"specified, it should be a file containing a list of root certificates, the "
"same format as used for the *cafile* parameter in :meth:`SSLContext."
"load_verify_locations`. The call will attempt to validate the server "
"certificate against that set of root certificates, and will fail if the "
"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:401
msgid "This function is now IPv6-compatible."
msgstr "此函式現在是與 IPv6 相容的。"
#: ../../library/ssl.rst:404
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:408
msgid "The *timeout* parameter was added."
msgstr "新增 *timeout* 參數。"
#: ../../library/ssl.rst:413
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:418
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:423
msgid ""
"Returns a named tuple with paths to OpenSSL's default cafile and capath. The "
"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:428
msgid ""
":attr:`cafile` - resolved path to cafile or ``None`` if the file doesn't "
"exist,"
msgstr ":attr:`cafile` - 解析後的 cafile 路徑,如果檔案不存在則為 ``None``,"
#: ../../library/ssl.rst:429
msgid ""
":attr:`capath` - resolved path to capath or ``None`` if the directory "
"doesn't exist,"
msgstr ":attr:`capath` - 解析後的 capath 路徑,如果目錄不存在則為 ``None``,"
#: ../../library/ssl.rst:430
msgid ""
":attr:`openssl_cafile_env` - OpenSSL's environment key that points to a "
"cafile,"
msgstr ":attr:`openssl_cafile_env` - 指向 cafile 的 OpenSSL 環境密鑰,"
#: ../../library/ssl.rst:431
msgid ":attr:`openssl_cafile` - hard coded path to a cafile,"
msgstr ":attr:`openssl_cafile` - hard coded 的 cafile 路徑,"
#: ../../library/ssl.rst:432
msgid ""
":attr:`openssl_capath_env` - OpenSSL's environment key that points to a "
"capath,"
msgstr ":attr:`openssl_capath_env` - 指向 capath 的 OpenSSL 環境密鑰,"
#: ../../library/ssl.rst:433
msgid ":attr:`openssl_capath` - hard coded path to a capath directory"
msgstr ":attr:`openssl_capath` - hard coded 的 capath 目錄路徑"
#: ../../library/ssl.rst:439
msgid ""
"Retrieve certificates from Windows' system cert store. *store_name* may be "
"one of ``CA``, ``ROOT`` or ``MY``. Windows may provide additional cert "
"stores, too."
msgstr ""
"從 Windows 的系統憑證儲存庫中搜尋憑證。*store_name* 可以是 ``CA``、``ROOT`` "
"或 ``MY`` 的其中一個。Windows 也可能會提供額外的憑證儲存庫。"
#: ../../library/ssl.rst:443
msgid ""
"The function returns a list of (cert_bytes, encoding_type, trust) tuples. "
"The encoding_type specifies the encoding of cert_bytes. It is either :const:"
"`x509_asn` for X.509 ASN.1 data or :const:`pkcs_7_asn` for PKCS#7 ASN.1 "
"data. Trust specifies the purpose of the certificate as a set of OIDS or "
"exactly ``True`` if the certificate is trustworthy for all purposes."
msgstr ""
"此函式會回傳一個元組 (cert_bytes, encoding_type, trust) 串列。encoding_type "
"指定了 cert_bytes 的編碼格式。它可以是用來表示 X.509 ASN.1 資料的 :const:"
"`x509_asn` 或是用來表示 PKCS#7 ASN.1 資料的 :const:`pkcs_7_asn`。Trust 通過一"
"組 OIDS 來指定憑證的用途,或是如果憑證對所有用途都可以使用則回傳 ``True``。"
#: ../../library/ssl.rst:450 ../../library/ssl.rst:1610
#: ../../library/ssl.rst:1910
msgid "Example::"
msgstr "範例: ::"
#: ../../library/ssl.rst:452
msgid ""
">>> ssl.enum_certificates(\"CA\")\n"
"[(b'data...', 'x509_asn', {'1.3.6.1.5.5.7.3.1', '1.3.6.1.5.5.7.3.2'}),\n"
" (b'data...', 'x509_asn', True)]"
msgstr ""
">>> ssl.enum_certificates(\"CA\")\n"
"[(b'data...', 'x509_asn', {'1.3.6.1.5.5.7.3.1', '1.3.6.1.5.5.7.3.2'}),\n"
" (b'data...', 'x509_asn', True)]"
#: ../../library/ssl.rst:462
msgid ""
"Retrieve CRLs from Windows' system cert store. *store_name* may be one of "
"``CA``, ``ROOT`` or ``MY``. Windows may provide additional cert stores, too."
msgstr ""
"從 Windows 的系統憑證儲存庫中搜尋 CRLs。*store_name* 可以是 ``CA``、``ROOT`` "
"或 ``MY`` 的其中一個。Windows 也可能會提供額外的憑證儲存庫。"
#: ../../library/ssl.rst:466
msgid ""
"The function returns a list of (cert_bytes, encoding_type, trust) tuples. "
"The encoding_type specifies the encoding of cert_bytes. It is either :const:"
"`x509_asn` for X.509 ASN.1 data or :const:`pkcs_7_asn` for PKCS#7 ASN.1 data."
msgstr ""
"此函式會回傳一個元組 (cert_bytes, encoding_type, trust) 串列。encoding_type "
"指定了 cert_bytes 的編碼格式。它可以是用來表示 X.509 ASN.1 資料的 :const:"
"`x509_asn` 或是用來表示 PKCS#7 ASN.1 資料的 :const:`pkcs_7_asn`。"
#: ../../library/ssl.rst:477
msgid "Constants"
msgstr "常數"
#: ../../library/ssl.rst:479
msgid ""
"All constants are now :class:`enum.IntEnum` or :class:`enum.IntFlag` "
"collections."
msgstr ""
"所有的常數現在都是 :class:`enum.IntEnum` 或 :class:`enum.IntFlag` 的集合。"
#: ../../library/ssl.rst:485
msgid ""
"Possible value for :attr:`SSLContext.verify_mode`. Except for :const:"
"`PROTOCOL_TLS_CLIENT`, it is the default mode. With client-side sockets, "
"just about any cert is accepted. Validation errors, such as untrusted or "
"expired cert, are ignored and do not abort the TLS/SSL handshake."
msgstr ""
":attr:`SSLContext.verify_mode` 可能的值。除了 :attr:`SSLContext.verify_mode` "
"外,這是預設的模式。對於用戶端的 sockets,幾乎任何憑證都能被允許。驗證錯誤,"
"像是不被信任或是過期的憑證,會被忽略並不會中止 TLS/SSL 握手。"
#: ../../library/ssl.rst:491
msgid ""
"In server mode, no certificate is requested from the client, so the client "
"does not send any for client cert authentication."
msgstr ""
"在伺服器模式下,不會從用戶端請求任何憑證,所以用戶端不用發送任何用於用戶端憑"
"證身分驗證的憑證。"
#: ../../library/ssl.rst:494 ../../library/ssl.rst:2412
msgid "See the discussion of :ref:`ssl-security` below."
msgstr "參閱下方 :ref:`ssl-security` 的討論。"
#: ../../library/ssl.rst:498
msgid ""
"Possible value for :attr:`SSLContext.verify_mode`. In client mode, :const:"
"`CERT_OPTIONAL` has the same meaning as :const:`CERT_REQUIRED`. It is "
"recommended to use :const:`CERT_REQUIRED` for client-side sockets instead."
msgstr ""
":attr:`SSLContext.verify_mode` 可能的值。在用戶端模式下,:const:"
"`CERT_OPTIONAL` 具有與 :const:`CERT_REQUIRED` 相同的含意。對於客戶端 sockets "
"推薦改用 :const:`CERT_REQUIRED`。"
#: ../../library/ssl.rst:503
msgid ""
"In server mode, a client certificate request is sent to the client. The "
"client may either ignore the request or send a certificate in order perform "
"TLS client cert authentication. If the client chooses to send a "
"certificate, it is verified. Any verification error immediately aborts the "
"TLS handshake."
msgstr ""
"在伺服器模式下,客戶憑證請求會被發送給用戶端。用戶端可以選擇忽略請求或是選擇"
"發送憑證來執行 TLS 用戶端憑證身分驗證。如果用戶端選擇發送憑證,則會對其進行驗"
"證。任何驗證錯誤都會立刻終止 TLS 握手。"
#: ../../library/ssl.rst:509 ../../library/ssl.rst:528
msgid ""
"Use of this setting requires a valid set of CA certificates to be passed to :"
"meth:`SSLContext.load_verify_locations`."
msgstr ""
"使用此設定需要將一組有效的 CA 憑證傳送給 :meth:`SSLContext."
"load_verify_locations`。"
#: ../../library/ssl.rst:514
msgid ""
"Possible value for :attr:`SSLContext.verify_mode`. In this mode, "
"certificates are required from the other side of the socket connection; an :"
"class:`SSLError` will be raised if no certificate is provided, or if its "
"validation fails. This mode is **not** sufficient to verify a certificate in "
"client mode as it does not match hostnames. :attr:`~SSLContext."
"check_hostname` must be enabled as well to verify the authenticity of a "
"cert. :const:`PROTOCOL_TLS_CLIENT` uses :const:`CERT_REQUIRED` and enables :"
"attr:`~SSLContext.check_hostname` by default."
msgstr ""
":attr:`SSLContext.verify_mode` 可能的值。在這個模式下,需要從 socket 連線的另"
"一端取得憑證;如果未提供憑證或是驗證失敗,則將會導致 :class:`SSLError`。此模"
"式\\ **不能**\\ 在用戶端模式下對憑證進行驗證,因為它無法去配對主機名稱。:"
"attr:`~SSLContext.check_hostname` 也必須被開起來來驗證憑證的真實性。:const:"
"`PROTOCOL_TLS_CLIENT` 會使用 :const:`CERT_REQUIRED` 並預設開啟 :attr:"
"`~SSLContext.check_hostname`。"
#: ../../library/ssl.rst:524
msgid ""
"With server socket, this mode provides mandatory TLS client cert "
"authentication. A client certificate request is sent to the client and the "
"client must provide a valid and trusted certificate."
msgstr ""
"對於 socket 伺服器,此模式會提供強制的 TLS 用戶端憑證驗證。用戶端憑證請求會被"
"發送給用戶端並且用戶端必須提供有效且被信任的憑證。"
#: ../../library/ssl.rst:533
msgid ":class:`enum.IntEnum` collection of CERT_* constants."
msgstr ":class:`enum.IntEnum` 為 CERT_* 常數的一個集合。"
#: ../../library/ssl.rst:539
msgid ""
"Possible value for :attr:`SSLContext.verify_flags`. In this mode, "
"certificate revocation lists (CRLs) are not checked. By default OpenSSL does "
"neither require nor verify CRLs."
msgstr ""
":attr:`SSLContext.verify_flags` 可能的值。在此模式下,不會檢查憑證吊銷列表 "
"(CRLs)。預設的 OpenSSL 並不會請求及驗證 CRLs。"
#: ../../library/ssl.rst:547
msgid ""
"Possible value for :attr:`SSLContext.verify_flags`. In this mode, only the "
"peer cert is checked but none of the intermediate CA certificates. The mode "
"requires a valid CRL that is signed by the peer cert's issuer (its direct "
"ancestor CA). If no proper CRL has been loaded with :attr:`SSLContext."
"load_verify_locations`, validation will fail."
msgstr ""
":attr:`SSLContext.verify_flags` 可能的值。在此模式下,只會檢查同等的憑證而不"
"會去檢查中間的 CA 憑證。此模式需要提供由對等憑證發行者 (它的直接上級 CA) 的有"
"效的 CRL 簽名。如果沒有用 :attr:`SSLContext.load_verify_locations` 載入適當"
"的 CRL,則會驗證失敗。"
#: ../../library/ssl.rst:557
msgid ""
"Possible value for :attr:`SSLContext.verify_flags`. In this mode, CRLs of "
"all certificates in the peer cert chain are checked."
msgstr ""
":attr:`SSLContext.verify_flags` 可能的值。在此模式下,會檢查對等憑證鍊中所有"
"憑證的 CRLs。"
#: ../../library/ssl.rst:564
msgid ""
"Possible value for :attr:`SSLContext.verify_flags` to disable workarounds "
"for broken X.509 certificates."
msgstr ""
":attr:`SSLContext.verify_flags` 可能的值,用來禁用已損壞的 X.509 憑證的解決方"
"法。"
#: ../../library/ssl.rst:571
msgid ""
"Possible value for :attr:`SSLContext.verify_flags` to enables proxy "
"certificate verification."
msgstr ":attr:`SSLContext.verify_flags` 可能的值,用來啟用憑證代理驗證。"
#: ../../library/ssl.rst:578
msgid ""
"Possible value for :attr:`SSLContext.verify_flags`. It instructs OpenSSL to "
"prefer trusted certificates when building the trust chain to validate a "
"certificate. This flag is enabled by default."
msgstr ""
":attr:`SSLContext.verify_flags` 可能的值。它指示 OpenSSL 在構建信任鍊來驗證憑"
"證時會優先使用被信任的憑證。此旗標預設開啟。"
#: ../../library/ssl.rst:586
msgid ""
"Possible value for :attr:`SSLContext.verify_flags`. It instructs OpenSSL to "
"accept intermediate CAs in the trust store to be treated as trust-anchors, "
"in the same way as the self-signed root CA certificates. This makes it "
"possible to trust certificates issued by an intermediate CA without having "
"to trust its ancestor root CA."
msgstr ""
":attr:`SSLContext.verify_flags` 可能的值。它指示 OpenSSL 接受信任儲存中的中"
"間 CAs 作為信任錨,就像自簽名的根 CA 憑證。這樣就能去信任中間 CA 所頒發的憑"
"證,而不一定非要去信任其祖先的根 CA。"
#: ../../library/ssl.rst:597
msgid ":class:`enum.IntFlag` collection of VERIFY_* constants."
msgstr ":class:`enum.IntFlag` 為 VERIFY_* 常數的其中一個集合。"
#: ../../library/ssl.rst:603
msgid ""
"Selects the highest protocol version that both the client and server "
"support. Despite the name, this option can select both \"SSL\" and \"TLS\" "
"protocols."
msgstr ""
"選擇用戶端及伺服器均可以支援最高協定版本。儘管名稱只有 「TLS」,但實際上"
"「SSL」和「TLS」均可以選擇。"
#: ../../library/ssl.rst:610
msgid ""
"TLS clients and servers require different default settings for secure "
"communication. The generic TLS protocol constant is deprecated in favor of :"
"data:`PROTOCOL_TLS_CLIENT` and :data:`PROTOCOL_TLS_SERVER`."
msgstr ""
"TLS 的用戶端及伺服器端需要不同的預設值來實現安全通訊。通用的 TLS 協定常數已被"
"廢除,並改用 :data:`PROTOCOL_TLS_CLIENT` 和 :data:`PROTOCOL_TLS_SERVER`。"
#: ../../library/ssl.rst:616
msgid ""
"Auto-negotiate the highest protocol version that both the client and server "
"support, and configure the context client-side connections. The protocol "
"enables :data:`CERT_REQUIRED` and :attr:`~SSLContext.check_hostname` by "
"default."
msgstr ""
"自動協商用戶端和伺服器服務器都支援的最高協定版本,並配置用戶端語境連線。該協"
"定預設啟用 :data:`CERT_REQUIRED` 和 :attr:`~SSLContext.check_hostname`。"
#: ../../library/ssl.rst:625
msgid ""
"Auto-negotiate the highest protocol version that both the client and server "
"support, and configure the context server-side connections."
msgstr "自動協商用戶端和伺服器都支援的最高協定版本,並配置用戶端語境連線。"
#: ../../library/ssl.rst:632
msgid "Alias for :data:`PROTOCOL_TLS`."
msgstr ":data:`PROTOCOL_TLS` 的別名。"
#: ../../library/ssl.rst:636
msgid "Use :data:`PROTOCOL_TLS` instead."
msgstr "請改用 :data:`PROTOCOL_TLS`。"
#: ../../library/ssl.rst:640
msgid "Selects SSL version 3 as the channel encryption protocol."
msgstr "選擇第三版的 SSL 做為通道加密協定。"
#: ../../library/ssl.rst:642
msgid ""
"This protocol is not available if OpenSSL is compiled with the ``no-ssl3`` "
"option."
msgstr "如果 OpenSSL 是用 ``no-ssl3`` 編譯的,則此項協定無法使用。"
#: ../../library/ssl.rst:647
msgid "SSL version 3 is insecure. Its use is highly discouraged."
msgstr "第三版的 SSL 是不安全的,強烈建議不要使用。"
#: ../../library/ssl.rst:651
msgid ""
"OpenSSL has deprecated all version specific protocols. Use the default "
"protocol :data:`PROTOCOL_TLS_SERVER` or :data:`PROTOCOL_TLS_CLIENT` with :"
"attr:`SSLContext.minimum_version` and :attr:`SSLContext.maximum_version` "
"instead."
msgstr ""
"OpenSSL 已經終止了所有特定版本的協定。請改用預設的 :data:"
"`PROTOCOL_TLS_SERVER` 協定或帶有 :attr:`SSLContext.minimum_version` 和 :attr:"
"`SSLContext.maximum_version` 的 :data:`PROTOCOL_TLS_CLIENT`。"
#: ../../library/ssl.rst:659
msgid "Selects TLS version 1.0 as the channel encryption protocol."
msgstr "選擇 1.0 版的 TLS 做為通道加密協定。"
#: ../../library/ssl.rst:663 ../../library/ssl.rst:674
#: ../../library/ssl.rst:685
msgid "OpenSSL has deprecated all version specific protocols."
msgstr "OpenSSL 已經將所有版本特定的協定棄用。"
#: ../../library/ssl.rst:667
msgid ""
"Selects TLS version 1.1 as the channel encryption protocol. Available only "
"with openssl version 1.0.1+."
msgstr ""
"選擇 1.1 版的 TLS 做為通道加密協定。只有在 1.0.1 版本以上的 OpenSSL 才可以選"
"用。"
#: ../../library/ssl.rst:678
msgid ""
"Selects TLS version 1.2 as the channel encryption protocol. Available only "
"with openssl version 1.0.1+."
msgstr ""
"選擇 1.2 版的 TLS 做為通道加密協定。只有在 1.0.1 版本以上的 OpenSSL 才可以選"