1 |
commit: 9ede47e701d02b584543ddf6317a095b47c5a4d2 |
2 |
Author: Michael Mair-Keimberger (asterix) <m.mairkeimberger <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed Aug 9 09:09:27 2017 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 9 12:18:29 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ede47e7 |
7 |
|
8 |
net-libs/mbedtls: remove unused patches |
9 |
|
10 |
.../files/mbedtls-2.3.0-include-guards.patch | 34 --- |
11 |
.../files/mbedtls-2.3.0-move-to-header.patch | 333 --------------------- |
12 |
net-libs/mbedtls/files/mbedtls-2.3.0-tests.patch | 23 -- |
13 |
3 files changed, 390 deletions(-) |
14 |
|
15 |
diff --git a/net-libs/mbedtls/files/mbedtls-2.3.0-include-guards.patch b/net-libs/mbedtls/files/mbedtls-2.3.0-include-guards.patch |
16 |
deleted file mode 100644 |
17 |
index af12d4b1f4a..00000000000 |
18 |
--- a/net-libs/mbedtls/files/mbedtls-2.3.0-include-guards.patch |
19 |
+++ /dev/null |
20 |
@@ -1,34 +0,0 @@ |
21 |
-From 23e9778684ba734dbfba1445e145b04dd6b59e76 Mon Sep 17 00:00:00 2001 |
22 |
-From: Simon Butcher <simon.butcher@×××.com> |
23 |
-Date: Wed, 13 Jul 2016 13:31:08 +0100 |
24 |
-Subject: [PATCH] Adds missing conditions for platform time |
25 |
- |
26 |
-In platform.c, made the time functions dependent on the configuration |
27 |
-MBEDTLS_HAVE_TIME to fix a build break where the functions could be |
28 |
-built but the mbedtls_time_t was not defined. |
29 |
---- |
30 |
- library/platform.c | 4 ++++ |
31 |
- 1 file changed, 4 insertions(+) |
32 |
- |
33 |
-diff --git a/library/platform.c b/library/platform.c |
34 |
-index 68ca45d..2591c45 100644 |
35 |
---- a/library/platform.c |
36 |
-+++ b/library/platform.c |
37 |
-@@ -190,6 +190,8 @@ int mbedtls_platform_set_exit( void (*exit_func)( int status ) ) |
38 |
- } |
39 |
- #endif /* MBEDTLS_PLATFORM_EXIT_ALT */ |
40 |
- |
41 |
-+#if defined(MBEDTLS_HAVE_TIME) |
42 |
-+ |
43 |
- #if defined(MBEDTLS_PLATFORM_TIME_ALT) |
44 |
- #if !defined(MBEDTLS_PLATFORM_STD_TIME) |
45 |
- /* |
46 |
-@@ -213,6 +215,8 @@ int mbedtls_platform_set_time( mbedtls_time_t (*time_func)( mbedtls_time_t* time |
47 |
- } |
48 |
- #endif /* MBEDTLS_PLATFORM_TIME_ALT */ |
49 |
- |
50 |
-+#endif /* MBEDTLS_HAVE_TIME */ |
51 |
-+ |
52 |
- #if defined(MBEDTLS_ENTROPY_NV_SEED) |
53 |
- #if !defined(MBEDTLS_PLATFORM_NO_STD_FUNCTIONS) && defined(MBEDTLS_FS_IO) |
54 |
- /* Default implementations for the platform independent seed functions use |
55 |
|
56 |
diff --git a/net-libs/mbedtls/files/mbedtls-2.3.0-move-to-header.patch b/net-libs/mbedtls/files/mbedtls-2.3.0-move-to-header.patch |
57 |
deleted file mode 100644 |
58 |
index 2c858bb7f82..00000000000 |
59 |
--- a/net-libs/mbedtls/files/mbedtls-2.3.0-move-to-header.patch |
60 |
+++ /dev/null |
61 |
@@ -1,333 +0,0 @@ |
62 |
-From b5b6af2663fdb7f57c30494607bade90810f6844 Mon Sep 17 00:00:00 2001 |
63 |
-From: Simon Butcher <simon.butcher@×××.com> |
64 |
-Date: Wed, 13 Jul 2016 14:46:18 +0100 |
65 |
-Subject: [PATCH] Puts platform time abstraction into its own header |
66 |
- |
67 |
-Separates platform time abstraction into it's own header from the |
68 |
-general platform abstraction as both depend on different build options. |
69 |
-(MBEDTLS_PLATFORM_C vs MBEDTLS_HAVE_TIME) |
70 |
---- |
71 |
- include/mbedtls/platform.h | 37 ++----------------- |
72 |
- include/mbedtls/platform_time.h | 81 +++++++++++++++++++++++++++++++++++++++++ |
73 |
- include/mbedtls/ssl.h | 2 +- |
74 |
- library/net.c | 1 - |
75 |
- library/ssl_cache.c | 2 - |
76 |
- library/ssl_ciphersuites.c | 1 - |
77 |
- library/ssl_cli.c | 4 +- |
78 |
- library/ssl_cookie.c | 2 - |
79 |
- library/ssl_srv.c | 4 +- |
80 |
- library/ssl_ticket.c | 2 - |
81 |
- library/ssl_tls.c | 1 - |
82 |
- library/x509.c | 7 +++- |
83 |
- programs/ssl/dtls_client.c | 1 - |
84 |
- 13 files changed, 93 insertions(+), 52 deletions(-) |
85 |
- create mode 100644 include/mbedtls/platform_time.h |
86 |
- |
87 |
-diff --git a/include/mbedtls/platform.h b/include/mbedtls/platform.h |
88 |
-index caf8f25..b1b019e 100644 |
89 |
---- a/include/mbedtls/platform.h |
90 |
-+++ b/include/mbedtls/platform.h |
91 |
-@@ -29,6 +29,10 @@ |
92 |
- #include MBEDTLS_CONFIG_FILE |
93 |
- #endif |
94 |
- |
95 |
-+#if defined(MBEDTLS_HAVE_TIME) |
96 |
-+#include "mbedtls/platform_time.h" |
97 |
-+#endif |
98 |
-+ |
99 |
- #ifdef __cplusplus |
100 |
- extern "C" { |
101 |
- #endif |
102 |
-@@ -244,39 +248,6 @@ int mbedtls_platform_set_exit( void (*exit_func)( int status ) ); |
103 |
- #endif |
104 |
- |
105 |
- /* |
106 |
-- * The time_t datatype |
107 |
-- */ |
108 |
--#if defined(MBEDTLS_PLATFORM_TIME_TYPE_MACRO) |
109 |
--typedef MBEDTLS_PLATFORM_TIME_TYPE_MACRO mbedtls_time_t; |
110 |
--#else |
111 |
--/* For time_t */ |
112 |
--#include <time.h> |
113 |
--typedef time_t mbedtls_time_t; |
114 |
--#endif /* MBEDTLS_PLATFORM_TIME_TYPE_MACRO */ |
115 |
-- |
116 |
--/* |
117 |
-- * The function pointers for time |
118 |
-- */ |
119 |
--#if defined(MBEDTLS_PLATFORM_TIME_ALT) |
120 |
--extern mbedtls_time_t (*mbedtls_time)( mbedtls_time_t* time ); |
121 |
-- |
122 |
--/** |
123 |
-- * \brief Set your own time function pointer |
124 |
-- * |
125 |
-- * \param time_func the time function implementation |
126 |
-- * |
127 |
-- * \return 0 |
128 |
-- */ |
129 |
--int mbedtls_platform_set_time( mbedtls_time_t (*time_func)( mbedtls_time_t* time ) ); |
130 |
--#else |
131 |
--#if defined(MBEDTLS_PLATFORM_TIME_MACRO) |
132 |
--#define mbedtls_time MBEDTLS_PLATFORM_TIME_MACRO |
133 |
--#else |
134 |
--#define mbedtls_time time |
135 |
--#endif /* MBEDTLS_PLATFORM_TIME_MACRO */ |
136 |
--#endif /* MBEDTLS_PLATFORM_TIME_ALT */ |
137 |
-- |
138 |
--/* |
139 |
- * The function pointers for reading from and writing a seed file to |
140 |
- * Non-Volatile storage (NV) in a platform-independent way |
141 |
- * |
142 |
-diff --git a/include/mbedtls/platform_time.h b/include/mbedtls/platform_time.h |
143 |
-new file mode 100644 |
144 |
-index 0000000..abb3431 |
145 |
---- /dev/null |
146 |
-+++ b/include/mbedtls/platform_time.h |
147 |
-@@ -0,0 +1,81 @@ |
148 |
-+/** |
149 |
-+ * \file platform_time.h |
150 |
-+ * |
151 |
-+ * \brief mbed TLS Platform time abstraction |
152 |
-+ * |
153 |
-+ * Copyright (C) 2006-2016, ARM Limited, All Rights Reserved |
154 |
-+ * SPDX-License-Identifier: Apache-2.0 |
155 |
-+ * |
156 |
-+ * Licensed under the Apache License, Version 2.0 (the "License"); you may |
157 |
-+ * not use this file except in compliance with the License. |
158 |
-+ * You may obtain a copy of the License at |
159 |
-+ * |
160 |
-+ * http://www.apache.org/licenses/LICENSE-2.0 |
161 |
-+ * |
162 |
-+ * Unless required by applicable law or agreed to in writing, software |
163 |
-+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
164 |
-+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
165 |
-+ * See the License for the specific language governing permissions and |
166 |
-+ * limitations under the License. |
167 |
-+ * |
168 |
-+ * This file is part of mbed TLS (https://tls.mbed.org) |
169 |
-+ */ |
170 |
-+#ifndef MBEDTLS_PLATFORM_TIME_H |
171 |
-+#define MBEDTLS_PLATFORM_TIME_H |
172 |
-+ |
173 |
-+#if !defined(MBEDTLS_CONFIG_FILE) |
174 |
-+#include "config.h" |
175 |
-+#else |
176 |
-+#include MBEDTLS_CONFIG_FILE |
177 |
-+#endif |
178 |
-+ |
179 |
-+#ifdef __cplusplus |
180 |
-+extern "C" { |
181 |
-+#endif |
182 |
-+ |
183 |
-+/** |
184 |
-+ * \name SECTION: Module settings |
185 |
-+ * |
186 |
-+ * The configuration options you can set for this module are in this section. |
187 |
-+ * Either change them in config.h or define them on the compiler command line. |
188 |
-+ * \{ |
189 |
-+ */ |
190 |
-+ |
191 |
-+/* |
192 |
-+ * The time_t datatype |
193 |
-+ */ |
194 |
-+#if defined(MBEDTLS_PLATFORM_TIME_TYPE_MACRO) |
195 |
-+typedef MBEDTLS_PLATFORM_TIME_TYPE_MACRO mbedtls_time_t; |
196 |
-+#else |
197 |
-+/* For time_t */ |
198 |
-+#include <time.h> |
199 |
-+typedef time_t mbedtls_time_t; |
200 |
-+#endif /* MBEDTLS_PLATFORM_TIME_TYPE_MACRO */ |
201 |
-+ |
202 |
-+/* |
203 |
-+ * The function pointers for time |
204 |
-+ */ |
205 |
-+#if defined(MBEDTLS_PLATFORM_TIME_ALT) |
206 |
-+extern mbedtls_time_t (*mbedtls_time)( mbedtls_time_t* time ); |
207 |
-+ |
208 |
-+/** |
209 |
-+ * \brief Set your own time function pointer |
210 |
-+ * |
211 |
-+ * \param time_func the time function implementation |
212 |
-+ * |
213 |
-+ * \return 0 |
214 |
-+ */ |
215 |
-+int mbedtls_platform_set_time( mbedtls_time_t (*time_func)( mbedtls_time_t* time ) ); |
216 |
-+#else |
217 |
-+#if defined(MBEDTLS_PLATFORM_TIME_MACRO) |
218 |
-+#define mbedtls_time MBEDTLS_PLATFORM_TIME_MACRO |
219 |
-+#else |
220 |
-+#define mbedtls_time time |
221 |
-+#endif /* MBEDTLS_PLATFORM_TIME_MACRO */ |
222 |
-+#endif /* MBEDTLS_PLATFORM_TIME_ALT */ |
223 |
-+ |
224 |
-+#ifdef __cplusplus |
225 |
-+} |
226 |
-+#endif |
227 |
-+ |
228 |
-+#endif /* platform_time.h */ |
229 |
-diff --git a/include/mbedtls/ssl.h b/include/mbedtls/ssl.h |
230 |
-index bc62336..c0bfd3e 100644 |
231 |
---- a/include/mbedtls/ssl.h |
232 |
-+++ b/include/mbedtls/ssl.h |
233 |
-@@ -52,7 +52,7 @@ |
234 |
- #endif |
235 |
- |
236 |
- #if defined(MBEDTLS_HAVE_TIME) |
237 |
--#include <time.h> |
238 |
-+#include "mbedtls/platform_time.h" |
239 |
- #endif |
240 |
- |
241 |
- /* |
242 |
-diff --git a/library/net.c b/library/net.c |
243 |
-index 4142bc0..8b96321 100644 |
244 |
---- a/library/net.c |
245 |
-+++ b/library/net.c |
246 |
-@@ -36,7 +36,6 @@ |
247 |
- #include "mbedtls/platform.h" |
248 |
- #else |
249 |
- #include <stdlib.h> |
250 |
--#define mbedtls_time_t time_t |
251 |
- #endif |
252 |
- |
253 |
- #include "mbedtls/net.h" |
254 |
-diff --git a/library/ssl_cache.c b/library/ssl_cache.c |
255 |
-index 01c66ae..9b62de2 100644 |
256 |
---- a/library/ssl_cache.c |
257 |
-+++ b/library/ssl_cache.c |
258 |
-@@ -37,8 +37,6 @@ |
259 |
- #include <stdlib.h> |
260 |
- #define mbedtls_calloc calloc |
261 |
- #define mbedtls_free free |
262 |
--#define mbedtls_time time |
263 |
--#define mbedtls_time_t time_t |
264 |
- #endif |
265 |
- |
266 |
- #include "mbedtls/ssl_cache.h" |
267 |
-diff --git a/library/ssl_ciphersuites.c b/library/ssl_ciphersuites.c |
268 |
-index 3546331..a762bf7 100644 |
269 |
---- a/library/ssl_ciphersuites.c |
270 |
-+++ b/library/ssl_ciphersuites.c |
271 |
-@@ -33,7 +33,6 @@ |
272 |
- #include "mbedtls/platform.h" |
273 |
- #else |
274 |
- #include <stdlib.h> |
275 |
--#define mbedtls_time_t time_t |
276 |
- #endif |
277 |
- |
278 |
- #include "mbedtls/ssl_ciphersuites.h" |
279 |
-diff --git a/library/ssl_cli.c b/library/ssl_cli.c |
280 |
-index cd39db0..358dc46 100644 |
281 |
---- a/library/ssl_cli.c |
282 |
-+++ b/library/ssl_cli.c |
283 |
-@@ -33,8 +33,6 @@ |
284 |
- #include <stdlib.h> |
285 |
- #define mbedtls_calloc calloc |
286 |
- #define mbedtls_free free |
287 |
--#define mbedtls_time time |
288 |
--#define mbedtls_time_t time_t |
289 |
- #endif |
290 |
- |
291 |
- #include "mbedtls/debug.h" |
292 |
-@@ -46,7 +44,7 @@ |
293 |
- #include <stdint.h> |
294 |
- |
295 |
- #if defined(MBEDTLS_HAVE_TIME) |
296 |
--#include <time.h> |
297 |
-+#include "mbedtls/platform_time.h" |
298 |
- #endif |
299 |
- |
300 |
- #if defined(MBEDTLS_SSL_SESSION_TICKETS) |
301 |
-diff --git a/library/ssl_cookie.c b/library/ssl_cookie.c |
302 |
-index f241c86..9fb32de 100644 |
303 |
---- a/library/ssl_cookie.c |
304 |
-+++ b/library/ssl_cookie.c |
305 |
-@@ -36,8 +36,6 @@ |
306 |
- #else |
307 |
- #define mbedtls_calloc calloc |
308 |
- #define mbedtls_free free |
309 |
--#define mbedtls_time time |
310 |
--#define mbedtls_time_t time_t |
311 |
- #endif |
312 |
- |
313 |
- #include "mbedtls/ssl_cookie.h" |
314 |
-diff --git a/library/ssl_srv.c b/library/ssl_srv.c |
315 |
-index 7271045..ec59cc1 100644 |
316 |
---- a/library/ssl_srv.c |
317 |
-+++ b/library/ssl_srv.c |
318 |
-@@ -33,8 +33,6 @@ |
319 |
- #include <stdlib.h> |
320 |
- #define mbedtls_calloc calloc |
321 |
- #define mbedtls_free free |
322 |
--#define mbedtls_time time |
323 |
--#define mbedtls_time_t time_t |
324 |
- #endif |
325 |
- |
326 |
- #include "mbedtls/debug.h" |
327 |
-@@ -48,7 +46,7 @@ |
328 |
- #endif |
329 |
- |
330 |
- #if defined(MBEDTLS_HAVE_TIME) |
331 |
--#include <time.h> |
332 |
-+#include "mbedtls/platform_time.h" |
333 |
- #endif |
334 |
- |
335 |
- #if defined(MBEDTLS_SSL_SESSION_TICKETS) |
336 |
-diff --git a/library/ssl_ticket.c b/library/ssl_ticket.c |
337 |
-index 5d77403..4d9116d 100644 |
338 |
---- a/library/ssl_ticket.c |
339 |
-+++ b/library/ssl_ticket.c |
340 |
-@@ -33,8 +33,6 @@ |
341 |
- #include <stdlib.h> |
342 |
- #define mbedtls_calloc calloc |
343 |
- #define mbedtls_free free |
344 |
--#define mbedtls_time time |
345 |
--#define mbedtls_time_t time_t |
346 |
- #endif |
347 |
- |
348 |
- #include "mbedtls/ssl_ticket.h" |
349 |
-diff --git a/library/ssl_tls.c b/library/ssl_tls.c |
350 |
-index 80a908d..505bb6c 100644 |
351 |
---- a/library/ssl_tls.c |
352 |
-+++ b/library/ssl_tls.c |
353 |
-@@ -41,7 +41,6 @@ |
354 |
- #include <stdlib.h> |
355 |
- #define mbedtls_calloc calloc |
356 |
- #define mbedtls_free free |
357 |
--#define mbedtls_time_t time_t |
358 |
- #endif |
359 |
- |
360 |
- #include "mbedtls/debug.h" |
361 |
-diff --git a/library/x509.c b/library/x509.c |
362 |
-index a0df817..bc3bfe0 100644 |
363 |
---- a/library/x509.c |
364 |
-+++ b/library/x509.c |
365 |
-@@ -55,12 +55,15 @@ |
366 |
- #include <stdlib.h> |
367 |
- #define mbedtls_free free |
368 |
- #define mbedtls_calloc calloc |
369 |
--#define mbedtls_time time |
370 |
--#define mbedtls_time_t time_t |
371 |
- #define mbedtls_printf printf |
372 |
- #define mbedtls_snprintf snprintf |
373 |
- #endif |
374 |
- |
375 |
-+ |
376 |
-+#if defined(MBEDTLS_HAVE_TIME) |
377 |
-+#include "mbedtls/platform_time.h" |
378 |
-+#endif |
379 |
-+ |
380 |
- #if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32) |
381 |
- #include <windows.h> |
382 |
- #else |
383 |
-diff --git a/programs/ssl/dtls_client.c b/programs/ssl/dtls_client.c |
384 |
-index 14fb612..b37eb83 100644 |
385 |
---- a/programs/ssl/dtls_client.c |
386 |
-+++ b/programs/ssl/dtls_client.c |
387 |
-@@ -31,7 +31,6 @@ |
388 |
- #include <stdio.h> |
389 |
- #define mbedtls_printf printf |
390 |
- #define mbedtls_fprintf fprintf |
391 |
--#define mbedtls_time_t time_t |
392 |
- #endif |
393 |
- |
394 |
- #if !defined(MBEDTLS_SSL_CLI_C) || !defined(MBEDTLS_SSL_PROTO_DTLS) || \ |
395 |
|
396 |
diff --git a/net-libs/mbedtls/files/mbedtls-2.3.0-tests.patch b/net-libs/mbedtls/files/mbedtls-2.3.0-tests.patch |
397 |
deleted file mode 100644 |
398 |
index 69375b598e7..00000000000 |
399 |
--- a/net-libs/mbedtls/files/mbedtls-2.3.0-tests.patch |
400 |
+++ /dev/null |
401 |
@@ -1,23 +0,0 @@ |
402 |
-From b92834324f29768a5bf39c58c674c5f3c09b6763 Mon Sep 17 00:00:00 2001 |
403 |
-From: Simon Butcher <simon.butcher@×××.com> |
404 |
-Date: Wed, 13 Jul 2016 11:02:41 +0100 |
405 |
-Subject: [PATCH] Fixes all.sh for full config |
406 |
- |
407 |
-MBEDTLS_PLATFORM_TIME_ALT was accidentally left in the full config test |
408 |
-leading to linker problems. |
409 |
---- |
410 |
- tests/scripts/all.sh | 1 + |
411 |
- 1 file changed, 1 insertion(+) |
412 |
- |
413 |
-diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh |
414 |
-index 5262397..a2b0995 100755 |
415 |
---- a/tests/scripts/all.sh |
416 |
-+++ b/tests/scripts/all.sh |
417 |
-@@ -231,6 +231,7 @@ scripts/config.pl unset MBEDTLS_PLATFORM_MEMORY |
418 |
- scripts/config.pl unset MBEDTLS_PLATFORM_PRINTF_ALT |
419 |
- scripts/config.pl unset MBEDTLS_PLATFORM_FPRINTF_ALT |
420 |
- scripts/config.pl unset MBEDTLS_PLATFORM_SNPRINTF_ALT |
421 |
-+scripts/config.pl unset MBEDTLS_PLATFORM_TIME_ALT |
422 |
- scripts/config.pl unset MBEDTLS_PLATFORM_EXIT_ALT |
423 |
- scripts/config.pl unset MBEDTLS_ENTROPY_NV_SEED |
424 |
- scripts/config.pl unset MBEDTLS_MEMORY_BUFFER_ALLOC_C |