| 
									
										
										
										
											2016-05-18 02:20:24 +08:00
										 |  |  | /*
 | 
					
						
							| 
									
										
										
										
											2020-04-23 20:55:52 +08:00
										 |  |  |  * Copyright 2015-2020 The OpenSSL Project Authors. All Rights Reserved. | 
					
						
							| 
									
										
										
										
											2016-05-18 02:20:24 +08:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2018-12-06 20:05:25 +08:00
										 |  |  |  * Licensed under the Apache License 2.0 (the "License").  You may not use | 
					
						
							| 
									
										
										
										
											2016-05-18 02:20:24 +08:00
										 |  |  |  * this file except in compliance with the License.  You can obtain a copy | 
					
						
							|  |  |  |  * in the file LICENSE in the source distribution or at | 
					
						
							|  |  |  |  * https://www.openssl.org/source/license.html
 | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2015-04-25 04:39:40 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | #include <openssl/crypto.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-10 08:05:55 +08:00
										 |  |  | #include "testutil.h"
 | 
					
						
							| 
									
										
										
										
											2018-10-05 07:05:54 +08:00
										 |  |  | #include "../e_os.h"
 | 
					
						
							| 
									
										
										
										
											2016-04-12 04:03:42 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-10 08:05:55 +08:00
										 |  |  | static int test_sec_mem(void) | 
					
						
							| 
									
										
										
										
											2015-04-25 04:39:40 +08:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2020-02-06 03:28:37 +08:00
										 |  |  | #ifndef OPENSSL_NO_SECURE_MEMORY
 | 
					
						
							| 
									
										
										
										
											2017-04-10 08:05:55 +08:00
										 |  |  |     int testresult = 0; | 
					
						
							| 
									
										
										
										
											2016-04-12 04:03:42 +08:00
										 |  |  |     char *p = NULL, *q = NULL, *r = NULL, *s = NULL; | 
					
						
							| 
									
										
										
										
											2015-04-25 04:39:40 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-10-05 07:05:54 +08:00
										 |  |  |     TEST_info("Secure memory is implemented."); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-29 23:47:43 +08:00
										 |  |  |     s = OPENSSL_secure_malloc(20); | 
					
						
							|  |  |  |     /* s = non-secure 20 */ | 
					
						
							|  |  |  |     if (!TEST_ptr(s) | 
					
						
							|  |  |  |         || !TEST_false(CRYPTO_secure_allocated(s))) | 
					
						
							|  |  |  |         goto end; | 
					
						
							| 
									
										
										
										
											2016-04-12 04:03:42 +08:00
										 |  |  |     r = OPENSSL_secure_malloc(20); | 
					
						
							| 
									
										
										
										
											2017-07-29 23:47:43 +08:00
										 |  |  |     /* r = non-secure 20, s = non-secure 20 */ | 
					
						
							| 
									
										
										
										
											2017-04-10 08:05:55 +08:00
										 |  |  |     if (!TEST_ptr(r) | 
					
						
							|  |  |  |         || !TEST_true(CRYPTO_secure_malloc_init(4096, 32)) | 
					
						
							|  |  |  |         || !TEST_false(CRYPTO_secure_allocated(r))) | 
					
						
							|  |  |  |         goto end; | 
					
						
							| 
									
										
										
										
											2015-04-25 04:39:40 +08:00
										 |  |  |     p = OPENSSL_secure_malloc(20); | 
					
						
							| 
									
										
										
										
											2017-04-10 08:05:55 +08:00
										 |  |  |     if (!TEST_ptr(p) | 
					
						
							| 
									
										
										
										
											2017-07-29 23:47:43 +08:00
										 |  |  |         /* r = non-secure 20, p = secure 20, s = non-secure 20 */ | 
					
						
							| 
									
										
										
										
											2017-04-10 08:05:55 +08:00
										 |  |  |         || !TEST_true(CRYPTO_secure_allocated(p)) | 
					
						
							| 
									
										
										
										
											2017-08-11 22:15:22 +08:00
										 |  |  |         /* 20 secure -> 32-byte minimum allocation unit */ | 
					
						
							| 
									
										
										
										
											2017-04-10 08:05:55 +08:00
										 |  |  |         || !TEST_size_t_eq(CRYPTO_secure_used(), 32)) | 
					
						
							|  |  |  |         goto end; | 
					
						
							| 
									
										
										
										
											2015-04-25 04:39:40 +08:00
										 |  |  |     q = OPENSSL_malloc(20); | 
					
						
							| 
									
										
										
										
											2017-04-10 08:05:55 +08:00
										 |  |  |     if (!TEST_ptr(q)) | 
					
						
							|  |  |  |         goto end; | 
					
						
							| 
									
										
										
										
											2017-07-29 23:47:43 +08:00
										 |  |  |     /* r = non-secure 20, p = secure 20, q = non-secure 20, s = non-secure 20 */ | 
					
						
							| 
									
										
										
										
											2017-04-10 08:05:55 +08:00
										 |  |  |     if (!TEST_false(CRYPTO_secure_allocated(q))) | 
					
						
							|  |  |  |         goto end; | 
					
						
							| 
									
										
										
										
											2017-07-29 23:47:43 +08:00
										 |  |  |     OPENSSL_secure_clear_free(s, 20); | 
					
						
							| 
									
										
										
										
											2016-04-12 04:03:42 +08:00
										 |  |  |     s = OPENSSL_secure_malloc(20); | 
					
						
							| 
									
										
										
										
											2017-04-10 08:05:55 +08:00
										 |  |  |     if (!TEST_ptr(s) | 
					
						
							|  |  |  |         /* r = non-secure 20, p = secure 20, q = non-secure 20, s = secure 20 */ | 
					
						
							|  |  |  |         || !TEST_true(CRYPTO_secure_allocated(s)) | 
					
						
							|  |  |  |         /* 2 * 20 secure -> 64 bytes allocated */ | 
					
						
							|  |  |  |         || !TEST_size_t_eq(CRYPTO_secure_used(), 64)) | 
					
						
							|  |  |  |         goto end; | 
					
						
							| 
									
										
										
										
											2017-07-29 23:47:43 +08:00
										 |  |  |     OPENSSL_secure_clear_free(p, 20); | 
					
						
							| 
									
										
										
										
											2017-04-10 08:05:55 +08:00
										 |  |  |     p = NULL; | 
					
						
							| 
									
										
										
										
											2016-04-12 04:03:42 +08:00
										 |  |  |     /* 20 secure -> 32 bytes allocated */ | 
					
						
							| 
									
										
										
										
											2017-04-10 08:05:55 +08:00
										 |  |  |     if (!TEST_size_t_eq(CRYPTO_secure_used(), 32)) | 
					
						
							|  |  |  |         goto end; | 
					
						
							| 
									
										
										
										
											2016-02-17 18:03:55 +08:00
										 |  |  |     OPENSSL_free(q); | 
					
						
							| 
									
										
										
										
											2017-04-10 08:05:55 +08:00
										 |  |  |     q = NULL; | 
					
						
							| 
									
										
										
										
											2016-04-12 04:03:42 +08:00
										 |  |  |     /* should not complete, as secure memory is still allocated */ | 
					
						
							| 
									
										
										
										
											2017-04-10 08:05:55 +08:00
										 |  |  |     if (!TEST_false(CRYPTO_secure_malloc_done()) | 
					
						
							|  |  |  |         || !TEST_true(CRYPTO_secure_malloc_initialized())) | 
					
						
							|  |  |  |         goto end; | 
					
						
							| 
									
										
										
										
											2016-04-12 04:03:42 +08:00
										 |  |  |     OPENSSL_secure_free(s); | 
					
						
							| 
									
										
										
										
											2017-04-10 08:05:55 +08:00
										 |  |  |     s = NULL; | 
					
						
							| 
									
										
										
										
											2016-04-12 04:03:42 +08:00
										 |  |  |     /* secure memory should now be 0, so done should complete */ | 
					
						
							| 
									
										
										
										
											2017-04-10 08:05:55 +08:00
										 |  |  |     if (!TEST_size_t_eq(CRYPTO_secure_used(), 0) | 
					
						
							|  |  |  |         || !TEST_true(CRYPTO_secure_malloc_done()) | 
					
						
							|  |  |  |         || !TEST_false(CRYPTO_secure_malloc_initialized())) | 
					
						
							|  |  |  |         goto end; | 
					
						
							| 
									
										
											  
											
												Fix infinite loops in secure memory allocation.
Issue 1:
sh.bittable_size is a size_t but i is and int, which can result in
freelist == -1 if sh.bittable_size exceeds an int.
This seems to result in an OPENSSL_assert due to invalid allocation
size, so maybe that is "ok."
Worse, if sh.bittable_size is exactly 1<<31, then this becomes an
infinite loop (because 1<<31 is a negative int, so it can be shifted
right forever and sticks at -1).
Issue 2:
CRYPTO_secure_malloc_init() sets secure_mem_initialized=1 even when
sh_init() returns 0.
If sh_init() fails, we end up with secure_mem_initialized=1 but
sh.minsize=0. If you then call secure_malloc(), which then calls,
sh_malloc(), this then enters an infite loop since 0 << anything will
never be larger than size.
Issue 3:
That same sh_malloc loop will loop forever for a size greater
than size_t/2 because i will proceed (assuming sh.minsize=16):
i=16, 32, 64, ..., size_t/8, size_t/4, size_t/2, 0, 0, 0, 0, ....
This sequence will never be larger than "size".
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3449)
											
										 
											2017-05-12 03:48:10 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     TEST_info("Possible infinite loop: allocate more than available"); | 
					
						
							|  |  |  |     if (!TEST_true(CRYPTO_secure_malloc_init(32768, 16))) | 
					
						
							|  |  |  |         goto end; | 
					
						
							|  |  |  |     TEST_ptr_null(OPENSSL_secure_malloc((size_t)-1)); | 
					
						
							|  |  |  |     TEST_true(CRYPTO_secure_malloc_done()); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-21 22:21:06 +08:00
										 |  |  |     /*
 | 
					
						
							|  |  |  |      * If init fails, then initialized should be false, if not, this | 
					
						
							|  |  |  |      * could cause an infinite loop secure_malloc, but we don't test it | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     if (TEST_false(CRYPTO_secure_malloc_init(16, 16)) && | 
					
						
							|  |  |  |         !TEST_false(CRYPTO_secure_malloc_initialized())) { | 
					
						
							|  |  |  |         TEST_true(CRYPTO_secure_malloc_done()); | 
					
						
							| 
									
										
											  
											
												Fix infinite loops in secure memory allocation.
Issue 1:
sh.bittable_size is a size_t but i is and int, which can result in
freelist == -1 if sh.bittable_size exceeds an int.
This seems to result in an OPENSSL_assert due to invalid allocation
size, so maybe that is "ok."
Worse, if sh.bittable_size is exactly 1<<31, then this becomes an
infinite loop (because 1<<31 is a negative int, so it can be shifted
right forever and sticks at -1).
Issue 2:
CRYPTO_secure_malloc_init() sets secure_mem_initialized=1 even when
sh_init() returns 0.
If sh_init() fails, we end up with secure_mem_initialized=1 but
sh.minsize=0. If you then call secure_malloc(), which then calls,
sh_malloc(), this then enters an infite loop since 0 << anything will
never be larger than size.
Issue 3:
That same sh_malloc loop will loop forever for a size greater
than size_t/2 because i will proceed (assuming sh.minsize=16):
i=16, 32, 64, ..., size_t/8, size_t/4, size_t/2, 0, 0, 0, 0, ....
This sequence will never be larger than "size".
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3449)
											
										 
											2017-05-12 03:48:10 +08:00
										 |  |  |         goto end; | 
					
						
							| 
									
										
										
										
											2017-05-21 22:21:06 +08:00
										 |  |  |     } | 
					
						
							| 
									
										
											  
											
												Fix infinite loops in secure memory allocation.
Issue 1:
sh.bittable_size is a size_t but i is and int, which can result in
freelist == -1 if sh.bittable_size exceeds an int.
This seems to result in an OPENSSL_assert due to invalid allocation
size, so maybe that is "ok."
Worse, if sh.bittable_size is exactly 1<<31, then this becomes an
infinite loop (because 1<<31 is a negative int, so it can be shifted
right forever and sticks at -1).
Issue 2:
CRYPTO_secure_malloc_init() sets secure_mem_initialized=1 even when
sh_init() returns 0.
If sh_init() fails, we end up with secure_mem_initialized=1 but
sh.minsize=0. If you then call secure_malloc(), which then calls,
sh_malloc(), this then enters an infite loop since 0 << anything will
never be larger than size.
Issue 3:
That same sh_malloc loop will loop forever for a size greater
than size_t/2 because i will proceed (assuming sh.minsize=16):
i=16, 32, 64, ..., size_t/8, size_t/4, size_t/2, 0, 0, 0, 0, ....
This sequence will never be larger than "size".
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3449)
											
										 
											2017-05-12 03:48:10 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-13 04:46:39 +08:00
										 |  |  |     /*-
 | 
					
						
							|  |  |  |      * There was also a possible infinite loop when the number of | 
					
						
							|  |  |  |      * elements was 1<<31, as |int i| was set to that, which is a | 
					
						
							|  |  |  |      * negative number. However, it requires minimum input values: | 
					
						
							|  |  |  |      * | 
					
						
							| 
									
										
										
										
											2020-02-05 07:09:29 +08:00
										 |  |  |      * CRYPTO_secure_malloc_init((size_t)1<<34, 1<<4); | 
					
						
							| 
									
										
										
										
											2017-05-13 04:46:39 +08:00
										 |  |  |      * | 
					
						
							| 
									
										
										
										
											2017-05-21 17:16:34 +08:00
										 |  |  |      * Which really only works on 64-bit systems, since it took 16 GB | 
					
						
							|  |  |  |      * secure memory arena to trigger the problem. It naturally takes | 
					
						
							|  |  |  |      * corresponding amount of available virtual and physical memory | 
					
						
							|  |  |  |      * for test to be feasible/representative. Since we can't assume | 
					
						
							|  |  |  |      * that every system is equipped with that much memory, the test | 
					
						
							|  |  |  |      * remains disabled. If the reader of this comment really wants | 
					
						
							|  |  |  |      * to make sure that infinite loop is fixed, they can enable the | 
					
						
							|  |  |  |      * code below. | 
					
						
							| 
									
										
										
										
											2017-05-13 04:46:39 +08:00
										 |  |  |      */ | 
					
						
							|  |  |  | # if 0
 | 
					
						
							| 
									
										
										
										
											2017-05-21 17:16:34 +08:00
										 |  |  |     /*-
 | 
					
						
							|  |  |  |      * On Linux and BSD this test has a chance to complete in minimal | 
					
						
							|  |  |  |      * time and with minimum side effects, because mlock is likely to | 
					
						
							|  |  |  |      * fail because of RLIMIT_MEMLOCK, which is customarily [much] | 
					
						
							|  |  |  |      * smaller than 16GB. In other words Linux and BSD users can be | 
					
						
							|  |  |  |      * limited by virtual space alone... | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
											  
											
												Fix infinite loops in secure memory allocation.
Issue 1:
sh.bittable_size is a size_t but i is and int, which can result in
freelist == -1 if sh.bittable_size exceeds an int.
This seems to result in an OPENSSL_assert due to invalid allocation
size, so maybe that is "ok."
Worse, if sh.bittable_size is exactly 1<<31, then this becomes an
infinite loop (because 1<<31 is a negative int, so it can be shifted
right forever and sticks at -1).
Issue 2:
CRYPTO_secure_malloc_init() sets secure_mem_initialized=1 even when
sh_init() returns 0.
If sh_init() fails, we end up with secure_mem_initialized=1 but
sh.minsize=0. If you then call secure_malloc(), which then calls,
sh_malloc(), this then enters an infite loop since 0 << anything will
never be larger than size.
Issue 3:
That same sh_malloc loop will loop forever for a size greater
than size_t/2 because i will proceed (assuming sh.minsize=16):
i=16, 32, 64, ..., size_t/8, size_t/4, size_t/2, 0, 0, 0, 0, ....
This sequence will never be larger than "size".
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3449)
											
										 
											2017-05-12 03:48:10 +08:00
										 |  |  |     if (sizeof(size_t) > 4) { | 
					
						
							|  |  |  |         TEST_info("Possible infinite loop: 1<<31 limit"); | 
					
						
							| 
									
										
										
										
											2020-02-05 07:09:29 +08:00
										 |  |  |         if (TEST_true(CRYPTO_secure_malloc_init((size_t)1<<34, 1<<4) != 0)) | 
					
						
							| 
									
										
										
										
											2017-05-13 04:46:39 +08:00
										 |  |  |             TEST_true(CRYPTO_secure_malloc_done()); | 
					
						
							| 
									
										
											  
											
												Fix infinite loops in secure memory allocation.
Issue 1:
sh.bittable_size is a size_t but i is and int, which can result in
freelist == -1 if sh.bittable_size exceeds an int.
This seems to result in an OPENSSL_assert due to invalid allocation
size, so maybe that is "ok."
Worse, if sh.bittable_size is exactly 1<<31, then this becomes an
infinite loop (because 1<<31 is a negative int, so it can be shifted
right forever and sticks at -1).
Issue 2:
CRYPTO_secure_malloc_init() sets secure_mem_initialized=1 even when
sh_init() returns 0.
If sh_init() fails, we end up with secure_mem_initialized=1 but
sh.minsize=0. If you then call secure_malloc(), which then calls,
sh_malloc(), this then enters an infite loop since 0 << anything will
never be larger than size.
Issue 3:
That same sh_malloc loop will loop forever for a size greater
than size_t/2 because i will proceed (assuming sh.minsize=16):
i=16, 32, 64, ..., size_t/8, size_t/4, size_t/2, 0, 0, 0, 0, ....
This sequence will never be larger than "size".
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3449)
											
										 
											2017-05-12 03:48:10 +08:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2017-05-13 04:46:39 +08:00
										 |  |  | # endif
 | 
					
						
							| 
									
										
										
										
											2017-05-21 22:21:06 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-04-12 04:03:42 +08:00
										 |  |  |     /* this can complete - it was not really secure */ | 
					
						
							| 
									
										
										
										
											2017-04-10 08:05:55 +08:00
										 |  |  |     testresult = 1; | 
					
						
							|  |  |  |  end: | 
					
						
							|  |  |  |     OPENSSL_secure_free(p); | 
					
						
							|  |  |  |     OPENSSL_free(q); | 
					
						
							| 
									
										
										
										
											2016-04-12 04:03:42 +08:00
										 |  |  |     OPENSSL_secure_free(r); | 
					
						
							| 
									
										
										
										
											2017-04-10 08:05:55 +08:00
										 |  |  |     OPENSSL_secure_free(s); | 
					
						
							|  |  |  |     return testresult; | 
					
						
							| 
									
										
										
										
											2015-04-25 04:39:40 +08:00
										 |  |  | #else
 | 
					
						
							| 
									
										
										
										
											2018-10-05 07:05:54 +08:00
										 |  |  |     TEST_info("Secure memory is *not* implemented."); | 
					
						
							| 
									
										
										
										
											2015-04-25 04:39:40 +08:00
										 |  |  |     /* Should fail. */ | 
					
						
							| 
									
										
										
										
											2017-04-10 08:05:55 +08:00
										 |  |  |     return TEST_false(CRYPTO_secure_malloc_init(4096, 32)); | 
					
						
							| 
									
										
										
										
											2015-04-25 04:39:40 +08:00
										 |  |  | #endif
 | 
					
						
							| 
									
										
										
										
											2017-04-10 08:05:55 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-08-22 07:20:18 +08:00
										 |  |  | static int test_sec_mem_clear(void) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2020-02-06 03:28:37 +08:00
										 |  |  | #ifndef OPENSSL_NO_SECURE_MEMORY
 | 
					
						
							| 
									
										
										
										
											2018-08-22 07:20:18 +08:00
										 |  |  |     const int size = 64; | 
					
						
							|  |  |  |     unsigned char *p = NULL; | 
					
						
							|  |  |  |     int i, res = 0; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     if (!TEST_true(CRYPTO_secure_malloc_init(4096, 32)) | 
					
						
							|  |  |  |             || !TEST_ptr(p = OPENSSL_secure_malloc(size))) | 
					
						
							|  |  |  |         goto err; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     for (i = 0; i < size; i++) | 
					
						
							|  |  |  |         if (!TEST_uchar_eq(p[i], 0)) | 
					
						
							|  |  |  |             goto err; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     for (i = 0; i < size; i++) | 
					
						
							|  |  |  |         p[i] = (unsigned char)(i + ' ' + 1); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     OPENSSL_secure_free(p); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /*
 | 
					
						
							|  |  |  |      * A deliberate use after free here to verify that the memory has been | 
					
						
							|  |  |  |      * cleared properly.  Since secure free doesn't return the memory to | 
					
						
							|  |  |  |      * libc's memory pool, it technically isn't freed.  However, the header | 
					
						
							|  |  |  |      * bytes have to be skipped and these consist of two pointers in the | 
					
						
							|  |  |  |      * current implementation. | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     for (i = sizeof(void *) * 2; i < size; i++) | 
					
						
							|  |  |  |         if (!TEST_uchar_eq(p[i], 0)) | 
					
						
							|  |  |  |             return 0; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     res = 1; | 
					
						
							|  |  |  |     p = NULL; | 
					
						
							|  |  |  | err: | 
					
						
							|  |  |  |     OPENSSL_secure_free(p); | 
					
						
							|  |  |  |     CRYPTO_secure_malloc_done(); | 
					
						
							|  |  |  |     return res; | 
					
						
							|  |  |  | #else
 | 
					
						
							|  |  |  |     return 1; | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-18 09:48:27 +08:00
										 |  |  | int setup_tests(void) | 
					
						
							| 
									
										
										
										
											2017-04-10 08:05:55 +08:00
										 |  |  | { | 
					
						
							|  |  |  |     ADD_TEST(test_sec_mem); | 
					
						
							| 
									
										
										
										
											2018-08-22 07:20:18 +08:00
										 |  |  |     ADD_TEST(test_sec_mem_clear); | 
					
						
							| 
									
										
										
										
											2017-07-18 09:48:27 +08:00
										 |  |  |     return 1; | 
					
						
							| 
									
										
										
										
											2015-04-25 04:39:40 +08:00
										 |  |  | } |