@@ -56,7 +56,7 @@ class S3
56
56
* @static
57
57
*/
58
58
private static $ __accessKey = null ;
59
-
59
+
60
60
/**
61
61
* AWS Secret Key
62
62
*
@@ -65,7 +65,7 @@ class S3
65
65
* @static
66
66
*/
67
67
private static $ __secretKey = null ;
68
-
68
+
69
69
/**
70
70
* SSL Client key
71
71
*
@@ -82,7 +82,7 @@ class S3
82
82
* @static
83
83
*/
84
84
public static $ defDelimiter = null ;
85
-
85
+
86
86
/**
87
87
* AWS URI
88
88
*
@@ -91,7 +91,7 @@ class S3
91
91
* @static
92
92
*/
93
93
public static $ endpoint = 's3.amazonaws.com ' ;
94
-
94
+
95
95
/**
96
96
* Proxy information
97
97
*
@@ -100,7 +100,7 @@ class S3
100
100
* @static
101
101
*/
102
102
public static $ proxy = null ;
103
-
103
+
104
104
/**
105
105
* Connect using SSL?
106
106
*
@@ -109,7 +109,7 @@ class S3
109
109
* @static
110
110
*/
111
111
public static $ useSSL = false ;
112
-
112
+
113
113
/**
114
114
* Use SSL validation?
115
115
*
@@ -118,7 +118,16 @@ class S3
118
118
* @static
119
119
*/
120
120
public static $ useSSLValidation = true ;
121
-
121
+
122
+ /**
123
+ * Use SSL version
124
+ *
125
+ * @var const
126
+ * @access public
127
+ * @static
128
+ */
129
+ public static $ useSSLVersion = CURL_SSLVERSION_TLSv1;
130
+
122
131
/**
123
132
* Use PHP exceptions?
124
133
*
@@ -210,6 +219,7 @@ public function setEndpoint($host)
210
219
self ::$ endpoint = $ host ;
211
220
}
212
221
222
+
213
223
/**
214
224
* Set AWS access key and secret key
215
225
*
@@ -2131,6 +2141,9 @@ public function getResponse()
2131
2141
2132
2142
if (S3 ::$ useSSL )
2133
2143
{
2144
+ // Set protocol version
2145
+ curl_setopt ($ curl , CURLOPT_SSLVERSION , S3 ::$ useSSLVersion );
2146
+
2134
2147
// SSL Validation can now be optional for those with broken OpenSSL installations
2135
2148
curl_setopt ($ curl , CURLOPT_SSL_VERIFYHOST , S3 ::$ useSSLValidation ? 2 : 0 );
2136
2149
curl_setopt ($ curl , CURLOPT_SSL_VERIFYPEER , S3 ::$ useSSLValidation ? 1 : 0 );
0 commit comments