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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>SSL Package — M2Crypto documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="prev" title="M2Crypto Package" href="M2Crypto.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head><body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="ssl-package">
<h1>SSL Package<a class="headerlink" href="#ssl-package" title="Permalink to this headline">¶</a></h1>
<div class="section" id="id1">
<h2><code class="xref py py-mod docutils literal notranslate"><span class="pre">SSL</span></code> Package<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
<span class="target" id="module-M2Crypto.SSL"></span><dl class="py exception">
<dt id="M2Crypto.SSL.SSLError">
<em class="property">exception </em><code class="sig-prename descclassname">M2Crypto.SSL.</code><code class="sig-name descname">SSLError</code><a class="reference internal" href="_modules/M2Crypto/SSL.html#SSLError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.SSLError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></p>
</dd></dl>
<dl class="py exception">
<dt id="M2Crypto.SSL.SSLTimeoutError">
<em class="property">exception </em><code class="sig-prename descclassname">M2Crypto.SSL.</code><code class="sig-name descname">SSLTimeoutError</code><a class="reference internal" href="_modules/M2Crypto/SSL.html#SSLTimeoutError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.SSLTimeoutError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#M2Crypto.SSL.SSLError" title="M2Crypto.SSL.SSLError"><code class="xref py py-class docutils literal notranslate"><span class="pre">M2Crypto.SSL.SSLError</span></code></a>, <code class="xref py py-class docutils literal notranslate"><span class="pre">socket.timeout</span></code></p>
</dd></dl>
</div>
<div class="section" id="module-M2Crypto.SSL.Checker">
<span id="checker-module"></span><h2><code class="xref py py-mod docutils literal notranslate"><span class="pre">Checker</span></code> Module<a class="headerlink" href="#module-M2Crypto.SSL.Checker" title="Permalink to this headline">¶</a></h2>
<p>SSL peer certificate checking routines</p>
<p>Copyright (c) 2004-2007 Open Source Applications Foundation.
All rights reserved.</p>
<p>Copyright 2008 Heikki Toivonen. All rights reserved.</p>
<dl class="py class">
<dt id="M2Crypto.SSL.Checker.Checker">
<em class="property">class </em><code class="sig-prename descclassname">M2Crypto.SSL.Checker.</code><code class="sig-name descname">Checker</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">host</span><span class="p">:</span> <span class="n">Optional<span class="p">[</span>str<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">peerCertHash</span><span class="p">:</span> <span class="n">Optional<span class="p">[</span>bytes<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">peerCertDigest</span><span class="p">:</span> <span class="n">str</span> <span class="o">=</span> <span class="default_value">'sha1'</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/M2Crypto/SSL/Checker.html#Checker"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Checker.Checker" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<dl class="py attribute">
<dt id="M2Crypto.SSL.Checker.Checker.numericIpMatch">
<code class="sig-name descname">numericIpMatch</code><em class="property"> = re.compile('^[0-9]+(\\.[0-9]+)*$')</em><a class="headerlink" href="#M2Crypto.SSL.Checker.Checker.numericIpMatch" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="py exception">
<dt id="M2Crypto.SSL.Checker.NoCertificate">
<em class="property">exception </em><code class="sig-prename descclassname">M2Crypto.SSL.Checker.</code><code class="sig-name descname">NoCertificate</code><a class="reference internal" href="_modules/M2Crypto/SSL/Checker.html#NoCertificate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Checker.NoCertificate" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#M2Crypto.SSL.Checker.SSLVerificationError" title="M2Crypto.SSL.Checker.SSLVerificationError"><code class="xref py py-class docutils literal notranslate"><span class="pre">M2Crypto.SSL.Checker.SSLVerificationError</span></code></a></p>
</dd></dl>
<dl class="py exception">
<dt id="M2Crypto.SSL.Checker.SSLVerificationError">
<em class="property">exception </em><code class="sig-prename descclassname">M2Crypto.SSL.Checker.</code><code class="sig-name descname">SSLVerificationError</code><a class="reference internal" href="_modules/M2Crypto/SSL/Checker.html#SSLVerificationError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Checker.SSLVerificationError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></p>
</dd></dl>
<dl class="py exception">
<dt id="M2Crypto.SSL.Checker.WrongCertificate">
<em class="property">exception </em><code class="sig-prename descclassname">M2Crypto.SSL.Checker.</code><code class="sig-name descname">WrongCertificate</code><a class="reference internal" href="_modules/M2Crypto/SSL/Checker.html#WrongCertificate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Checker.WrongCertificate" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#M2Crypto.SSL.Checker.SSLVerificationError" title="M2Crypto.SSL.Checker.SSLVerificationError"><code class="xref py py-class docutils literal notranslate"><span class="pre">M2Crypto.SSL.Checker.SSLVerificationError</span></code></a></p>
</dd></dl>
<dl class="py exception">
<dt id="M2Crypto.SSL.Checker.WrongHost">
<em class="property">exception </em><code class="sig-prename descclassname">M2Crypto.SSL.Checker.</code><code class="sig-name descname">WrongHost</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">expectedHost</span><span class="p">:</span> <span class="n">str</span></em>, <em class="sig-param"><span class="n">actualHost</span><span class="p">:</span> <span class="n">AnyStr</span></em>, <em class="sig-param"><span class="n">fieldName</span><span class="p">:</span> <span class="n">str</span> <span class="o">=</span> <span class="default_value">'commonName'</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/M2Crypto/SSL/Checker.html#WrongHost"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Checker.WrongHost" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#M2Crypto.SSL.Checker.SSLVerificationError" title="M2Crypto.SSL.Checker.SSLVerificationError"><code class="xref py py-class docutils literal notranslate"><span class="pre">M2Crypto.SSL.Checker.SSLVerificationError</span></code></a></p>
</dd></dl>
</div>
<div class="section" id="module-M2Crypto.SSL.Cipher">
<span id="cipher-module"></span><h2><code class="xref py py-mod docutils literal notranslate"><span class="pre">Cipher</span></code> Module<a class="headerlink" href="#module-M2Crypto.SSL.Cipher" title="Permalink to this headline">¶</a></h2>
<p>SSL Ciphers</p>
<p>Copyright (c) 1999-2003 Ng Pheng Siong. All rights reserved.</p>
<dl class="py class">
<dt id="M2Crypto.SSL.Cipher.Cipher">
<em class="property">class </em><code class="sig-prename descclassname">M2Crypto.SSL.Cipher.</code><code class="sig-name descname">Cipher</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cipher</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/M2Crypto/SSL/Cipher.html#Cipher"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Cipher.Cipher" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<dl class="py method">
<dt id="M2Crypto.SSL.Cipher.Cipher.name">
<code class="sig-name descname">name</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → str<a class="reference internal" href="_modules/M2Crypto/SSL/Cipher.html#Cipher.name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Cipher.Cipher.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Cipher.Cipher.version">
<code class="sig-name descname">version</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → int<a class="reference internal" href="_modules/M2Crypto/SSL/Cipher.html#Cipher.version"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Cipher.Cipher.version" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="py class">
<dt id="M2Crypto.SSL.Cipher.Cipher_Stack">
<em class="property">class </em><code class="sig-prename descclassname">M2Crypto.SSL.Cipher.</code><code class="sig-name descname">Cipher_Stack</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">stack</span><span class="p">:</span> <span class="n">bytes</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/M2Crypto/SSL/Cipher.html#Cipher_Stack"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Cipher.Cipher_Stack" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
</dd></dl>
</div>
<div class="section" id="module-M2Crypto.SSL.Connection">
<span id="connection-module"></span><h2><code class="xref py py-mod docutils literal notranslate"><span class="pre">Connection</span></code> Module<a class="headerlink" href="#module-M2Crypto.SSL.Connection" title="Permalink to this headline">¶</a></h2>
<dl class="py class">
<dt id="M2Crypto.SSL.Connection.Connection">
<em class="property">class </em><code class="sig-prename descclassname">M2Crypto.SSL.Connection.</code><code class="sig-name descname">Connection</code><span class="sig-paren">(</span><em class="sig-param">ctx: Context</em>, <em class="sig-param">sock: socket.socket = None</em>, <em class="sig-param">family: int = <AddressFamily.AF_INET: 2></em><span class="sig-paren">)</span><a class="headerlink" href="#M2Crypto.SSL.Connection.Connection" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>An SSL connection.</p>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.accept">
<code class="sig-name descname">accept</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → Tuple<span class="p">[</span><a class="reference internal" href="#M2Crypto.SSL.Connection.Connection" title="M2Crypto.SSL.Connection.Connection">M2Crypto.SSL.Connection.Connection</a><span class="p">, </span>Union<span class="p">[</span>Tuple<span class="p">[</span>str<span class="p">, </span>int<span class="p">]</span><span class="p">, </span>str<span class="p">]</span><span class="p">]</span><a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.accept" title="Permalink to this definition">¶</a></dt>
<dd><p>Accept an SSL connection.</p>
<p>The return value is a pair (ssl, addr) where ssl is a new SSL
connection object and addr is the address bound to the other end
of the SSL connection.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>tuple of Connection and addr. Address can take very
various forms (see socket documentation), for IPv4 it
is tuple(str, int), for IPv6 a tuple of four (host,
port, flowinfo, scopeid), where the last two are
optional ints.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.accept_ssl">
<code class="sig-name descname">accept_ssl</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → Optional<span class="p">[</span>int<span class="p">]</span><a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.accept_ssl" title="Permalink to this definition">¶</a></dt>
<dd><p>Waits for a TLS/SSL client to initiate the TLS/SSL handshake.</p>
<p>The communication channel must already have been set and
assigned to the ssl by setting an underlying BIO.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><dl class="simple">
<dt>0 The TLS/SSL handshake was not successful but was shut</dt><dd><p>down controlled and by the specifications of the
TLS/SSL protocol. Call get_error() with the return
value ret to find out the reason.</p>
</dd>
<dt>1 The TLS/SSL handshake was successfully completed,</dt><dd><p>a TLS/SSL connection has been established.</p>
</dd>
<dt><0 The TLS/SSL handshake was not successful because</dt><dd><p>a fatal error occurred either at the protocol level
or a connection failure occurred. The shutdown was
not clean. It can also occur of action is need to
continue the operation for non-blocking BIOs. Call
get_error() with the return value ret to find
out the reason.</p>
</dd>
</dl>
</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.bind">
<code class="sig-name descname">bind</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">addr</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>Tuple<span class="p">[</span>str<span class="p">, </span>int<span class="p">]</span><span class="p">, </span>str<span class="p">]</span></span></em><span class="sig-paren">)</span> → None<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.bind" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.clear">
<code class="sig-name descname">clear</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → int<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.clear" title="Permalink to this definition">¶</a></dt>
<dd><p>If there were errors in this connection, call clear() rather
than close() to end it, so that bad sessions will be cleared
from cache.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.close">
<code class="sig-name descname">close</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">freeBio</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.close" title="Permalink to this definition">¶</a></dt>
<dd><p>if freeBio is true, call _free_bio</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.connect">
<code class="sig-name descname">connect</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">addr</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>Tuple<span class="p">[</span>str<span class="p">, </span>int<span class="p">]</span><span class="p">, </span>str<span class="p">]</span></span></em><span class="sig-paren">)</span> → int<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.connect" title="Permalink to this definition">¶</a></dt>
<dd><p>Overloading socket.connect()</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>addr</strong> – addresses have various depending on their type</p>
</dd>
</dl>
<p>:return:status of ssl_connect()</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.connect_ssl">
<code class="sig-name descname">connect_ssl</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → Optional<span class="p">[</span>int<span class="p">]</span><a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.connect_ssl" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.fileno">
<code class="sig-name descname">fileno</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → int<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.fileno" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.get_cipher">
<code class="sig-name descname">get_cipher</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → Optional<span class="p">[</span><a class="reference internal" href="#M2Crypto.SSL.Cipher.Cipher" title="M2Crypto.SSL.Cipher.Cipher">M2Crypto.SSL.Cipher.Cipher</a><span class="p">]</span><a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.get_cipher" title="Permalink to this definition">¶</a></dt>
<dd><p>Return an M2Crypto.SSL.Cipher object for this connection; if the
connection has not been initialised with a cipher suite, return None.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.get_cipher_list">
<code class="sig-name descname">get_cipher_list</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">idx</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">0</span></em><span class="sig-paren">)</span> → str<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.get_cipher_list" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the cipher suites for this connection as a string object.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.get_ciphers">
<code class="sig-name descname">get_ciphers</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → Optional<span class="p">[</span><a class="reference internal" href="#M2Crypto.SSL.Cipher.Cipher_Stack" title="M2Crypto.SSL.Cipher.Cipher_Stack">M2Crypto.SSL.Cipher.Cipher_Stack</a><span class="p">]</span><a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.get_ciphers" title="Permalink to this definition">¶</a></dt>
<dd><p>Return an M2Crypto.SSL.Cipher_Stack object for this
connection; if the connection has not been initialised with
cipher suites, return None.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.get_context">
<code class="sig-name descname">get_context</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → Context<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.get_context" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the Context object associated with this connection.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.get_default_session_timeout">
<code class="sig-name descname">get_default_session_timeout</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → int<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.get_default_session_timeout" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.get_peer_cert">
<code class="sig-name descname">get_peer_cert</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → <a class="reference internal" href="M2Crypto.html#M2Crypto.X509.X509" title="M2Crypto.X509.X509">M2Crypto.X509.X509</a><a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.get_peer_cert" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the peer certificate.</p>
<p>If the peer did not provide a certificate, return None.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.get_peer_cert_chain">
<code class="sig-name descname">get_peer_cert_chain</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → Optional<span class="p">[</span><a class="reference internal" href="M2Crypto.html#M2Crypto.X509.X509_Stack" title="M2Crypto.X509.X509_Stack">M2Crypto.X509.X509_Stack</a><span class="p">]</span><a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.get_peer_cert_chain" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the peer certificate chain; if the peer did not provide
a certificate chain, return None.</p>
<dl class="field-list simple">
<dt class="field-odd">Warning</dt>
<dd class="field-odd"><p>The returned chain will be valid only for as long as the
connection object is alive. Once the connection object
gets freed, the chain will be freed as well.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.get_session">
<code class="sig-name descname">get_session</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → <a class="reference internal" href="#M2Crypto.SSL.Session.Session" title="M2Crypto.SSL.Session.Session">M2Crypto.SSL.Session.Session</a><a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.get_session" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.get_shutdown">
<code class="sig-name descname">get_shutdown</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → None<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.get_shutdown" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the current shutdown mode of the Connection.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.get_socket_read_timeout">
<code class="sig-name descname">get_socket_read_timeout</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → timeout<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.get_socket_read_timeout" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.get_socket_write_timeout">
<code class="sig-name descname">get_socket_write_timeout</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → timeout<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.get_socket_write_timeout" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.get_state">
<code class="sig-name descname">get_state</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → bytes<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.get_state" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the SSL state of this connection.</p>
<p>During its use, an SSL objects passes several states. The state
is internally maintained. Querying the state information is not
very informative before or when a connection has been
established. It however can be of significant interest during
the handshake.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>6 letter string indicating the current state of the SSL
object ssl.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.get_verify_depth">
<code class="sig-name descname">get_verify_depth</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → int<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.get_verify_depth" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the peer certificate verification depth.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.get_verify_mode">
<code class="sig-name descname">get_verify_mode</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → int<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.get_verify_mode" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the peer certificate verification mode.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.get_verify_result">
<code class="sig-name descname">get_verify_result</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → int<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.get_verify_result" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the peer certificate verification result.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.get_version">
<code class="sig-name descname">get_version</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → str<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.get_version" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the TLS/SSL protocol version for this connection.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.getpeername">
<code class="sig-name descname">getpeername</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → Union<span class="p">[</span>Tuple<span class="p">[</span>str<span class="p">, </span>int<span class="p">]</span><span class="p">, </span>str<span class="p">]</span><a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.getpeername" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the remote address to which the socket is connected.</p>
<p>This is useful to find out the port number of a remote IPv4/v6 socket,
for instance.
On some systems this function is not supported.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.getsockname">
<code class="sig-name descname">getsockname</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → Union<span class="p">[</span>Tuple<span class="p">[</span>str<span class="p">, </span>int<span class="p">]</span><span class="p">, </span>str<span class="p">]</span><a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.getsockname" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the socket’s own address.</p>
<p>This is useful to find out the port number of an IPv4/v6 socket,
for instance. (The format of the address returned depends
on the address family – see above.)</p>
<p>:return:socket’s address as addr type</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.getsockopt">
<code class="sig-name descname">getsockopt</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">level</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">optname</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">buflen</span><span class="p">:</span> <span class="n">Optional<span class="p">[</span>int<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em><span class="sig-paren">)</span> → Union<span class="p">[</span>int<span class="p">, </span>bytes<span class="p">]</span><a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.getsockopt" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the value of the given socket option.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>level</strong> – level at which the option resides.
To manipulate options at the sockets API level, level is
specified as socket.SOL_SOCKET. To manipulate options at
any other level the protocol number of the appropriate
protocol controlling the option is supplied. For example,
to indicate that an option is to be interpreted by the
TCP protocol, level should be set to the protocol number
of socket.SOL_TCP; see getprotoent(3).</p></li>
<li><p><strong>optname</strong> – The value of the given socket option is
described in the Unix man page getsockopt(2)). The needed
symbolic constants (SO_* etc.) are defined in the socket
module.</p></li>
<li><p><strong>buflen</strong> – If it is absent, an integer option is assumed
and its integer value is returned by the function. If
buflen is present, it specifies the maximum length of the
buffer used to receive the option in, and this buffer is
returned as a bytes object.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Either integer or bytes value of the option. It is up
to the caller to decode the contents of the buffer (see
the optional built-in module struct for a way to decode
C structures encoded as byte strings).</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.listen">
<code class="sig-name descname">listen</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">qlen</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">5</span></em><span class="sig-paren">)</span> → None<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.listen" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.m2_bio_free">
<code class="sig-name descname">m2_bio_free</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.m2_bio_free" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="M2Crypto.SSL.Connection.Connection.m2_bio_noclose">
<code class="sig-name descname">m2_bio_noclose</code><em class="property"> = 0</em><a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.m2_bio_noclose" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.m2_ssl_free">
<code class="sig-name descname">m2_ssl_free</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.m2_ssl_free" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.makefile">
<code class="sig-name descname">makefile</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">mode</span><span class="p">:</span> <span class="n">AnyStr</span> <span class="o">=</span> <span class="default_value">'rb'</span></em>, <em class="sig-param"><span class="n">bufsize</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">- 1</span></em><span class="sig-paren">)</span> → Union<span class="p">[</span>_io.BufferedRWPair<span class="p">, </span>_io.BufferedReader<span class="p">]</span><a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.makefile" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.pending">
<code class="sig-name descname">pending</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → int<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.pending" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the numbers of octets that can be read from the connection.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.read">
<code class="sig-name descname">read</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">size</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">1024</span></em><span class="sig-paren">)</span> → bytes<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.read" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.recv">
<code class="sig-name descname">recv</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">size</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">1024</span></em><span class="sig-paren">)</span> → bytes<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.recv" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.recv_into">
<code class="sig-name descname">recv_into</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">buff</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>bytearray<span class="p">, </span>memoryview<span class="p">]</span></span></em>, <em class="sig-param"><span class="n">nbytes</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">0</span></em><span class="sig-paren">)</span> → int<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.recv_into" title="Permalink to this definition">¶</a></dt>
<dd><p>A version of recv() that stores its data into a buffer rather
than creating a new string. Receive up to buffersize bytes from
the socket. If buffersize is not specified (or 0), receive up
to the size available in the given buffer.</p>
<p>If buff is bytearray, it will have after return length of the
actually returned number of bytes. If buff is memoryview, then
the size of buff won’t change (it cannot), but all bytes after
the number of returned bytes will be NULL.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>buffer</strong> – a buffer for the received bytes</p></li>
<li><p><strong>nbytes</strong> – maximum number of bytes to read</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>number of bytes read</p>
</dd>
</dl>
<p>See recv() for documentation about the flags.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.renegotiate">
<code class="sig-name descname">renegotiate</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → int<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.renegotiate" title="Permalink to this definition">¶</a></dt>
<dd><p>Renegotiate this connection’s SSL parameters.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.send">
<code class="sig-name descname">send</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span><span class="p">:</span> <span class="n">bytes</span></em><span class="sig-paren">)</span> → int<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.send" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.sendall">
<code class="sig-name descname">sendall</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span><span class="p">:</span> <span class="n">bytes</span></em><span class="sig-paren">)</span> → int<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.sendall" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.serverPostConnectionCheck">
<code class="sig-name descname">serverPostConnectionCheck</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">**</span><span class="n">kw</span><span class="p">:</span> <span class="n">Any</span></em><span class="sig-paren">)</span> → int<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.serverPostConnectionCheck" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.set1_host">
<code class="sig-name descname">set1_host</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span><span class="p">:</span> <span class="n">bytes</span></em><span class="sig-paren">)</span> → None<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.set1_host" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the requested hostname to check in the server certificate.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.set_accept_state">
<code class="sig-name descname">set_accept_state</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → None<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.set_accept_state" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets Connection to work in the server mode.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.set_bio">
<code class="sig-name descname">set_bio</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">readbio</span><span class="p">:</span> <span class="n"><a class="reference internal" href="M2Crypto.html#M2Crypto.BIO.BIO" title="M2Crypto.BIO.BIO">M2Crypto.BIO.BIO</a></span></em>, <em class="sig-param"><span class="n">writebio</span><span class="p">:</span> <span class="n"><a class="reference internal" href="M2Crypto.html#M2Crypto.BIO.BIO" title="M2Crypto.BIO.BIO">M2Crypto.BIO.BIO</a></span></em><span class="sig-paren">)</span> → None<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.set_bio" title="Permalink to this definition">¶</a></dt>
<dd><p>Explicitly set read and write bios</p>
<p>Connects the BIOs for the read and write operations of the
TLS/SSL (encrypted) side of ssl.</p>
<p>The SSL engine inherits the behaviour of both BIO objects,
respectively. If a BIO is non-blocking, the Connection will also
have non-blocking behaviour.</p>
<p>If there was already a BIO connected to Connection, BIO_free()
will be called (for both the reading and writing side, if
different).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>readbio</strong> – BIO for reading</p></li>
<li><p><strong>writebio</strong> – BIO for writing.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.set_cipher_list">
<code class="sig-name descname">set_cipher_list</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cipher_list</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> → int<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.set_cipher_list" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the cipher suites for this connection.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.set_client_CA_list_from_context">
<code class="sig-name descname">set_client_CA_list_from_context</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → None<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.set_client_CA_list_from_context" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the acceptable client CA list. If the client
returns a certificate, it must have been issued by
one of the CAs listed in context.</p>
<p>Makes sense only for servers.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.set_client_CA_list_from_file">
<code class="sig-name descname">set_client_CA_list_from_file</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cafile</span><span class="p">:</span> <span class="n">AnyStr</span></em><span class="sig-paren">)</span> → None<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.set_client_CA_list_from_file" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the acceptable client CA list.</p>
<p>If the client returns a certificate, it must have been issued by
one of the CAs listed in cafile.</p>
<p>Makes sense only for servers.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>cafile</strong> – Filename from which to load the CA list.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><dl class="simple">
<dt>0 A failure while manipulating the STACK_OF(X509_NAME)</dt><dd><p>object occurred or the X509_NAME could not be
extracted from cacert. Check the error stack to find
out the reason.</p>
</dd>
</dl>
<p>1 The operation succeeded.</p>
</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.set_connect_state">
<code class="sig-name descname">set_connect_state</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → None<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.set_connect_state" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets Connection to work in the client mode.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.set_post_connection_check_callback">
<code class="sig-name descname">set_post_connection_check_callback</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">postConnectionCheck</span><span class="p">:</span> <span class="n">Callable</span></em><span class="sig-paren">)</span> → None<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.set_post_connection_check_callback" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.set_session">
<code class="sig-name descname">set_session</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">session</span><span class="p">:</span> <span class="n"><a class="reference internal" href="#M2Crypto.SSL.Session.Session" title="M2Crypto.SSL.Session.Session">M2Crypto.SSL.Session.Session</a></span></em><span class="sig-paren">)</span> → None<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.set_session" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.set_session_id_ctx">
<code class="sig-name descname">set_session_id_ctx</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">id</span><span class="p">:</span> <span class="n">bytes</span></em><span class="sig-paren">)</span> → int<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.set_session_id_ctx" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.set_shutdown">
<code class="sig-name descname">set_shutdown</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">mode</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> → None<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.set_shutdown" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the shutdown state of the Connection to mode.</p>
<p>The shutdown state of an ssl connection is a bitmask of (use
m2.SSL_* constants):</p>
<p>0 No shutdown setting, yet.</p>
<dl class="simple">
<dt>SSL_SENT_SHUTDOWN</dt><dd><p>A “close notify” shutdown alert was sent to the peer, the
connection is being considered closed and the session is
closed and correct.</p>
</dd>
<dt>SSL_RECEIVED_SHUTDOWN</dt><dd><p>A shutdown alert was received form the peer, either a normal
“close notify” or a fatal error.</p>
</dd>
</dl>
<p>SSL_SENT_SHUTDOWN and SSL_RECEIVED_SHUTDOWN can be set at the
same time.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>mode</strong> – set the mode bitmask.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.set_socket_read_timeout">
<code class="sig-name descname">set_socket_read_timeout</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">timeo</span><span class="p">:</span> <span class="n">timeout</span></em><span class="sig-paren">)</span> → None<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.set_socket_read_timeout" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.set_socket_write_timeout">
<code class="sig-name descname">set_socket_write_timeout</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">timeo</span><span class="p">:</span> <span class="n">timeout</span></em><span class="sig-paren">)</span> → None<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.set_socket_write_timeout" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.set_ssl_close_flag">
<code class="sig-name descname">set_ssl_close_flag</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">flag</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> → None<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.set_ssl_close_flag" title="Permalink to this definition">¶</a></dt>
<dd><p>By default, SSL struct will be freed in __del__. Call with
m2.bio_close to override this default.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>flag</strong> – either m2.bio_close or m2.bio_noclose</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.set_tlsext_host_name">
<code class="sig-name descname">set_tlsext_host_name</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span><span class="p">:</span> <span class="n">bytes</span></em><span class="sig-paren">)</span> → None<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.set_tlsext_host_name" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the requested hostname for the SNI (Server Name Indication)
extension.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.setblocking">
<code class="sig-name descname">setblocking</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">mode</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> → None<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.setblocking" title="Permalink to this definition">¶</a></dt>
<dd><p>Set this connection’s underlying socket to _mode_.</p>
<p>Set blocking or non-blocking mode of the socket: if flag is 0,
the socket is set to non-blocking, else to blocking mode.
Initially all sockets are in blocking mode. In non-blocking mode,
if a recv() call doesn’t find any data, or if a send() call can’t
immediately dispose of the data, a error exception is raised;
in blocking mode, the calls block until they can proceed.
s.setblocking(0) is equivalent to s.settimeout(0.0);
s.setblocking(1) is equivalent to s.settimeout(None).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>mode</strong> – new mode to be set</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.setsockopt">
<code class="sig-name descname">setsockopt</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">level</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">optname</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">value</span><span class="p">:</span> <span class="n">Optional<span class="p">[</span>Union<span class="p">[</span>int<span class="p">, </span>bytes<span class="p">]</span><span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em><span class="sig-paren">)</span> → Optional<span class="p">[</span>bytes<span class="p">]</span><a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.setsockopt" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the value of the given socket option.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>level</strong> – same as with getsockopt() above</p></li>
<li><p><strong>optname</strong> – same as with getsockopt() above</p></li>
<li><p><strong>value</strong> – an integer or a string representing a buffer. In
the latter case it is up to the caller to ensure
that the string contains the proper bits (see the
optional built-in module struct for a way to
encode C structures as strings).</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>None for success or the error handler for failure.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.settimeout">
<code class="sig-name descname">settimeout</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">timeout</span><span class="p">:</span> <span class="n">float</span></em><span class="sig-paren">)</span> → None<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.settimeout" title="Permalink to this definition">¶</a></dt>
<dd><p>Set this connection’s underlying socket’s timeout to _timeout_.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.setup_addr">
<code class="sig-name descname">setup_addr</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">addr</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>Tuple<span class="p">[</span>str<span class="p">, </span>int<span class="p">]</span><span class="p">, </span>str<span class="p">]</span></span></em><span class="sig-paren">)</span> → None<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.setup_addr" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.setup_ssl">
<code class="sig-name descname">setup_ssl</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → None<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.setup_ssl" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.shutdown">
<code class="sig-name descname">shutdown</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">how</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> → None<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.shutdown" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.ssl_get_error">
<code class="sig-name descname">ssl_get_error</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">ret</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> → int<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.ssl_get_error" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.verify_ok">
<code class="sig-name descname">verify_ok</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → bool<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.verify_ok" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Connection.Connection.write">
<code class="sig-name descname">write</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span><span class="p">:</span> <span class="n">bytes</span></em><span class="sig-paren">)</span> → int<a class="headerlink" href="#M2Crypto.SSL.Connection.Connection.write" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<div class="section" id="module-M2Crypto.SSL.Context">
<span id="context-module"></span><h2><code class="xref py py-mod docutils literal notranslate"><span class="pre">Context</span></code> Module<a class="headerlink" href="#module-M2Crypto.SSL.Context" title="Permalink to this headline">¶</a></h2>
<dl class="py class">
<dt id="M2Crypto.SSL.Context.Context">
<em class="property">class </em><code class="sig-prename descclassname">M2Crypto.SSL.Context.</code><code class="sig-name descname">Context</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">protocol</span><span class="p">:</span> <span class="n">str</span> <span class="o">=</span> <span class="default_value">'tls'</span></em>, <em class="sig-param"><span class="n">weak_crypto</span><span class="p">:</span> <span class="n">Optional<span class="p">[</span>int<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">post_connection_check</span><span class="p">:</span> <span class="n">Optional<span class="p">[</span>Callable<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#Context"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.Context" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>‘Context’ for SSL connections.</p>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.add_session">
<code class="sig-name descname">add_session</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">session</span><span class="p">:</span> <span class="n"><a class="reference internal" href="#M2Crypto.SSL.Session.Session" title="M2Crypto.SSL.Session.Session">M2Crypto.SSL.Session.Session</a></span></em><span class="sig-paren">)</span> → int<a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#Context.add_session"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.Context.add_session" title="Permalink to this definition">¶</a></dt>
<dd><p>Add the session to the context.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>session</strong> – the session to be added.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><dl class="simple">
<dt>0 The operation failed. It was tried to add the same</dt><dd><p>(identical) session twice.</p>
</dd>
</dl>
<p>1 The operation succeeded.</p>
</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.close">
<code class="sig-name descname">close</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → None<a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#Context.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.Context.close" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.get_allow_unknown_ca">
<code class="sig-name descname">get_allow_unknown_ca</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → Union<span class="p">[</span>int<span class="p">, </span>bool<span class="p">]</span><a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#Context.get_allow_unknown_ca"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.Context.get_allow_unknown_ca" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the context’s setting that accepts/rejects a peer
certificate if the certificate’s CA is unknown.</p>
<p>FIXME 2Bconverted to bool</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.get_cert_store">
<code class="sig-name descname">get_cert_store</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → <a class="reference internal" href="M2Crypto.html#M2Crypto.X509.X509" title="M2Crypto.X509.X509">M2Crypto.X509.X509</a><a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#Context.get_cert_store"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.Context.get_cert_store" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the certificate store associated with this context.</p>
<dl class="field-list simple">
<dt class="field-odd">Warning</dt>
<dd class="field-odd"><p>The store is NOT refcounted, and as such can not be relied
to be valid once the context goes away or is changed.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.get_session_cache_mode">
<code class="sig-name descname">get_session_cache_mode</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → int<a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#Context.get_session_cache_mode"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.Context.get_session_cache_mode" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the current session caching.</p>
<p>The mode is set to m2.SSL_SESS_CACHE_* constants.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>the previously set cache mode value.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.get_session_timeout">
<code class="sig-name descname">get_session_timeout</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → int<a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#Context.get_session_timeout"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.Context.get_session_timeout" title="Permalink to this definition">¶</a></dt>
<dd><p>Get current session timeout.</p>
<p>Whenever a new session is created, it is assigned a maximum
lifetime. This lifetime is specified by storing the creation
time of the session and the timeout value valid at this time. If
the actual time is later than creation time plus timeout, the
session is not reused.</p>
<p>Due to this realization, all sessions behave according to the
timeout value valid at the time of the session negotiation.
Changes of the timeout value do not affect already established
sessions.</p>
<p>Expired sessions are removed from the internal session cache,
whenever SSL_CTX_flush_sessions(3) is called, either directly by
the application or automatically (see
SSL_CTX_set_session_cache_mode(3))</p>
<p>The default value for session timeout is decided on a per
protocol basis, see SSL_get_default_timeout(3). All currently
supported protocols have the same default timeout value of 300
seconds.</p>
<p>SSL_CTX_set_timeout() returns the previously set timeout value.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>the currently set timeout value.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.get_verify_depth">
<code class="sig-name descname">get_verify_depth</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → int<a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#Context.get_verify_depth"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.Context.get_verify_depth" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the verification mode currently set in the SSL Context.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.get_verify_mode">
<code class="sig-name descname">get_verify_mode</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → int<a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#Context.get_verify_mode"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.Context.get_verify_mode" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.load_cert">
<code class="sig-name descname">load_cert</code><span class="sig-paren">(</span><em class="sig-param">certfile: AnyStr</em>, <em class="sig-param">keyfile: Optional[AnyStr] = None</em>, <em class="sig-param">callback: Callable = <function passphrase_callback></em><span class="sig-paren">)</span> → None<a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#Context.load_cert"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.Context.load_cert" title="Permalink to this definition">¶</a></dt>
<dd><p>Load certificate and private key into the context.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>certfile</strong> – File that contains the PEM-encoded certificate.</p></li>
<li><p><strong>keyfile</strong> – File that contains the PEM-encoded private key.
Default value of None indicates that the private key
is to be found in ‘certfile’.</p></li>
<li><p><strong>callback</strong> – Callable object to be invoked if the private key is
passphrase-protected. Default callback provides a
simple terminal-style input for the passphrase.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.load_cert_chain">
<code class="sig-name descname">load_cert_chain</code><span class="sig-paren">(</span><em class="sig-param">certchainfile: AnyStr</em>, <em class="sig-param">keyfile: Optional[AnyStr] = None</em>, <em class="sig-param">callback: Callable = <function passphrase_callback></em><span class="sig-paren">)</span> → None<a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#Context.load_cert_chain"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.Context.load_cert_chain" title="Permalink to this definition">¶</a></dt>
<dd><p>Load certificate chain and private key into the context.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>certchainfile</strong> – File object containing the PEM-encoded
certificate chain.</p></li>
<li><p><strong>keyfile</strong> – File object containing the PEM-encoded private
key. Default value of None indicates that the
private key is to be found in ‘certchainfile’.</p></li>
<li><p><strong>callback</strong> – Callable object to be invoked if the private key
is passphrase-protected. Default callback
provides a simple terminal-style input for the
passphrase.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.load_client_CA">
<code class="sig-name descname">load_client_CA</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cafile</span><span class="p">:</span> <span class="n">AnyStr</span></em><span class="sig-paren">)</span> → None<a class="headerlink" href="#M2Crypto.SSL.Context.Context.load_client_CA" title="Permalink to this definition">¶</a></dt>
<dd><p>Load CA certs into the context. These CA certs are sent to the
peer during <em>SSLv3 certificate request</em>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>cafile</strong> – File object containing one or more PEM-encoded CA
certificates concatenated together.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.load_client_ca">
<code class="sig-name descname">load_client_ca</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cafile</span><span class="p">:</span> <span class="n">AnyStr</span></em><span class="sig-paren">)</span> → None<a class="headerlink" href="#M2Crypto.SSL.Context.Context.load_client_ca" title="Permalink to this definition">¶</a></dt>
<dd><p>Load CA certs into the context. These CA certs are sent to the
peer during <em>SSLv3 certificate request</em>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>cafile</strong> – File object containing one or more PEM-encoded CA
certificates concatenated together.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.load_verify_info">
<code class="sig-name descname">load_verify_info</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cafile</span><span class="p">:</span> <span class="n">Optional<span class="p">[</span>AnyStr<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">capath</span><span class="p">:</span> <span class="n">Optional<span class="p">[</span>AnyStr<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em><span class="sig-paren">)</span> → int<a class="headerlink" href="#M2Crypto.SSL.Context.Context.load_verify_info" title="Permalink to this definition">¶</a></dt>
<dd><p>Load CA certs into the context.</p>
<p>These CA certs are used during verification of the peer’s
certificate.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>cafile</strong> – File containing one or more PEM-encoded CA
certificates concatenated together.</p></li>
<li><p><strong>capath</strong> – Directory containing PEM-encoded CA certificates
(one certificate per file).</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><dl class="simple">
<dt>0 if the operation failed because CAfile and CApath are NULL</dt><dd><p>or the processing at one of the locations specified failed.
Check the error stack to find out the reason.</p>
</dd>
</dl>
<p>1 The operation succeeded.</p>
</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.load_verify_locations">
<code class="sig-name descname">load_verify_locations</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cafile</span><span class="p">:</span> <span class="n">Optional<span class="p">[</span>AnyStr<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em>, <em class="sig-param"><span class="n">capath</span><span class="p">:</span> <span class="n">Optional<span class="p">[</span>AnyStr<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em><span class="sig-paren">)</span> → int<a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#Context.load_verify_locations"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.Context.load_verify_locations" title="Permalink to this definition">¶</a></dt>
<dd><p>Load CA certs into the context.</p>
<p>These CA certs are used during verification of the peer’s
certificate.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>cafile</strong> – File containing one or more PEM-encoded CA
certificates concatenated together.</p></li>
<li><p><strong>capath</strong> – Directory containing PEM-encoded CA certificates
(one certificate per file).</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><dl class="simple">
<dt>0 if the operation failed because CAfile and CApath are NULL</dt><dd><p>or the processing at one of the locations specified failed.
Check the error stack to find out the reason.</p>
</dd>
</dl>
<p>1 The operation succeeded.</p>
</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.m2_ssl_ctx_free">
<code class="sig-name descname">m2_ssl_ctx_free</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#M2Crypto.SSL.Context.Context.m2_ssl_ctx_free" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.remove_session">
<code class="sig-name descname">remove_session</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">session</span><span class="p">:</span> <span class="n"><a class="reference internal" href="#M2Crypto.SSL.Session.Session" title="M2Crypto.SSL.Session.Session">M2Crypto.SSL.Session.Session</a></span></em><span class="sig-paren">)</span> → int<a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#Context.remove_session"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.Context.remove_session" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove the session from the context.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>session</strong> – the session to be removed.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><dl class="simple">
<dt>0 The operation failed. The session was not found in</dt><dd><p>the cache.</p>
</dd>
</dl>
<p>1 The operation succeeded.</p>
</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.set_allow_unknown_ca">
<code class="sig-name descname">set_allow_unknown_ca</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">ok</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>int<span class="p">, </span>bool<span class="p">]</span></span></em><span class="sig-paren">)</span> → None<a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#Context.set_allow_unknown_ca"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.Context.set_allow_unknown_ca" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the context to accept/reject a peer certificate if the
certificate’s CA is unknown.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>ok</strong> – True to accept, False to reject.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.set_cipher_list">
<code class="sig-name descname">set_cipher_list</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cipher_list</span><span class="p">:</span> <span class="n">str</span></em><span class="sig-paren">)</span> → int<a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#Context.set_cipher_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.Context.set_cipher_list" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the list of available ciphers.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>cipher_list</strong> – The format of the string is described in
ciphers(1).</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>1 if any cipher could be selected and 0 on complete
failure.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.set_client_CA_list_from_file">
<code class="sig-name descname">set_client_CA_list_from_file</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cafile</span><span class="p">:</span> <span class="n">AnyStr</span></em><span class="sig-paren">)</span> → None<a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#Context.set_client_CA_list_from_file"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.Context.set_client_CA_list_from_file" title="Permalink to this definition">¶</a></dt>
<dd><p>Load CA certs into the context. These CA certs are sent to the
peer during <em>SSLv3 certificate request</em>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>cafile</strong> – File object containing one or more PEM-encoded CA
certificates concatenated together.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.set_default_verify_paths">
<code class="sig-name descname">set_default_verify_paths</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → int<a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#Context.set_default_verify_paths"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.Context.set_default_verify_paths" title="Permalink to this definition">¶</a></dt>
<dd><p>Specifies that the default locations from which CA certs are
loaded should be used.</p>
<p>There is one default directory and one default file. The default
CA certificates directory is called “certs” in the default
OpenSSL directory. Alternatively the SSL_CERT_DIR environment
variable can be defined to override this location. The default
CA certificates file is called “cert.pem” in the default OpenSSL
directory. Alternatively the SSL_CERT_FILE environment variable
can be defined to override this location.</p>
<dl>
<dt>@return 0 if the operation failed. A missing default location is</dt><dd><blockquote>
<div><p>still treated as a success. No error code is set.</p>
</div></blockquote>
<p>1 The operation succeeded.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.set_info_callback">
<code class="sig-name descname">set_info_callback</code><span class="sig-paren">(</span><em class="sig-param">callback: Callable = <function ssl_info_callback></em><span class="sig-paren">)</span> → None<a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#Context.set_info_callback"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.Context.set_info_callback" title="Permalink to this definition">¶</a></dt>
<dd><p>Set a callback function to get state information.</p>
<p>It can be used to get state information about the SSL
connections that are created from this context.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>callback</strong> – Callback function. The default prints
information to stderr.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.set_options">
<code class="sig-name descname">set_options</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">op</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> → int<a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#Context.set_options"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.Context.set_options" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds the options set via bitmask in options to the Context.</p>
<p>!!! Options already set before are not cleared!</p>
<p>The behaviour of the SSL library can be changed by setting
several options. The options are coded as bitmasks and can be
combined by a logical or operation (|).</p>
<p>SSL.Context.set_options() and SSL.set_options() affect the
(external) protocol behaviour of the SSL library. The (internal)
behaviour of the API can be changed by using the similar
SSL.Context.set_mode() and SSL.set_mode() functions.</p>
<p>During a handshake, the option settings of the SSL object are
used. When a new SSL object is created from a context using
SSL(), the current option setting is copied. Changes to ctx
do not affect already created SSL objects. SSL.clear() does not
affect the settings.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>op</strong> – bitmask of additional options specified in
SSL_CTX_set_options(3) manpage.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the new options bitmask after adding options.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.set_session_cache_mode">
<code class="sig-name descname">set_session_cache_mode</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">mode</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> → int<a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#Context.set_session_cache_mode"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.Context.set_session_cache_mode" title="Permalink to this definition">¶</a></dt>
<dd><p>Enables/disables session caching.</p>
<p>The mode is set by using m2.SSL_SESS_CACHE_* constants.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>mode</strong> – new mode value.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the previously set cache mode value.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.set_session_id_ctx">
<code class="sig-name descname">set_session_id_ctx</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">id</span><span class="p">:</span> <span class="n">bytes</span></em><span class="sig-paren">)</span> → None<a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#Context.set_session_id_ctx"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.Context.set_session_id_ctx" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the session id for the SSL.Context w/in a session can be reused.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>id</strong> – Sessions are generated within a certain context. When
exporting/importing sessions with
i2d_SSL_SESSION/d2i_SSL_SESSION it would be possible,
to re-import a session generated from another context
(e.g. another application), which might lead to
malfunctions. Therefore each application must set its
own session id context sid_ctx which is used to
distinguish the contexts and is stored in exported
sessions. The sid_ctx can be any kind of binary data
with a given length, it is therefore possible to use
e.g. the name of the application and/or the hostname
and/or service name.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.set_session_timeout">
<code class="sig-name descname">set_session_timeout</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">timeout</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> → int<a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#Context.set_session_timeout"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.Context.set_session_timeout" title="Permalink to this definition">¶</a></dt>
<dd><p>Set new session timeout.</p>
<p>See self.get_session_timeout() for explanation of the session
timeouts.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>timeout</strong> – new timeout value.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the previously set timeout value.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.set_tmp_dh">
<code class="sig-name descname">set_tmp_dh</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">dhpfile</span><span class="p">:</span> <span class="n">AnyStr</span></em><span class="sig-paren">)</span> → int<a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#Context.set_tmp_dh"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.Context.set_tmp_dh" title="Permalink to this definition">¶</a></dt>
<dd><p>Load ephemeral DH parameters into the context.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>dhpfile</strong> – Filename of the file containing the PEM-encoded
DH parameters.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.set_tmp_dh_callback">
<code class="sig-name descname">set_tmp_dh_callback</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">callback</span><span class="p">:</span> <span class="n">Optional<span class="p">[</span>Callable<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em><span class="sig-paren">)</span> → None<a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#Context.set_tmp_dh_callback"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.Context.set_tmp_dh_callback" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the callback function for SSL.Context.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>callback</strong> – Callable to be used when a DH parameters are required.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.set_tmp_rsa">
<code class="sig-name descname">set_tmp_rsa</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">rsa</span><span class="p">:</span> <span class="n"><a class="reference internal" href="M2Crypto.html#M2Crypto.RSA.RSA" title="M2Crypto.RSA.RSA">M2Crypto.RSA.RSA</a></span></em><span class="sig-paren">)</span> → int<a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#Context.set_tmp_rsa"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.Context.set_tmp_rsa" title="Permalink to this definition">¶</a></dt>
<dd><p>Load ephemeral RSA key into the context.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>rsa</strong> – RSA.RSA instance.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.set_tmp_rsa_callback">
<code class="sig-name descname">set_tmp_rsa_callback</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">callback</span><span class="p">:</span> <span class="n">Optional<span class="p">[</span>Callable<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em><span class="sig-paren">)</span> → None<a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#Context.set_tmp_rsa_callback"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.Context.set_tmp_rsa_callback" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the callback function to be used when
a temporary/ephemeral RSA key is required.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Context.Context.set_verify">
<code class="sig-name descname">set_verify</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">mode</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">depth</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">callback</span><span class="p">:</span> <span class="n">Optional<span class="p">[</span>Callable<span class="p">]</span></span> <span class="o">=</span> <span class="default_value">None</span></em><span class="sig-paren">)</span> → None<a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#Context.set_verify"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.Context.set_verify" title="Permalink to this definition">¶</a></dt>
<dd><p>Set verify options. Most applications will need to call this
method with the right options to make a secure SSL connection.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>mode</strong> – The verification mode to use. Typically at least
SSL.verify_peer is used. Clients would also typically
add SSL.verify_fail_if_no_peer_cert.</p></li>
<li><p><strong>depth</strong> – The maximum allowed depth of the certificate chain
returned by the peer.</p></li>
<li><p><strong>callback</strong> – Callable that can be used to specify custom
verification checks.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="py function">
<dt id="M2Crypto.SSL.Context.ctxmap">
<code class="sig-prename descclassname">M2Crypto.SSL.Context.</code><code class="sig-name descname">ctxmap</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → M2Crypto.SSL.Context._ctxmap<a class="reference internal" href="_modules/M2Crypto/SSL/Context.html#ctxmap"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Context.ctxmap" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py function">
<dt id="M2Crypto.SSL.Context.map">
<code class="sig-prename descclassname">M2Crypto.SSL.Context.</code><code class="sig-name descname">map</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → M2Crypto.SSL.Context._ctxmap<a class="headerlink" href="#M2Crypto.SSL.Context.map" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</div>
<div class="section" id="module-M2Crypto.SSL.SSLServer">
<span id="sslserver-module"></span><h2><code class="xref py py-mod docutils literal notranslate"><span class="pre">SSLServer</span></code> Module<a class="headerlink" href="#module-M2Crypto.SSL.SSLServer" title="Permalink to this headline">¶</a></h2>
<dl class="py class">
<dt id="M2Crypto.SSL.SSLServer.ForkingSSLServer">
<em class="property">class </em><code class="sig-prename descclassname">M2Crypto.SSL.SSLServer.</code><code class="sig-name descname">ForkingSSLServer</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">server_address</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>Tuple<span class="p">[</span>str<span class="p">, </span>int<span class="p">]</span><span class="p">, </span>str<span class="p">]</span></span></em>, <em class="sig-param"><span class="n">RequestHandlerClass</span><span class="p">:</span> <span class="n">socketserver.BaseRequestHandler</span></em>, <em class="sig-param"><span class="n">ssl_context</span><span class="p">:</span> <span class="n"><a class="reference internal" href="#M2Crypto.SSL.Context.Context" title="M2Crypto.SSL.Context.Context">M2Crypto.SSL.Context.Context</a></span></em>, <em class="sig-param"><span class="n">bind_and_activate</span><span class="p">:</span> <span class="n">bool</span> <span class="o">=</span> <span class="default_value">True</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/M2Crypto/SSL/SSLServer.html#ForkingSSLServer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.SSLServer.ForkingSSLServer" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">socketserver.ForkingMixIn</span></code>, <a class="reference internal" href="#M2Crypto.SSL.SSLServer.SSLServer" title="M2Crypto.SSL.SSLServer.SSLServer"><code class="xref py py-class docutils literal notranslate"><span class="pre">M2Crypto.SSL.SSLServer.SSLServer</span></code></a></p>
</dd></dl>
<dl class="py class">
<dt id="M2Crypto.SSL.SSLServer.SSLServer">
<em class="property">class </em><code class="sig-prename descclassname">M2Crypto.SSL.SSLServer.</code><code class="sig-name descname">SSLServer</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">server_address</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>Tuple<span class="p">[</span>str<span class="p">, </span>int<span class="p">]</span><span class="p">, </span>str<span class="p">]</span></span></em>, <em class="sig-param"><span class="n">RequestHandlerClass</span><span class="p">:</span> <span class="n">socketserver.BaseRequestHandler</span></em>, <em class="sig-param"><span class="n">ssl_context</span><span class="p">:</span> <span class="n"><a class="reference internal" href="#M2Crypto.SSL.Context.Context" title="M2Crypto.SSL.Context.Context">M2Crypto.SSL.Context.Context</a></span></em>, <em class="sig-param"><span class="n">bind_and_activate</span><span class="p">:</span> <span class="n">bool</span> <span class="o">=</span> <span class="default_value">True</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/M2Crypto/SSL/SSLServer.html#SSLServer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.SSLServer.SSLServer" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">socketserver.TCPServer</span></code></p>
<dl class="py method">
<dt id="M2Crypto.SSL.SSLServer.SSLServer.handle_error">
<code class="sig-name descname">handle_error</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">request</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>socket.socket<span class="p">, </span><a class="reference internal" href="#M2Crypto.SSL.Connection.Connection" title="M2Crypto.SSL.Connection.Connection">M2Crypto.SSL.Connection.Connection</a><span class="p">]</span></span></em>, <em class="sig-param"><span class="n">client_address</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>Tuple<span class="p">[</span>str<span class="p">, </span>int<span class="p">]</span><span class="p">, </span>str<span class="p">]</span></span></em><span class="sig-paren">)</span> → None<a class="reference internal" href="_modules/M2Crypto/SSL/SSLServer.html#SSLServer.handle_error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.SSLServer.SSLServer.handle_error" title="Permalink to this definition">¶</a></dt>
<dd><p>Handle an error gracefully. May be overridden.</p>
<p>The default is to print a traceback and continue.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.SSLServer.SSLServer.handle_request">
<code class="sig-name descname">handle_request</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → None<a class="reference internal" href="_modules/M2Crypto/SSL/SSLServer.html#SSLServer.handle_request"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.SSLServer.SSLServer.handle_request" title="Permalink to this definition">¶</a></dt>
<dd><p>Handle one request, possibly blocking.</p>
<p>Respects self.timeout.</p>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt id="M2Crypto.SSL.SSLServer.ThreadingSSLServer">
<em class="property">class </em><code class="sig-prename descclassname">M2Crypto.SSL.SSLServer.</code><code class="sig-name descname">ThreadingSSLServer</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">server_address</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>Tuple<span class="p">[</span>str<span class="p">, </span>int<span class="p">]</span><span class="p">, </span>str<span class="p">]</span></span></em>, <em class="sig-param"><span class="n">RequestHandlerClass</span><span class="p">:</span> <span class="n">socketserver.BaseRequestHandler</span></em>, <em class="sig-param"><span class="n">ssl_context</span><span class="p">:</span> <span class="n"><a class="reference internal" href="#M2Crypto.SSL.Context.Context" title="M2Crypto.SSL.Context.Context">M2Crypto.SSL.Context.Context</a></span></em>, <em class="sig-param"><span class="n">bind_and_activate</span><span class="p">:</span> <span class="n">bool</span> <span class="o">=</span> <span class="default_value">True</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/M2Crypto/SSL/SSLServer.html#ThreadingSSLServer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.SSLServer.ThreadingSSLServer" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">socketserver.ThreadingMixIn</span></code>, <a class="reference internal" href="#M2Crypto.SSL.SSLServer.SSLServer" title="M2Crypto.SSL.SSLServer.SSLServer"><code class="xref py py-class docutils literal notranslate"><span class="pre">M2Crypto.SSL.SSLServer.SSLServer</span></code></a></p>
</dd></dl>
</div>
<div class="section" id="module-M2Crypto.SSL.Session">
<span id="session-module"></span><h2><code class="xref py py-mod docutils literal notranslate"><span class="pre">Session</span></code> Module<a class="headerlink" href="#module-M2Crypto.SSL.Session" title="Permalink to this headline">¶</a></h2>
<p>SSL Session</p>
<p>Copyright (c) 1999-2003 Ng Pheng Siong. All rights reserved.</p>
<dl class="py class">
<dt id="M2Crypto.SSL.Session.Session">
<em class="property">class </em><code class="sig-prename descclassname">M2Crypto.SSL.Session.</code><code class="sig-name descname">Session</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">session</span><span class="p">:</span> <span class="n">bytes</span></em>, <em class="sig-param"><span class="n">_pyfree</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/M2Crypto/SSL/Session.html#Session"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Session.Session" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<dl class="py method">
<dt id="M2Crypto.SSL.Session.Session.as_der">
<code class="sig-name descname">as_der</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → bytes<a class="reference internal" href="_modules/M2Crypto/SSL/Session.html#Session.as_der"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Session.Session.as_der" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Session.Session.as_text">
<code class="sig-name descname">as_text</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → bytes<a class="reference internal" href="_modules/M2Crypto/SSL/Session.html#Session.as_text"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Session.Session.as_text" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Session.Session.get_time">
<code class="sig-name descname">get_time</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → int<a class="reference internal" href="_modules/M2Crypto/SSL/Session.html#Session.get_time"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Session.Session.get_time" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Session.Session.get_timeout">
<code class="sig-name descname">get_timeout</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → int<a class="reference internal" href="_modules/M2Crypto/SSL/Session.html#Session.get_timeout"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Session.Session.get_timeout" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Session.Session.m2_ssl_session_free">
<code class="sig-name descname">m2_ssl_session_free</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#M2Crypto.SSL.Session.Session.m2_ssl_session_free" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Session.Session.set_time">
<code class="sig-name descname">set_time</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">t</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> → int<a class="reference internal" href="_modules/M2Crypto/SSL/Session.html#Session.set_time"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Session.Session.set_time" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Session.Session.set_timeout">
<code class="sig-name descname">set_timeout</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">t</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> → int<a class="reference internal" href="_modules/M2Crypto/SSL/Session.html#Session.set_timeout"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Session.Session.set_timeout" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.Session.Session.write_bio">
<code class="sig-name descname">write_bio</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">bio</span><span class="p">:</span> <span class="n"><a class="reference internal" href="M2Crypto.html#M2Crypto.BIO.BIO" title="M2Crypto.BIO.BIO">M2Crypto.BIO.BIO</a></span></em><span class="sig-paren">)</span> → int<a class="reference internal" href="_modules/M2Crypto/SSL/Session.html#Session.write_bio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Session.Session.write_bio" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="py function">
<dt id="M2Crypto.SSL.Session.load_session">
<code class="sig-prename descclassname">M2Crypto.SSL.Session.</code><code class="sig-name descname">load_session</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">pemfile</span><span class="p">:</span> <span class="n">AnyStr</span></em><span class="sig-paren">)</span> → <a class="reference internal" href="#M2Crypto.SSL.Session.Session" title="M2Crypto.SSL.Session.Session">M2Crypto.SSL.Session.Session</a><a class="reference internal" href="_modules/M2Crypto/SSL/Session.html#load_session"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.Session.load_session" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</div>
<div class="section" id="module-M2Crypto.SSL.TwistedProtocolWrapper">
<span id="twistedprotocolwrapper-module"></span><h2><code class="xref py py-mod docutils literal notranslate"><span class="pre">TwistedProtocolWrapper</span></code> Module<a class="headerlink" href="#module-M2Crypto.SSL.TwistedProtocolWrapper" title="Permalink to this headline">¶</a></h2>
<p>Make Twisted use M2Crypto for SSL</p>
<p>Copyright (c) 2004-2007 Open Source Applications Foundation.
All rights reserved.</p>
<p>FIXME THIS HAS NOT BEEN FINISHED. NEITHER PEP484 NOR PORT PYTHON3 HAS
BEEN FINISHED. THE FURTHER WORK WILL BE DONE WHEN THE STATUS OF TWISTED
IN THE PYTHON 3 (AND ASYNCIO) WORLD WILL BE CLEAR.</p>
<dl class="py class">
<dt id="M2Crypto.SSL.TwistedProtocolWrapper.TLSProtocolWrapper">
<em class="property">class </em><code class="sig-prename descclassname">M2Crypto.SSL.TwistedProtocolWrapper.</code><code class="sig-name descname">TLSProtocolWrapper</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">factory</span><span class="p">:</span> <span class="n">twisted.protocols.policies.WrappingFactory</span></em>, <em class="sig-param"><span class="n">wrappedProtocol</span><span class="p">:</span> <span class="n">object</span></em>, <em class="sig-param"><span class="n">startPassThrough</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">client</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">contextFactory</span><span class="p">:</span> <span class="n">object</span></em>, <em class="sig-param"><span class="n">postConnectionCheck</span><span class="p">:</span> <span class="n"><a class="reference internal" href="#M2Crypto.SSL.Checker.Checker" title="M2Crypto.SSL.Checker.Checker">M2Crypto.SSL.Checker.Checker</a></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/M2Crypto/SSL/TwistedProtocolWrapper.html#TLSProtocolWrapper"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.TwistedProtocolWrapper.TLSProtocolWrapper" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">twisted.protocols.policies.ProtocolWrapper</span></code></p>
<p>A SSL/TLS protocol wrapper to be used with Twisted. Typically
you would not use this class directly. Use connectTCP,
connectSSL, listenTCP, listenSSL functions defined above,
which will hook in this class.</p>
<dl class="py method">
<dt id="M2Crypto.SSL.TwistedProtocolWrapper.TLSProtocolWrapper.clear">
<code class="sig-name descname">clear</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/M2Crypto/SSL/TwistedProtocolWrapper.html#TLSProtocolWrapper.clear"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.TwistedProtocolWrapper.TLSProtocolWrapper.clear" title="Permalink to this definition">¶</a></dt>
<dd><p>Clear this instance, after which it is ready for reuse.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.TwistedProtocolWrapper.TLSProtocolWrapper.connectionLost">
<code class="sig-name descname">connectionLost</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">reason</span><span class="p">:</span> <span class="n">AnyStr</span></em><span class="sig-paren">)</span> → None<a class="reference internal" href="_modules/M2Crypto/SSL/TwistedProtocolWrapper.html#TLSProtocolWrapper.connectionLost"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.TwistedProtocolWrapper.TLSProtocolWrapper.connectionLost" title="Permalink to this definition">¶</a></dt>
<dd><p>Called when the connection is shut down.</p>
<p>Clear any circular references here, and any external references
to this Protocol. The connection has been closed.</p>
<p>@type reason: L{twisted.python.failure.Failure}</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.TwistedProtocolWrapper.TLSProtocolWrapper.connectionMade">
<code class="sig-name descname">connectionMade</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/M2Crypto/SSL/TwistedProtocolWrapper.html#TLSProtocolWrapper.connectionMade"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.TwistedProtocolWrapper.TLSProtocolWrapper.connectionMade" title="Permalink to this definition">¶</a></dt>
<dd><p>Called when a connection is made.</p>
<p>This may be considered the initializer of the protocol, because
it is called when the connection is completed. For clients,
this is called once the connection to the server has been
established; for servers, this is called after an accept() call
stops blocking and a socket has been received. If you need to
send any greeting or initial message, do it here.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.TwistedProtocolWrapper.TLSProtocolWrapper.dataReceived">
<code class="sig-name descname">dataReceived</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span><span class="p">:</span> <span class="n">bytes</span></em><span class="sig-paren">)</span> → None<a class="reference internal" href="_modules/M2Crypto/SSL/TwistedProtocolWrapper.html#TLSProtocolWrapper.dataReceived"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.TwistedProtocolWrapper.TLSProtocolWrapper.dataReceived" title="Permalink to this definition">¶</a></dt>
<dd><p>Called whenever data is received.</p>
<p>Use this method to translate to a higher-level message. Usually, some
callback will be made upon the receipt of each complete protocol
message.</p>
<dl class="simple">
<dt>@param data: a string of indeterminate length. Please keep in mind</dt><dd><p>that you will probably need to buffer some data, as partial
(or multiple) protocol messages may be received! I recommend
that unit tests for protocols call through to this method with
differing chunk sizes, down to one byte at a time.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.TwistedProtocolWrapper.TLSProtocolWrapper.loseConnection">
<code class="sig-name descname">loseConnection</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/M2Crypto/SSL/TwistedProtocolWrapper.html#TLSProtocolWrapper.loseConnection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.TwistedProtocolWrapper.TLSProtocolWrapper.loseConnection" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.TwistedProtocolWrapper.TLSProtocolWrapper.startTLS">
<code class="sig-name descname">startTLS</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">ctx</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/M2Crypto/SSL/TwistedProtocolWrapper.html#TLSProtocolWrapper.startTLS"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.TwistedProtocolWrapper.TLSProtocolWrapper.startTLS" title="Permalink to this definition">¶</a></dt>
<dd><p>Start SSL/TLS. If this is not called, this instance just passes data
through untouched.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.TwistedProtocolWrapper.TLSProtocolWrapper.write">
<code class="sig-name descname">write</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span><span class="p">:</span> <span class="n">bytes</span></em><span class="sig-paren">)</span> → None<a class="reference internal" href="_modules/M2Crypto/SSL/TwistedProtocolWrapper.html#TLSProtocolWrapper.write"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.TwistedProtocolWrapper.TLSProtocolWrapper.write" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.TwistedProtocolWrapper.TLSProtocolWrapper.writeSequence">
<code class="sig-name descname">writeSequence</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span><span class="p">:</span> <span class="n">Iterable<span class="p">[</span>bytes<span class="p">]</span></span></em><span class="sig-paren">)</span> → None<a class="reference internal" href="_modules/M2Crypto/SSL/TwistedProtocolWrapper.html#TLSProtocolWrapper.writeSequence"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.TwistedProtocolWrapper.TLSProtocolWrapper.writeSequence" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="py function">
<dt id="M2Crypto.SSL.TwistedProtocolWrapper.connectSSL">
<code class="sig-prename descclassname">M2Crypto.SSL.TwistedProtocolWrapper.</code><code class="sig-name descname">connectSSL</code><span class="sig-paren">(</span><em class="sig-param">host: str</em>, <em class="sig-param">port: int</em>, <em class="sig-param">factory: object</em>, <em class="sig-param">contextFactory: object</em>, <em class="sig-param">timeout: int = 30</em>, <em class="sig-param">bindAddress: Optional[str] = None</em>, <em class="sig-param">reactor: twisted.internet.reactor = <twisted.internet.epollreactor.EPollReactor object></em>, <em class="sig-param">postConnectionCheck: Checker = <M2Crypto.SSL.Checker.Checker object></em><span class="sig-paren">)</span> → reactor.connectTCP<a class="reference internal" href="_modules/M2Crypto/SSL/TwistedProtocolWrapper.html#connectSSL"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.TwistedProtocolWrapper.connectSSL" title="Permalink to this definition">¶</a></dt>
<dd><p>A convenience function to start an SSL/TLS connection using Twisted.</p>
<p>See IReactorSSL interface in Twisted.</p>
</dd></dl>
<dl class="py function">
<dt id="M2Crypto.SSL.TwistedProtocolWrapper.connectTCP">
<code class="sig-prename descclassname">M2Crypto.SSL.TwistedProtocolWrapper.</code><code class="sig-name descname">connectTCP</code><span class="sig-paren">(</span><em class="sig-param">host: str, port: int, factory: object, timeout: int = 30, bindAddress: Optional[Union[Tuple[str, int], str]] = None, reactor: object = <twisted.internet.epollreactor.EPollReactor object>, postConnectionCheck: Callable = <M2Crypto.SSL.Checker.Checker object></em><span class="sig-paren">)</span> → object<a class="reference internal" href="_modules/M2Crypto/SSL/TwistedProtocolWrapper.html#connectTCP"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.TwistedProtocolWrapper.connectTCP" title="Permalink to this definition">¶</a></dt>
<dd><p>A convenience function to start a TCP connection using Twisted.</p>
<p>NOTE: You must call startTLS(ctx) to go into SSL/TLS mode.</p>
<p>See IReactorTCP interface in Twisted.</p>
</dd></dl>
<dl class="py function">
<dt id="M2Crypto.SSL.TwistedProtocolWrapper.listenSSL">
<code class="sig-prename descclassname">M2Crypto.SSL.TwistedProtocolWrapper.</code><code class="sig-name descname">listenSSL</code><span class="sig-paren">(</span><em class="sig-param">port</em>, <em class="sig-param">factory</em>, <em class="sig-param">contextFactory</em>, <em class="sig-param">backlog=5</em>, <em class="sig-param">interface=''</em>, <em class="sig-param">reactor=<twisted.internet.epollreactor.EPollReactor object></em>, <em class="sig-param">postConnectionCheck=<function _alwaysSucceedsPostConnectionCheck></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/M2Crypto/SSL/TwistedProtocolWrapper.html#listenSSL"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.TwistedProtocolWrapper.listenSSL" title="Permalink to this definition">¶</a></dt>
<dd><p>A convenience function to listen for SSL/TLS connections using Twisted.</p>
<p>See IReactorSSL interface in Twisted.</p>
</dd></dl>
<dl class="py function">
<dt id="M2Crypto.SSL.TwistedProtocolWrapper.listenTCP">
<code class="sig-prename descclassname">M2Crypto.SSL.TwistedProtocolWrapper.</code><code class="sig-name descname">listenTCP</code><span class="sig-paren">(</span><em class="sig-param">port</em>, <em class="sig-param">factory</em>, <em class="sig-param">backlog=5</em>, <em class="sig-param">interface=''</em>, <em class="sig-param">reactor=<twisted.internet.epollreactor.EPollReactor object></em>, <em class="sig-param">postConnectionCheck=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/M2Crypto/SSL/TwistedProtocolWrapper.html#listenTCP"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.TwistedProtocolWrapper.listenTCP" title="Permalink to this definition">¶</a></dt>
<dd><p>A convenience function to listen for TCP connections using Twisted.</p>
<p>NOTE: You must call startTLS(ctx) to go into SSL/TLS mode.</p>
<p>See IReactorTCP interface in Twisted.</p>
</dd></dl>
</div>
<div class="section" id="module-M2Crypto.SSL.cb">
<span id="cb-module"></span><h2><code class="xref py py-mod docutils literal notranslate"><span class="pre">cb</span></code> Module<a class="headerlink" href="#module-M2Crypto.SSL.cb" title="Permalink to this headline">¶</a></h2>
<dl class="py function">
<dt id="M2Crypto.SSL.cb.ssl_info_callback">
<code class="sig-prename descclassname">M2Crypto.SSL.cb.</code><code class="sig-name descname">ssl_info_callback</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">where</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">ret</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">ssl_ptr</span><span class="p">:</span> <span class="n">bytes</span></em><span class="sig-paren">)</span> → None<a class="reference internal" href="_modules/M2Crypto/SSL/cb.html#ssl_info_callback"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.cb.ssl_info_callback" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py function">
<dt id="M2Crypto.SSL.cb.ssl_verify_callback">
<code class="sig-prename descclassname">M2Crypto.SSL.cb.</code><code class="sig-name descname">ssl_verify_callback</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">ssl_ctx_ptr</span><span class="p">:</span> <span class="n">bytes</span></em>, <em class="sig-param"><span class="n">x509_ptr</span><span class="p">:</span> <span class="n">bytes</span></em>, <em class="sig-param"><span class="n">errnum</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">errdepth</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">ok</span><span class="p">:</span> <span class="n">int</span></em><span class="sig-paren">)</span> → int<a class="reference internal" href="_modules/M2Crypto/SSL/cb.html#ssl_verify_callback"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.cb.ssl_verify_callback" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py function">
<dt id="M2Crypto.SSL.cb.ssl_verify_callback_allow_unknown_ca">
<code class="sig-prename descclassname">M2Crypto.SSL.cb.</code><code class="sig-name descname">ssl_verify_callback_allow_unknown_ca</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">ok</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">store</span><span class="p">:</span> <span class="n">Any</span></em><span class="sig-paren">)</span> → int<a class="reference internal" href="_modules/M2Crypto/SSL/cb.html#ssl_verify_callback_allow_unknown_ca"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.cb.ssl_verify_callback_allow_unknown_ca" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py function">
<dt id="M2Crypto.SSL.cb.ssl_verify_callback_stub">
<code class="sig-prename descclassname">M2Crypto.SSL.cb.</code><code class="sig-name descname">ssl_verify_callback_stub</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">ssl_ctx_ptr</span></em>, <em class="sig-param"><span class="n">x509_ptr</span></em>, <em class="sig-param"><span class="n">errnum</span></em>, <em class="sig-param"><span class="n">errdepth</span></em>, <em class="sig-param"><span class="n">ok</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/M2Crypto/SSL/cb.html#ssl_verify_callback_stub"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.cb.ssl_verify_callback_stub" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</div>
<div class="section" id="module-M2Crypto.SSL.ssl_dispatcher">
<span id="ssl-dispatcher-module"></span><h2><code class="xref py py-mod docutils literal notranslate"><span class="pre">ssl_dispatcher</span></code> Module<a class="headerlink" href="#module-M2Crypto.SSL.ssl_dispatcher" title="Permalink to this headline">¶</a></h2>
<dl class="py class">
<dt id="M2Crypto.SSL.ssl_dispatcher.ssl_dispatcher">
<em class="property">class </em><code class="sig-prename descclassname">M2Crypto.SSL.ssl_dispatcher.</code><code class="sig-name descname">ssl_dispatcher</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">sock</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">map</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/M2Crypto/SSL/ssl_dispatcher.html#ssl_dispatcher"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.ssl_dispatcher.ssl_dispatcher" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">asyncore.dispatcher</span></code></p>
<dl class="py method">
<dt id="M2Crypto.SSL.ssl_dispatcher.ssl_dispatcher.connect">
<code class="sig-name descname">connect</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">addr</span><span class="p">:</span> <span class="n">Union<span class="p">[</span>Tuple<span class="p">[</span>str<span class="p">, </span>int<span class="p">]</span><span class="p">, </span>str<span class="p">]</span></span></em><span class="sig-paren">)</span> → None<a class="reference internal" href="_modules/M2Crypto/SSL/ssl_dispatcher.html#ssl_dispatcher.connect"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.ssl_dispatcher.ssl_dispatcher.connect" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.ssl_dispatcher.ssl_dispatcher.create_socket">
<code class="sig-name descname">create_socket</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">ssl_context</span><span class="p">:</span> <span class="n"><a class="reference internal" href="#M2Crypto.SSL.Context.Context" title="M2Crypto.SSL.Context.Context">M2Crypto.SSL.Context.Context</a></span></em><span class="sig-paren">)</span> → None<a class="reference internal" href="_modules/M2Crypto/SSL/ssl_dispatcher.html#ssl_dispatcher.create_socket"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.ssl_dispatcher.ssl_dispatcher.create_socket" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.ssl_dispatcher.ssl_dispatcher.recv">
<code class="sig-name descname">recv</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">buffer_size</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">4096</span></em><span class="sig-paren">)</span> → bytes<a class="reference internal" href="_modules/M2Crypto/SSL/ssl_dispatcher.html#ssl_dispatcher.recv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.ssl_dispatcher.ssl_dispatcher.recv" title="Permalink to this definition">¶</a></dt>
<dd><p>Receive data over SSL.</p>
</dd></dl>
<dl class="py method">
<dt id="M2Crypto.SSL.ssl_dispatcher.ssl_dispatcher.send">
<code class="sig-name descname">send</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">buffer</span><span class="p">:</span> <span class="n">bytes</span></em><span class="sig-paren">)</span> → int<a class="reference internal" href="_modules/M2Crypto/SSL/ssl_dispatcher.html#ssl_dispatcher.send"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.ssl_dispatcher.ssl_dispatcher.send" title="Permalink to this definition">¶</a></dt>
<dd><p>Send data over SSL.</p>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-M2Crypto.SSL.timeout">
<span id="timeout-module"></span><h2><code class="xref py py-mod docutils literal notranslate"><span class="pre">timeout</span></code> Module<a class="headerlink" href="#module-M2Crypto.SSL.timeout" title="Permalink to this headline">¶</a></h2>
<p>Support for SSL socket timeouts.</p>
<p>Copyright (c) 1999-2003 Ng Pheng Siong. All rights reserved.</p>
<p>Copyright 2008 Heikki Toivonen. All rights reserved.</p>
<dl class="py function">
<dt id="M2Crypto.SSL.timeout.struct_size">
<code class="sig-prename descclassname">M2Crypto.SSL.timeout.</code><code class="sig-name descname">struct_size</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → int<a class="reference internal" href="_modules/M2Crypto/SSL/timeout.html#struct_size"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.timeout.struct_size" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py function">
<dt id="M2Crypto.SSL.timeout.struct_to_timeout">
<code class="sig-prename descclassname">M2Crypto.SSL.timeout.</code><code class="sig-name descname">struct_to_timeout</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">binstr</span><span class="p">:</span> <span class="n">bytes</span></em><span class="sig-paren">)</span> → <a class="reference internal" href="#M2Crypto.SSL.timeout.timeout" title="M2Crypto.SSL.timeout.timeout">M2Crypto.SSL.timeout.timeout</a><a class="reference internal" href="_modules/M2Crypto/SSL/timeout.html#struct_to_timeout"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.timeout.struct_to_timeout" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="py class">
<dt id="M2Crypto.SSL.timeout.timeout">
<em class="property">class </em><code class="sig-prename descclassname">M2Crypto.SSL.timeout.</code><code class="sig-name descname">timeout</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">sec</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">600</span></em>, <em class="sig-param"><span class="n">microsec</span><span class="p">:</span> <span class="n">int</span> <span class="o">=</span> <span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/M2Crypto/SSL/timeout.html#timeout"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.timeout.timeout" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<dl class="py method">
<dt id="M2Crypto.SSL.timeout.timeout.pack">
<code class="sig-name descname">pack</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/M2Crypto/SSL/timeout.html#timeout.pack"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#M2Crypto.SSL.timeout.timeout.pack" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="index.html">M2Crypto</a></h1>
<h3>Navigation</h3>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="M2Crypto.html">M2Crypto Package</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="M2Crypto.html#id1"><code class="xref py py-mod docutils literal notranslate"><span class="pre">M2Crypto</span></code> Package</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2Crypto.html#module-M2Crypto.ASN1"><code class="xref py py-mod docutils literal notranslate"><span class="pre">ASN1</span></code> Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2Crypto.html#module-M2Crypto.AuthCookie"><code class="xref py py-mod docutils literal notranslate"><span class="pre">AuthCookie</span></code> Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2Crypto.html#module-M2Crypto.BIO"><code class="xref py py-mod docutils literal notranslate"><span class="pre">BIO</span></code> Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2Crypto.html#module-M2Crypto.BN"><code class="xref py py-mod docutils literal notranslate"><span class="pre">BN</span></code> Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2Crypto.html#module-M2Crypto.DH"><code class="xref py py-mod docutils literal notranslate"><span class="pre">DH</span></code> Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2Crypto.html#module-M2Crypto.DSA"><code class="xref py py-mod docutils literal notranslate"><span class="pre">DSA</span></code> Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2Crypto.html#module-M2Crypto.EC"><code class="xref py py-mod docutils literal notranslate"><span class="pre">EC</span></code> Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2Crypto.html#module-M2Crypto.EVP"><code class="xref py py-mod docutils literal notranslate"><span class="pre">EVP</span></code> Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2Crypto.html#module-M2Crypto.Engine"><code class="xref py py-mod docutils literal notranslate"><span class="pre">Engine</span></code> Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2Crypto.html#module-M2Crypto.Err"><code class="xref py py-mod docutils literal notranslate"><span class="pre">Err</span></code> Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2Crypto.html#module-M2Crypto.RC4"><code class="xref py py-mod docutils literal notranslate"><span class="pre">RC4</span></code> Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2Crypto.html#module-M2Crypto.RSA"><code class="xref py py-mod docutils literal notranslate"><span class="pre">RSA</span></code> Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2Crypto.html#module-M2Crypto.Rand"><code class="xref py py-mod docutils literal notranslate"><span class="pre">Rand</span></code> Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2Crypto.html#module-M2Crypto.SMIME"><code class="xref py py-mod docutils literal notranslate"><span class="pre">SMIME</span></code> Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2Crypto.html#module-M2Crypto.X509"><code class="xref py py-mod docutils literal notranslate"><span class="pre">X509</span></code> Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2Crypto.html#module-M2Crypto.callback"><code class="xref py py-mod docutils literal notranslate"><span class="pre">callback</span></code> Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2Crypto.html#module-M2Crypto.ftpslib"><code class="xref py py-mod docutils literal notranslate"><span class="pre">ftpslib</span></code> Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2Crypto.html#module-M2Crypto.httpslib"><code class="xref py py-mod docutils literal notranslate"><span class="pre">httpslib</span></code> Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2Crypto.html#module-M2Crypto.m2"><code class="xref py py-mod docutils literal notranslate"><span class="pre">m2</span></code> Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2Crypto.html#module-M2Crypto.m2crypto"><code class="xref py py-mod docutils literal notranslate"><span class="pre">m2crypto</span></code> Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2Crypto.html#module-M2Crypto.m2urllib"><code class="xref py py-mod docutils literal notranslate"><span class="pre">m2urllib</span></code> Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2Crypto.html#module-M2Crypto.m2urllib2"><code class="xref py py-mod docutils literal notranslate"><span class="pre">m2urllib2</span></code> Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2Crypto.html#module-M2Crypto.m2xmlrpclib"><code class="xref py py-mod docutils literal notranslate"><span class="pre">m2xmlrpclib</span></code> Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2Crypto.html#module-M2Crypto.threading"><code class="xref py py-mod docutils literal notranslate"><span class="pre">threading</span></code> Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="M2Crypto.html#module-M2Crypto.util"><code class="xref py py-mod docutils literal notranslate"><span class="pre">util</span></code> Module</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="M2Crypto.html#subpackages">Subpackages</a><ul class="current">
<li class="toctree-l3 current"><a class="current reference internal" href="#">SSL Package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#id1"><code class="xref py py-mod docutils literal notranslate"><span class="pre">SSL</span></code> Package</a></li>
<li class="toctree-l4"><a class="reference internal" href="#module-M2Crypto.SSL.Checker"><code class="xref py py-mod docutils literal notranslate"><span class="pre">Checker</span></code> Module</a></li>
<li class="toctree-l4"><a class="reference internal" href="#module-M2Crypto.SSL.Cipher"><code class="xref py py-mod docutils literal notranslate"><span class="pre">Cipher</span></code> Module</a></li>
<li class="toctree-l4"><a class="reference internal" href="#module-M2Crypto.SSL.Connection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">Connection</span></code> Module</a></li>
<li class="toctree-l4"><a class="reference internal" href="#module-M2Crypto.SSL.Context"><code class="xref py py-mod docutils literal notranslate"><span class="pre">Context</span></code> Module</a></li>
<li class="toctree-l4"><a class="reference internal" href="#module-M2Crypto.SSL.SSLServer"><code class="xref py py-mod docutils literal notranslate"><span class="pre">SSLServer</span></code> Module</a></li>
<li class="toctree-l4"><a class="reference internal" href="#module-M2Crypto.SSL.Session"><code class="xref py py-mod docutils literal notranslate"><span class="pre">Session</span></code> Module</a></li>
<li class="toctree-l4"><a class="reference internal" href="#module-M2Crypto.SSL.TwistedProtocolWrapper"><code class="xref py py-mod docutils literal notranslate"><span class="pre">TwistedProtocolWrapper</span></code> Module</a></li>
<li class="toctree-l4"><a class="reference internal" href="#module-M2Crypto.SSL.cb"><code class="xref py py-mod docutils literal notranslate"><span class="pre">cb</span></code> Module</a></li>
<li class="toctree-l4"><a class="reference internal" href="#module-M2Crypto.SSL.ssl_dispatcher"><code class="xref py py-mod docutils literal notranslate"><span class="pre">ssl_dispatcher</span></code> Module</a></li>
<li class="toctree-l4"><a class="reference internal" href="#module-M2Crypto.SSL.timeout"><code class="xref py py-mod docutils literal notranslate"><span class="pre">timeout</span></code> Module</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li><a href="M2Crypto.html">M2Crypto Package</a><ul>
<li>Previous: <a href="M2Crypto.html" title="previous chapter">M2Crypto Package</a></li>
</ul></li>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
©2017, Matej Cepl <mcepl@cepl.eu>.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.2.1</a>
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|
<a href="_sources/M2Crypto.SSL.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>
|