summaryrefslogtreecommitdiffstats
path: root/devel/tcltls/files/patch-protocols
blob: 9345db293ae39d8237a47e938f08ad939c5043db (plain)
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
--- tls.c	2014-12-08 14:10:28.000000000 -0500
+++ tls.c	2015-03-25 19:37:53.000000000 -0400
@@ -538,5 +538,5 @@
     case TLS_SSL2:
 #if defined(NO_SSL2)
-		Tcl_AppendResult(interp, "protocol not supported", NULL);
+		Tcl_AppendResult(interp, protocols[index], ": protocol not supported", NULL);
 		return TCL_ERROR;
 #else
@@ -545,5 +545,5 @@
     case TLS_SSL3:
 #if defined(NO_SSL3)
-		Tcl_AppendResult(interp, "protocol not supported", NULL);
+		Tcl_AppendResult(interp, protocols[index], ": protocol not supported", NULL);
 		return TCL_ERROR;
 #else
@@ -552,5 +552,5 @@
     case TLS_TLS1:
 #if defined(NO_TLS1)
-		Tcl_AppendResult(interp, "protocol not supported", NULL);
+		Tcl_AppendResult(interp, protocols[index], ": protocol not supported", NULL);
 		return TCL_ERROR;
 #else
@@ -559,5 +559,5 @@
     case TLS_TLS1_1:
 #if defined(NO_TLS1_1)
-		Tcl_AppendResult(interp, "protocol not supported", NULL);
+		Tcl_AppendResult(interp, protocols[index], ": protocol not supported", NULL);
 		return TCL_ERROR;
 #else
@@ -566,5 +566,5 @@
     case TLS_TLS1_2:
 #if defined(NO_TLS1_2)
-		Tcl_AppendResult(interp, "protocol not supported", NULL);
+		Tcl_AppendResult(interp, protocols[index], ": protocol not supported", NULL);
 		return TCL_ERROR;
 #else
@@ -575,10 +575,10 @@
     }
     if (ctx == NULL) {
-	Tcl_AppendResult(interp, REASON(), (char *) NULL);
+	Tcl_AppendResult(interp, REASON(), NULL);
 	return TCL_ERROR;
     }
     ssl = SSL_new(ctx);
     if (ssl == NULL) {
-	Tcl_AppendResult(interp, REASON(), (char *) NULL);
+	Tcl_AppendResult(interp, REASON(), NULL);
 	SSL_CTX_free(ctx);
 	return TCL_ERROR;
@@ -747,6 +747,18 @@
 #endif
     int tls1 = 1;
-    int tls1_1 = 1;
-    int tls1_2 = 1;
+    int tls1_1 =
+#if defined(NO_TLS1_1)
+    0
+#else
+    1
+#endif
+    ;
+    int tls1_2 =
+#if defined(NO_TLS1_2)
+    0
+#else
+    1
+#endif
+    ;
     int proto = 0;
     int verify = 0, require = 0, request = 1;
@@ -1050,5 +1050,5 @@
 #if defined(NO_SSL2)
     if (ENABLED(proto, TLS_PROTO_SSL2)) {
-	Tcl_AppendResult(interp, "protocol not supported", NULL);
+	Tcl_AppendResult(interp, "protocol SSL2 not supported", NULL);
 	return (SSL_CTX *)0;
     }
@@ -1056,5 +1056,5 @@
 #if defined(NO_SSL3)
     if (ENABLED(proto, TLS_PROTO_SSL3)) {
-	Tcl_AppendResult(interp, "protocol not supported", NULL);
+	Tcl_AppendResult(interp, "protocol SSL3 not supported", NULL);
 	return (SSL_CTX *)0;
     }
@@ -1062,5 +1062,5 @@
 #if defined(NO_TLS1)
     if (ENABLED(proto, TLS_PROTO_TLS1)) {
-	Tcl_AppendResult(interp, "protocol not supported", NULL);
+	Tcl_AppendResult(interp, "protocol TLS1 not supported", NULL);
 	return (SSL_CTX *)0;
     }
@@ -1068,5 +1068,5 @@
 #if defined(NO_TLS1_1)
     if (ENABLED(proto, TLS_PROTO_TLS1_1)) {
-	Tcl_AppendResult(interp, "protocol not supported", NULL);
+	Tcl_AppendResult(interp, "protocol TLS1.1 not supported", NULL);
 	return (SSL_CTX *)0;
     }
@@ -1074,5 +1074,5 @@
 #if defined(NO_TLS1_2)
     if (ENABLED(proto, TLS_PROTO_TLS1_2)) {
-	Tcl_AppendResult(interp, "protocol not supported", NULL);
+	Tcl_AppendResult(interp, "protocol TLS1.2 not supported", NULL);
 	return (SSL_CTX *)0;
     }
OpenPOWER on IntegriCloud