diff options
Diffstat (limited to 'test/core/security')
111 files changed, 285 insertions, 127 deletions
diff --git a/test/core/security/b64_test.c b/test/core/security/b64_test.c index b26bd026fd..af883f51e9 100644 --- a/test/core/security/b64_test.c +++ b/test/core/security/b64_test.c @@ -35,9 +35,9 @@ #include <string.h> +#include <grpc/slice.h> #include <grpc/support/alloc.h> #include <grpc/support/log.h> -#include <grpc/support/slice.h> #include "test/core/util/test_config.h" static int buffers_are_equal(const unsigned char *buf1, @@ -57,12 +57,12 @@ static void test_simple_encode_decode_b64(int url_safe, int multiline) { const char *hello = "hello"; char *hello_b64 = grpc_base64_encode(hello, strlen(hello), url_safe, multiline); - gpr_slice hello_slice = grpc_base64_decode(hello_b64, url_safe); - GPR_ASSERT(GPR_SLICE_LENGTH(hello_slice) == strlen(hello)); - GPR_ASSERT(strncmp((const char *)GPR_SLICE_START_PTR(hello_slice), hello, - GPR_SLICE_LENGTH(hello_slice)) == 0); + grpc_slice hello_slice = grpc_base64_decode(hello_b64, url_safe); + GPR_ASSERT(GRPC_SLICE_LENGTH(hello_slice) == strlen(hello)); + GPR_ASSERT(strncmp((const char *)GRPC_SLICE_START_PTR(hello_slice), hello, + GRPC_SLICE_LENGTH(hello_slice)) == 0); - gpr_slice_unref(hello_slice); + grpc_slice_unref(hello_slice); gpr_free(hello_b64); } @@ -70,17 +70,17 @@ static void test_full_range_encode_decode_b64(int url_safe, int multiline) { unsigned char orig[256]; size_t i; char *b64; - gpr_slice orig_decoded; + grpc_slice orig_decoded; for (i = 0; i < sizeof(orig); i++) orig[i] = (uint8_t)i; /* Try all the different paddings. */ for (i = 0; i < 3; i++) { b64 = grpc_base64_encode(orig, sizeof(orig) - i, url_safe, multiline); orig_decoded = grpc_base64_decode(b64, url_safe); - GPR_ASSERT(GPR_SLICE_LENGTH(orig_decoded) == (sizeof(orig) - i)); - GPR_ASSERT(buffers_are_equal(orig, GPR_SLICE_START_PTR(orig_decoded), + GPR_ASSERT(GRPC_SLICE_LENGTH(orig_decoded) == (sizeof(orig) - i)); + GPR_ASSERT(buffers_are_equal(orig, GRPC_SLICE_START_PTR(orig_decoded), sizeof(orig) - i)); - gpr_slice_unref(orig_decoded); + grpc_slice_unref(orig_decoded); gpr_free(b64); } } @@ -121,21 +121,21 @@ static void test_url_safe_unsafe_mismtach_failure(void) { unsigned char orig[256]; size_t i; char *b64; - gpr_slice orig_decoded; + grpc_slice orig_decoded; int url_safe = 1; for (i = 0; i < sizeof(orig); i++) orig[i] = (uint8_t)i; b64 = grpc_base64_encode(orig, sizeof(orig), url_safe, 0); orig_decoded = grpc_base64_decode(b64, !url_safe); - GPR_ASSERT(GPR_SLICE_IS_EMPTY(orig_decoded)); + GPR_ASSERT(GRPC_SLICE_IS_EMPTY(orig_decoded)); gpr_free(b64); - gpr_slice_unref(orig_decoded); + grpc_slice_unref(orig_decoded); b64 = grpc_base64_encode(orig, sizeof(orig), !url_safe, 0); orig_decoded = grpc_base64_decode(b64, url_safe); - GPR_ASSERT(GPR_SLICE_IS_EMPTY(orig_decoded)); + GPR_ASSERT(GRPC_SLICE_IS_EMPTY(orig_decoded)); gpr_free(b64); - gpr_slice_unref(orig_decoded); + grpc_slice_unref(orig_decoded); } static void test_rfc4648_test_vectors(void) { @@ -171,40 +171,40 @@ static void test_rfc4648_test_vectors(void) { } static void test_unpadded_decode(void) { - gpr_slice decoded; + grpc_slice decoded; decoded = grpc_base64_decode("Zm9vYmFy", 0); - GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); - GPR_ASSERT(gpr_slice_str_cmp(decoded, "foobar") == 0); - gpr_slice_unref(decoded); + GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(decoded)); + GPR_ASSERT(grpc_slice_str_cmp(decoded, "foobar") == 0); + grpc_slice_unref(decoded); decoded = grpc_base64_decode("Zm9vYmE", 0); - GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); - GPR_ASSERT(gpr_slice_str_cmp(decoded, "fooba") == 0); - gpr_slice_unref(decoded); + GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(decoded)); + GPR_ASSERT(grpc_slice_str_cmp(decoded, "fooba") == 0); + grpc_slice_unref(decoded); decoded = grpc_base64_decode("Zm9vYg", 0); - GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); - GPR_ASSERT(gpr_slice_str_cmp(decoded, "foob") == 0); - gpr_slice_unref(decoded); + GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(decoded)); + GPR_ASSERT(grpc_slice_str_cmp(decoded, "foob") == 0); + grpc_slice_unref(decoded); decoded = grpc_base64_decode("Zm9v", 0); - GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); - GPR_ASSERT(gpr_slice_str_cmp(decoded, "foo") == 0); - gpr_slice_unref(decoded); + GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(decoded)); + GPR_ASSERT(grpc_slice_str_cmp(decoded, "foo") == 0); + grpc_slice_unref(decoded); decoded = grpc_base64_decode("Zm8", 0); - GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); - GPR_ASSERT(gpr_slice_str_cmp(decoded, "fo") == 0); - gpr_slice_unref(decoded); + GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(decoded)); + GPR_ASSERT(grpc_slice_str_cmp(decoded, "fo") == 0); + grpc_slice_unref(decoded); decoded = grpc_base64_decode("Zg", 0); - GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); - GPR_ASSERT(gpr_slice_str_cmp(decoded, "f") == 0); - gpr_slice_unref(decoded); + GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(decoded)); + GPR_ASSERT(grpc_slice_str_cmp(decoded, "f") == 0); + grpc_slice_unref(decoded); decoded = grpc_base64_decode("", 0); - GPR_ASSERT(GPR_SLICE_IS_EMPTY(decoded)); + GPR_ASSERT(GRPC_SLICE_IS_EMPTY(decoded)); } int main(int argc, char **argv) { diff --git a/test/core/security/corpus/ssl_server_corpus/05cda1e986096f42698ee2d86ab0a4a3f6a6690b b/test/core/security/corpus/ssl_server_corpus/05cda1e986096f42698ee2d86ab0a4a3f6a6690b Binary files differnew file mode 100644 index 0000000000..272c22d321 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/05cda1e986096f42698ee2d86ab0a4a3f6a6690b diff --git a/test/core/security/corpus/ssl_server_corpus/0f65ef472e8308561c77ada56afd4de5932d950a b/test/core/security/corpus/ssl_server_corpus/0f65ef472e8308561c77ada56afd4de5932d950a Binary files differnew file mode 100644 index 0000000000..eeba79a9f2 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/0f65ef472e8308561c77ada56afd4de5932d950a diff --git a/test/core/security/corpus/ssl_server_corpus/128915cb83e66a736f8a1833c8901eccb81e0656 b/test/core/security/corpus/ssl_server_corpus/128915cb83e66a736f8a1833c8901eccb81e0656 Binary files differnew file mode 100644 index 0000000000..e699abcea0 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/128915cb83e66a736f8a1833c8901eccb81e0656 diff --git a/test/core/security/corpus/ssl_server_corpus/134d3a5e7a1609a583f6282c48ef9b871e0fdc15 b/test/core/security/corpus/ssl_server_corpus/134d3a5e7a1609a583f6282c48ef9b871e0fdc15 Binary files differnew file mode 100644 index 0000000000..13c6a93dcf --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/134d3a5e7a1609a583f6282c48ef9b871e0fdc15 diff --git a/test/core/security/corpus/ssl_server_corpus/13fccd43a6b52c62851ea24e8be4f8cfe6c0103d b/test/core/security/corpus/ssl_server_corpus/13fccd43a6b52c62851ea24e8be4f8cfe6c0103d Binary files differnew file mode 100644 index 0000000000..505cfa73fc --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/13fccd43a6b52c62851ea24e8be4f8cfe6c0103d diff --git a/test/core/security/corpus/ssl_server_corpus/171bc6b14b94c72435d2da2e31e9682f12a3f13c b/test/core/security/corpus/ssl_server_corpus/171bc6b14b94c72435d2da2e31e9682f12a3f13c Binary files differnew file mode 100644 index 0000000000..06020e8895 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/171bc6b14b94c72435d2da2e31e9682f12a3f13c diff --git a/test/core/security/corpus/ssl_server_corpus/17dea38d21e9282ecd062466cf287ecf5b30c1cf b/test/core/security/corpus/ssl_server_corpus/17dea38d21e9282ecd062466cf287ecf5b30c1cf Binary files differnew file mode 100644 index 0000000000..7e77bb6371 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/17dea38d21e9282ecd062466cf287ecf5b30c1cf diff --git a/test/core/security/corpus/ssl_server_corpus/1961eb9d4dd4bf21cbcd9c45a17b1d025eb0d200 b/test/core/security/corpus/ssl_server_corpus/1961eb9d4dd4bf21cbcd9c45a17b1d025eb0d200 Binary files differnew file mode 100644 index 0000000000..f3b9d87bdf --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/1961eb9d4dd4bf21cbcd9c45a17b1d025eb0d200 diff --git a/test/core/security/corpus/ssl_server_corpus/226ebb5cc16ac42fae3be273de533ac79759ae01 b/test/core/security/corpus/ssl_server_corpus/226ebb5cc16ac42fae3be273de533ac79759ae01 Binary files differnew file mode 100644 index 0000000000..e300b25dd6 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/226ebb5cc16ac42fae3be273de533ac79759ae01 diff --git a/test/core/security/corpus/ssl_server_corpus/2333cf428cb1e2976679ac84e64873bf76c6595e b/test/core/security/corpus/ssl_server_corpus/2333cf428cb1e2976679ac84e64873bf76c6595e Binary files differnew file mode 100644 index 0000000000..de233b4df7 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/2333cf428cb1e2976679ac84e64873bf76c6595e diff --git a/test/core/security/corpus/ssl_server_corpus/2885553a9e6829265d5f44ea4e24fcf7d6513436 b/test/core/security/corpus/ssl_server_corpus/2885553a9e6829265d5f44ea4e24fcf7d6513436 Binary files differnew file mode 100644 index 0000000000..c52dac2160 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/2885553a9e6829265d5f44ea4e24fcf7d6513436 diff --git a/test/core/security/corpus/ssl_server_corpus/28bce9a7cb21f3232239b9b71ef568137bf801f4 b/test/core/security/corpus/ssl_server_corpus/28bce9a7cb21f3232239b9b71ef568137bf801f4 Binary files differnew file mode 100644 index 0000000000..99bde1b486 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/28bce9a7cb21f3232239b9b71ef568137bf801f4 diff --git a/test/core/security/corpus/ssl_server_corpus/2a0286615be426d1e7fd5894aadf1a503df05a0a b/test/core/security/corpus/ssl_server_corpus/2a0286615be426d1e7fd5894aadf1a503df05a0a Binary files differnew file mode 100644 index 0000000000..e36dac871a --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/2a0286615be426d1e7fd5894aadf1a503df05a0a diff --git a/test/core/security/corpus/ssl_server_corpus/2b4a1f3ebe223d91c042a5e86aff31e460f6cc3f b/test/core/security/corpus/ssl_server_corpus/2b4a1f3ebe223d91c042a5e86aff31e460f6cc3f Binary files differnew file mode 100644 index 0000000000..eca71b4ca6 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/2b4a1f3ebe223d91c042a5e86aff31e460f6cc3f diff --git a/test/core/security/corpus/ssl_server_corpus/2cfbe809bcf53160ecc0109b2df01a8696a226fd b/test/core/security/corpus/ssl_server_corpus/2cfbe809bcf53160ecc0109b2df01a8696a226fd Binary files differnew file mode 100644 index 0000000000..6a2035fe37 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/2cfbe809bcf53160ecc0109b2df01a8696a226fd diff --git a/test/core/security/corpus/ssl_server_corpus/2f770de96db36ef9a71f7eb09b2e8695ac1f0655 b/test/core/security/corpus/ssl_server_corpus/2f770de96db36ef9a71f7eb09b2e8695ac1f0655 Binary files differnew file mode 100644 index 0000000000..0d1c163bb2 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/2f770de96db36ef9a71f7eb09b2e8695ac1f0655 diff --git a/test/core/security/corpus/ssl_server_corpus/30ba8ad171657470b5312232387b7da70c387219 b/test/core/security/corpus/ssl_server_corpus/30ba8ad171657470b5312232387b7da70c387219 Binary files differnew file mode 100644 index 0000000000..297c1ce649 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/30ba8ad171657470b5312232387b7da70c387219 diff --git a/test/core/security/corpus/ssl_server_corpus/36548a97a8b847e17a77d1e646c6eb5ec001d84a b/test/core/security/corpus/ssl_server_corpus/36548a97a8b847e17a77d1e646c6eb5ec001d84a Binary files differnew file mode 100644 index 0000000000..9c209ebb50 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/36548a97a8b847e17a77d1e646c6eb5ec001d84a diff --git a/test/core/security/corpus/ssl_server_corpus/3c442804f73cfe826a609d97c12ef87852742883 b/test/core/security/corpus/ssl_server_corpus/3c442804f73cfe826a609d97c12ef87852742883 Binary files differnew file mode 100644 index 0000000000..e8574594af --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/3c442804f73cfe826a609d97c12ef87852742883 diff --git a/test/core/security/corpus/ssl_server_corpus/3dad758011b16a3771376f9af91242953be3e47b b/test/core/security/corpus/ssl_server_corpus/3dad758011b16a3771376f9af91242953be3e47b Binary files differnew file mode 100644 index 0000000000..11f9b74e3f --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/3dad758011b16a3771376f9af91242953be3e47b diff --git a/test/core/security/corpus/ssl_server_corpus/43b56a1adffaf2c3c994679bf2b6fe6414e13df4 b/test/core/security/corpus/ssl_server_corpus/43b56a1adffaf2c3c994679bf2b6fe6414e13df4 Binary files differnew file mode 100644 index 0000000000..197cc02ebc --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/43b56a1adffaf2c3c994679bf2b6fe6414e13df4 diff --git a/test/core/security/corpus/ssl_server_corpus/4446c60ab89c34e5ccc26bec18d7e7d21fe5aec1 b/test/core/security/corpus/ssl_server_corpus/4446c60ab89c34e5ccc26bec18d7e7d21fe5aec1 Binary files differnew file mode 100644 index 0000000000..baff50d61d --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/4446c60ab89c34e5ccc26bec18d7e7d21fe5aec1 diff --git a/test/core/security/corpus/ssl_server_corpus/44924b3866956d0668ec65750c3663279ac84a36 b/test/core/security/corpus/ssl_server_corpus/44924b3866956d0668ec65750c3663279ac84a36 Binary files differnew file mode 100644 index 0000000000..4fb36b65bb --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/44924b3866956d0668ec65750c3663279ac84a36 diff --git a/test/core/security/corpus/ssl_server_corpus/44e4370a4eafde61f8e7dc7e4542e0ad5ecf5253 b/test/core/security/corpus/ssl_server_corpus/44e4370a4eafde61f8e7dc7e4542e0ad5ecf5253 Binary files differnew file mode 100644 index 0000000000..0bc4da2caa --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/44e4370a4eafde61f8e7dc7e4542e0ad5ecf5253 diff --git a/test/core/security/corpus/ssl_server_corpus/44fb8c02117ebd75c97e517624c0abc9f9a76aa7 b/test/core/security/corpus/ssl_server_corpus/44fb8c02117ebd75c97e517624c0abc9f9a76aa7 Binary files differnew file mode 100644 index 0000000000..9e4b559e97 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/44fb8c02117ebd75c97e517624c0abc9f9a76aa7 diff --git a/test/core/security/corpus/ssl_server_corpus/45d76dd1f0a29fce3f8d289b5177263871eb3f83 b/test/core/security/corpus/ssl_server_corpus/45d76dd1f0a29fce3f8d289b5177263871eb3f83 Binary files differnew file mode 100644 index 0000000000..52168fa700 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/45d76dd1f0a29fce3f8d289b5177263871eb3f83 diff --git a/test/core/security/corpus/ssl_server_corpus/4fcbf18c4135352539eaf445c26f2f8a5da9b68e b/test/core/security/corpus/ssl_server_corpus/4fcbf18c4135352539eaf445c26f2f8a5da9b68e Binary files differnew file mode 100644 index 0000000000..e35f17d7e4 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/4fcbf18c4135352539eaf445c26f2f8a5da9b68e diff --git a/test/core/security/corpus/ssl_server_corpus/508ca86c6f4e6ecc30c252ccf74e78256a893b17 b/test/core/security/corpus/ssl_server_corpus/508ca86c6f4e6ecc30c252ccf74e78256a893b17 Binary files differnew file mode 100644 index 0000000000..5692502a64 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/508ca86c6f4e6ecc30c252ccf74e78256a893b17 diff --git a/test/core/security/corpus/ssl_server_corpus/515d240b860fcd1e77d4a5af291aa4a667d9b609 b/test/core/security/corpus/ssl_server_corpus/515d240b860fcd1e77d4a5af291aa4a667d9b609 Binary files differnew file mode 100644 index 0000000000..2de4f1f2bf --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/515d240b860fcd1e77d4a5af291aa4a667d9b609 diff --git a/test/core/security/corpus/ssl_server_corpus/528e9738d5016f01cf59d74f20a8aa3f341ad89e b/test/core/security/corpus/ssl_server_corpus/528e9738d5016f01cf59d74f20a8aa3f341ad89e Binary files differnew file mode 100644 index 0000000000..91fd77f9e3 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/528e9738d5016f01cf59d74f20a8aa3f341ad89e diff --git a/test/core/security/corpus/ssl_server_corpus/54b636a2bb66ccf8247b53ff76a6400e9f1355d0 b/test/core/security/corpus/ssl_server_corpus/54b636a2bb66ccf8247b53ff76a6400e9f1355d0 Binary files differnew file mode 100644 index 0000000000..0e8bf5b9dd --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/54b636a2bb66ccf8247b53ff76a6400e9f1355d0 diff --git a/test/core/security/corpus/ssl_server_corpus/5cc337c4b33cd703cd354804530f5b72684260d0 b/test/core/security/corpus/ssl_server_corpus/5cc337c4b33cd703cd354804530f5b72684260d0 Binary files differnew file mode 100644 index 0000000000..0b8827c39b --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/5cc337c4b33cd703cd354804530f5b72684260d0 diff --git a/test/core/security/corpus/ssl_server_corpus/5ce3ec59111bf328044e41fcf26b3bc542df527e b/test/core/security/corpus/ssl_server_corpus/5ce3ec59111bf328044e41fcf26b3bc542df527e Binary files differnew file mode 100644 index 0000000000..9ab3862c7d --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/5ce3ec59111bf328044e41fcf26b3bc542df527e diff --git a/test/core/security/corpus/ssl_server_corpus/5eaac270339f19cfce4eafa2e69d62adf100ad1c b/test/core/security/corpus/ssl_server_corpus/5eaac270339f19cfce4eafa2e69d62adf100ad1c new file mode 100644 index 0000000000..93d651b9a2 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/5eaac270339f19cfce4eafa2e69d62adf100ad1c @@ -0,0 +1 @@ + GEF
\ No newline at end of file diff --git a/test/core/security/corpus/ssl_server_corpus/6129382083353687a5c3acb3d4274b811227bf3d b/test/core/security/corpus/ssl_server_corpus/6129382083353687a5c3acb3d4274b811227bf3d Binary files differnew file mode 100644 index 0000000000..f8a9920fa8 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/6129382083353687a5c3acb3d4274b811227bf3d diff --git a/test/core/security/corpus/ssl_server_corpus/616a25f7c4557ef9eb33d4367c6884abc336802d b/test/core/security/corpus/ssl_server_corpus/616a25f7c4557ef9eb33d4367c6884abc336802d Binary files differnew file mode 100644 index 0000000000..25ce7c1041 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/616a25f7c4557ef9eb33d4367c6884abc336802d diff --git a/test/core/security/corpus/ssl_server_corpus/6214e558afbfdb8451e49b62619896492f1a8972 b/test/core/security/corpus/ssl_server_corpus/6214e558afbfdb8451e49b62619896492f1a8972 Binary files differnew file mode 100644 index 0000000000..db4c693368 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/6214e558afbfdb8451e49b62619896492f1a8972 diff --git a/test/core/security/corpus/ssl_server_corpus/6c6a6b2ce74acf8a8b90fc0b268ecc7dc992cd60 b/test/core/security/corpus/ssl_server_corpus/6c6a6b2ce74acf8a8b90fc0b268ecc7dc992cd60 new file mode 100644 index 0000000000..74960bda47 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/6c6a6b2ce74acf8a8b90fc0b268ecc7dc992cd60 @@ -0,0 +1,2 @@ +POST TF +
\ No newline at end of file diff --git a/test/core/security/corpus/ssl_server_corpus/6f72309e1b23b824e9bbb9abf74a014b78be038e b/test/core/security/corpus/ssl_server_corpus/6f72309e1b23b824e9bbb9abf74a014b78be038e Binary files differnew file mode 100644 index 0000000000..74b7f9c4b2 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/6f72309e1b23b824e9bbb9abf74a014b78be038e diff --git a/test/core/security/corpus/ssl_server_corpus/7137ffad853e4dd76c6d6490f37b36e20de7ede0 b/test/core/security/corpus/ssl_server_corpus/7137ffad853e4dd76c6d6490f37b36e20de7ede0 Binary files differnew file mode 100644 index 0000000000..c28d5e39e5 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/7137ffad853e4dd76c6d6490f37b36e20de7ede0 diff --git a/test/core/security/corpus/ssl_server_corpus/71c9356b6b6c5a3a07033d0fa4ed417fa74a77e5 b/test/core/security/corpus/ssl_server_corpus/71c9356b6b6c5a3a07033d0fa4ed417fa74a77e5 Binary files differnew file mode 100644 index 0000000000..9bfed86391 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/71c9356b6b6c5a3a07033d0fa4ed417fa74a77e5 diff --git a/test/core/security/corpus/ssl_server_corpus/7414938799ed61282f41d5fb1474751ca52b2682 b/test/core/security/corpus/ssl_server_corpus/7414938799ed61282f41d5fb1474751ca52b2682 Binary files differnew file mode 100644 index 0000000000..96343edcfd --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/7414938799ed61282f41d5fb1474751ca52b2682 diff --git a/test/core/security/corpus/ssl_server_corpus/75e853eb2ff7e78efb327e114b39baff5a1dd5bb b/test/core/security/corpus/ssl_server_corpus/75e853eb2ff7e78efb327e114b39baff5a1dd5bb Binary files differnew file mode 100644 index 0000000000..a53b956562 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/75e853eb2ff7e78efb327e114b39baff5a1dd5bb diff --git a/test/core/security/corpus/ssl_server_corpus/7607c92952b4429e350260d8074c3c460468fd49 b/test/core/security/corpus/ssl_server_corpus/7607c92952b4429e350260d8074c3c460468fd49 Binary files differnew file mode 100644 index 0000000000..b6607caf0b --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/7607c92952b4429e350260d8074c3c460468fd49 diff --git a/test/core/security/corpus/ssl_server_corpus/7677373c082fee56d8cdde009d9db5b117a4c8de b/test/core/security/corpus/ssl_server_corpus/7677373c082fee56d8cdde009d9db5b117a4c8de Binary files differnew file mode 100644 index 0000000000..1a6a772917 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/7677373c082fee56d8cdde009d9db5b117a4c8de diff --git a/test/core/security/corpus/ssl_server_corpus/76abde5c970743f9fb8bc781e46c431dee2aa104 b/test/core/security/corpus/ssl_server_corpus/76abde5c970743f9fb8bc781e46c431dee2aa104 new file mode 100644 index 0000000000..11ab460090 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/76abde5c970743f9fb8bc781e46c431dee2aa104 @@ -0,0 +1,2 @@ +CONNETF +
\ No newline at end of file diff --git a/test/core/security/corpus/ssl_server_corpus/77e0b4e2066853df9d32d475b8788e3d7d19329b b/test/core/security/corpus/ssl_server_corpus/77e0b4e2066853df9d32d475b8788e3d7d19329b Binary files differnew file mode 100644 index 0000000000..6eddfc2c2a --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/77e0b4e2066853df9d32d475b8788e3d7d19329b diff --git a/test/core/security/corpus/ssl_server_corpus/78e66840048ddc3c75e0e4abffbb3109af0d750e b/test/core/security/corpus/ssl_server_corpus/78e66840048ddc3c75e0e4abffbb3109af0d750e Binary files differnew file mode 100644 index 0000000000..f7cd40b1d0 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/78e66840048ddc3c75e0e4abffbb3109af0d750e diff --git a/test/core/security/corpus/ssl_server_corpus/7dc620eb45764390c7b106362fc4922227415407 b/test/core/security/corpus/ssl_server_corpus/7dc620eb45764390c7b106362fc4922227415407 Binary files differnew file mode 100644 index 0000000000..cc0b544aba --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/7dc620eb45764390c7b106362fc4922227415407 diff --git a/test/core/security/corpus/ssl_server_corpus/82ca7a52d589e9dbae37ebf1c59fac7ad876eb7c b/test/core/security/corpus/ssl_server_corpus/82ca7a52d589e9dbae37ebf1c59fac7ad876eb7c new file mode 100644 index 0000000000..36bf08db66 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/82ca7a52d589e9dbae37ebf1c59fac7ad876eb7c @@ -0,0 +1 @@ +HTT diff --git a/test/core/security/corpus/ssl_server_corpus/8997d472f73eec84fea712638abd762818ec92ec b/test/core/security/corpus/ssl_server_corpus/8997d472f73eec84fea712638abd762818ec92ec Binary files differnew file mode 100644 index 0000000000..0a1b6bee6c --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/8997d472f73eec84fea712638abd762818ec92ec diff --git a/test/core/security/corpus/ssl_server_corpus/933bc3fdc56718d7ac0486c26eecddb6db1c5ba2 b/test/core/security/corpus/ssl_server_corpus/933bc3fdc56718d7ac0486c26eecddb6db1c5ba2 Binary files differnew file mode 100644 index 0000000000..2e3c2c83e3 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/933bc3fdc56718d7ac0486c26eecddb6db1c5ba2 diff --git a/test/core/security/corpus/ssl_server_corpus/94431bda60ddc175cf86273ddc07cb41ecf45fa1 b/test/core/security/corpus/ssl_server_corpus/94431bda60ddc175cf86273ddc07cb41ecf45fa1 Binary files differnew file mode 100644 index 0000000000..8f9893f46e --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/94431bda60ddc175cf86273ddc07cb41ecf45fa1 diff --git a/test/core/security/corpus/ssl_server_corpus/94c4272b2bb4fa9178eb4ae7dcf4b796fdcb22ac b/test/core/security/corpus/ssl_server_corpus/94c4272b2bb4fa9178eb4ae7dcf4b796fdcb22ac Binary files differnew file mode 100644 index 0000000000..4b77d18fef --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/94c4272b2bb4fa9178eb4ae7dcf4b796fdcb22ac diff --git a/test/core/security/corpus/ssl_server_corpus/9551c32a794250fb425005d8faf4bd24475acd41 b/test/core/security/corpus/ssl_server_corpus/9551c32a794250fb425005d8faf4bd24475acd41 Binary files differnew file mode 100644 index 0000000000..548f26968d --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/9551c32a794250fb425005d8faf4bd24475acd41 diff --git a/test/core/security/corpus/ssl_server_corpus/9677da7c82f18cec3e0ed2e78aadd6e590271a52 b/test/core/security/corpus/ssl_server_corpus/9677da7c82f18cec3e0ed2e78aadd6e590271a52 Binary files differnew file mode 100644 index 0000000000..c0dbbdfc8e --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/9677da7c82f18cec3e0ed2e78aadd6e590271a52 diff --git a/test/core/security/corpus/ssl_server_corpus/9c2e6291aff608f3f5307a7c80db6b17107f0575 b/test/core/security/corpus/ssl_server_corpus/9c2e6291aff608f3f5307a7c80db6b17107f0575 Binary files differnew file mode 100644 index 0000000000..86c59f30eb --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/9c2e6291aff608f3f5307a7c80db6b17107f0575 diff --git a/test/core/security/corpus/ssl_server_corpus/9c39dc04c7414ca0bb64fb942422bebe83ed8e8f b/test/core/security/corpus/ssl_server_corpus/9c39dc04c7414ca0bb64fb942422bebe83ed8e8f Binary files differnew file mode 100644 index 0000000000..3bb43d133f --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/9c39dc04c7414ca0bb64fb942422bebe83ed8e8f diff --git a/test/core/security/corpus/ssl_server_corpus/9cc8547d183a4f2ab7022b36376ca4a6230726c6 b/test/core/security/corpus/ssl_server_corpus/9cc8547d183a4f2ab7022b36376ca4a6230726c6 Binary files differnew file mode 100644 index 0000000000..5a1b23f80c --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/9cc8547d183a4f2ab7022b36376ca4a6230726c6 diff --git a/test/core/security/corpus/ssl_server_corpus/9e19e5e77789c34f99bbe1e6de198610d6765806 b/test/core/security/corpus/ssl_server_corpus/9e19e5e77789c34f99bbe1e6de198610d6765806 Binary files differnew file mode 100644 index 0000000000..66648167e5 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/9e19e5e77789c34f99bbe1e6de198610d6765806 diff --git a/test/core/security/corpus/ssl_server_corpus/9f0853ccf6912df9fba2d5fc3a1ddece41c377ac b/test/core/security/corpus/ssl_server_corpus/9f0853ccf6912df9fba2d5fc3a1ddece41c377ac Binary files differnew file mode 100644 index 0000000000..30d80d86c9 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/9f0853ccf6912df9fba2d5fc3a1ddece41c377ac diff --git a/test/core/security/corpus/ssl_server_corpus/a6d521e501322f052df5a81ee622e0e4942ddcda b/test/core/security/corpus/ssl_server_corpus/a6d521e501322f052df5a81ee622e0e4942ddcda Binary files differnew file mode 100644 index 0000000000..0552176dcb --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/a6d521e501322f052df5a81ee622e0e4942ddcda diff --git a/test/core/security/corpus/ssl_server_corpus/a9dc20f09890403be510357a7665a8f0db2468a4 b/test/core/security/corpus/ssl_server_corpus/a9dc20f09890403be510357a7665a8f0db2468a4 Binary files differnew file mode 100644 index 0000000000..2c82ef585a --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/a9dc20f09890403be510357a7665a8f0db2468a4 diff --git a/test/core/security/corpus/ssl_server_corpus/ac1c60970910880558ae7a2ca2e155cfd7772e05 b/test/core/security/corpus/ssl_server_corpus/ac1c60970910880558ae7a2ca2e155cfd7772e05 Binary files differnew file mode 100644 index 0000000000..9040ab0a63 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/ac1c60970910880558ae7a2ca2e155cfd7772e05 diff --git a/test/core/security/corpus/ssl_server_corpus/afe36d0187a155fc6e4e5c055c0ed0f3802cf696 b/test/core/security/corpus/ssl_server_corpus/afe36d0187a155fc6e4e5c055c0ed0f3802cf696 Binary files differnew file mode 100644 index 0000000000..473e77e048 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/afe36d0187a155fc6e4e5c055c0ed0f3802cf696 diff --git a/test/core/security/corpus/ssl_server_corpus/b12b5fc39edc5407b4a525c414ff6b5e116eee05 b/test/core/security/corpus/ssl_server_corpus/b12b5fc39edc5407b4a525c414ff6b5e116eee05 Binary files differnew file mode 100644 index 0000000000..09018f3092 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/b12b5fc39edc5407b4a525c414ff6b5e116eee05 diff --git a/test/core/security/corpus/ssl_server_corpus/b5b088c6e3a96f88119a940874ab04cb954797ae b/test/core/security/corpus/ssl_server_corpus/b5b088c6e3a96f88119a940874ab04cb954797ae new file mode 100644 index 0000000000..d0f3d4d116 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/b5b088c6e3a96f88119a940874ab04cb954797ae @@ -0,0 +1 @@ +FT diff --git a/test/core/security/corpus/ssl_server_corpus/b65ad77a43ede3394ba714238829860c4ef4bc9f b/test/core/security/corpus/ssl_server_corpus/b65ad77a43ede3394ba714238829860c4ef4bc9f Binary files differnew file mode 100644 index 0000000000..fdb6e038e2 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/b65ad77a43ede3394ba714238829860c4ef4bc9f diff --git a/test/core/security/corpus/ssl_server_corpus/b6f265cad9d47e2ccd17a73a6d309d8898dc5428 b/test/core/security/corpus/ssl_server_corpus/b6f265cad9d47e2ccd17a73a6d309d8898dc5428 Binary files differnew file mode 100644 index 0000000000..bd6b0d89c1 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/b6f265cad9d47e2ccd17a73a6d309d8898dc5428 diff --git a/test/core/security/corpus/ssl_server_corpus/b7ca5868bca7ae7d1952f44ca966218b26fb7207 b/test/core/security/corpus/ssl_server_corpus/b7ca5868bca7ae7d1952f44ca966218b26fb7207 Binary files differnew file mode 100644 index 0000000000..29873bae09 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/b7ca5868bca7ae7d1952f44ca966218b26fb7207 diff --git a/test/core/security/corpus/ssl_server_corpus/bd20809eacabadb9bcc77d31e42d3359117b03f2 b/test/core/security/corpus/ssl_server_corpus/bd20809eacabadb9bcc77d31e42d3359117b03f2 Binary files differnew file mode 100644 index 0000000000..150b87d741 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/bd20809eacabadb9bcc77d31e42d3359117b03f2 diff --git a/test/core/security/corpus/ssl_server_corpus/c328623c4ce12505a54cf1a7a1606e1db36e870d b/test/core/security/corpus/ssl_server_corpus/c328623c4ce12505a54cf1a7a1606e1db36e870d Binary files differnew file mode 100644 index 0000000000..32ef98cdb6 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/c328623c4ce12505a54cf1a7a1606e1db36e870d diff --git a/test/core/security/corpus/ssl_server_corpus/c823e8bd5526d9fe7d51319737f51bd18bdd75e8 b/test/core/security/corpus/ssl_server_corpus/c823e8bd5526d9fe7d51319737f51bd18bdd75e8 Binary files differnew file mode 100644 index 0000000000..ed09bd0f4a --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/c823e8bd5526d9fe7d51319737f51bd18bdd75e8 diff --git a/test/core/security/corpus/ssl_server_corpus/c9394095d86ff36b69d90f7122592bf51cafe7dd b/test/core/security/corpus/ssl_server_corpus/c9394095d86ff36b69d90f7122592bf51cafe7dd Binary files differnew file mode 100644 index 0000000000..6aa6cd853f --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/c9394095d86ff36b69d90f7122592bf51cafe7dd diff --git a/test/core/security/corpus/ssl_server_corpus/cdbf0d2ae953bec07a67b7152785b548e55f85a4 b/test/core/security/corpus/ssl_server_corpus/cdbf0d2ae953bec07a67b7152785b548e55f85a4 new file mode 100644 index 0000000000..05a2a33184 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/cdbf0d2ae953bec07a67b7152785b548e55f85a4 @@ -0,0 +1 @@ +HTTP diff --git a/test/core/security/corpus/ssl_server_corpus/cef06f9c35ee338998703555847d70c26bfc9474 b/test/core/security/corpus/ssl_server_corpus/cef06f9c35ee338998703555847d70c26bfc9474 Binary files differnew file mode 100644 index 0000000000..09f8c4ef69 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/cef06f9c35ee338998703555847d70c26bfc9474 diff --git a/test/core/security/corpus/ssl_server_corpus/cfb40ab8eb7031e978bed2418cdc2f0b8a8d8ec7 b/test/core/security/corpus/ssl_server_corpus/cfb40ab8eb7031e978bed2418cdc2f0b8a8d8ec7 Binary files differnew file mode 100644 index 0000000000..b1eceeaa0b --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/cfb40ab8eb7031e978bed2418cdc2f0b8a8d8ec7 diff --git a/test/core/security/corpus/ssl_server_corpus/d30840c3f48f11179ef976ada30477045c6d1e98 b/test/core/security/corpus/ssl_server_corpus/d30840c3f48f11179ef976ada30477045c6d1e98 Binary files differnew file mode 100644 index 0000000000..03710842a2 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/d30840c3f48f11179ef976ada30477045c6d1e98 diff --git a/test/core/security/corpus/ssl_server_corpus/d5afef69141edc7f4911243cf2deb19c912999cf b/test/core/security/corpus/ssl_server_corpus/d5afef69141edc7f4911243cf2deb19c912999cf Binary files differnew file mode 100644 index 0000000000..3086e8e133 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/d5afef69141edc7f4911243cf2deb19c912999cf diff --git a/test/core/security/corpus/ssl_server_corpus/d5cf71396e1a04da1a7ec266957ffd2de29d6a57 b/test/core/security/corpus/ssl_server_corpus/d5cf71396e1a04da1a7ec266957ffd2de29d6a57 Binary files differnew file mode 100644 index 0000000000..9e88e9e405 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/d5cf71396e1a04da1a7ec266957ffd2de29d6a57 diff --git a/test/core/security/corpus/ssl_server_corpus/d6dd8a2b085db5d33ef24b23502293ce1ce906a3 b/test/core/security/corpus/ssl_server_corpus/d6dd8a2b085db5d33ef24b23502293ce1ce906a3 Binary files differnew file mode 100644 index 0000000000..8bd63513c9 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/d6dd8a2b085db5d33ef24b23502293ce1ce906a3 diff --git a/test/core/security/corpus/ssl_server_corpus/d7676dcd39b7c7cfaac513a98b56fe4ac8ea27d8 b/test/core/security/corpus/ssl_server_corpus/d7676dcd39b7c7cfaac513a98b56fe4ac8ea27d8 Binary files differnew file mode 100644 index 0000000000..87dcaf1fc3 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/d7676dcd39b7c7cfaac513a98b56fe4ac8ea27d8 diff --git a/test/core/security/corpus/ssl_server_corpus/d8c9e9ef14abc23b36cb493283ba3e2812d9e537 b/test/core/security/corpus/ssl_server_corpus/d8c9e9ef14abc23b36cb493283ba3e2812d9e537 Binary files differnew file mode 100644 index 0000000000..463accbde7 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/d8c9e9ef14abc23b36cb493283ba3e2812d9e537 diff --git a/test/core/security/corpus/ssl_server_corpus/d9edb0aa5d2fe4af26ac861770c1530a4075f919 b/test/core/security/corpus/ssl_server_corpus/d9edb0aa5d2fe4af26ac861770c1530a4075f919 new file mode 100644 index 0000000000..809604e344 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/d9edb0aa5d2fe4af26ac861770c1530a4075f919 @@ -0,0 +1 @@ +GET F
\ No newline at end of file diff --git a/test/core/security/corpus/ssl_server_corpus/da1b52041957334b9ea1371bd2993013118bc82d b/test/core/security/corpus/ssl_server_corpus/da1b52041957334b9ea1371bd2993013118bc82d Binary files differnew file mode 100644 index 0000000000..6f09bd8856 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/da1b52041957334b9ea1371bd2993013118bc82d diff --git a/test/core/security/corpus/ssl_server_corpus/dca7861424c8f92d3720de5c4488454cde1c39df b/test/core/security/corpus/ssl_server_corpus/dca7861424c8f92d3720de5c4488454cde1c39df Binary files differnew file mode 100644 index 0000000000..e3bf947570 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/dca7861424c8f92d3720de5c4488454cde1c39df diff --git a/test/core/security/corpus/ssl_server_corpus/df3755e257d024ef8ab08f6d5cefcf28148ea4b1 b/test/core/security/corpus/ssl_server_corpus/df3755e257d024ef8ab08f6d5cefcf28148ea4b1 Binary files differnew file mode 100644 index 0000000000..a2a28cd60b --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/df3755e257d024ef8ab08f6d5cefcf28148ea4b1 diff --git a/test/core/security/corpus/ssl_server_corpus/e360a49faefb87d671edb99e777f528f52cac9ae b/test/core/security/corpus/ssl_server_corpus/e360a49faefb87d671edb99e777f528f52cac9ae Binary files differnew file mode 100644 index 0000000000..92a0113f43 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/e360a49faefb87d671edb99e777f528f52cac9ae diff --git a/test/core/security/corpus/ssl_server_corpus/e5e789605744d47e5a5d433bb04db1b413bc91a8 b/test/core/security/corpus/ssl_server_corpus/e5e789605744d47e5a5d433bb04db1b413bc91a8 Binary files differnew file mode 100644 index 0000000000..55f63dcec9 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/e5e789605744d47e5a5d433bb04db1b413bc91a8 diff --git a/test/core/security/corpus/ssl_server_corpus/e6e44a6aa0ece409450c85e43d02c57e338ce1da b/test/core/security/corpus/ssl_server_corpus/e6e44a6aa0ece409450c85e43d02c57e338ce1da Binary files differnew file mode 100644 index 0000000000..6363a5796c --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/e6e44a6aa0ece409450c85e43d02c57e338ce1da diff --git a/test/core/security/corpus/ssl_server_corpus/e8ebd49ee98cf57ca7eb35b6e96ef8866270aac6 b/test/core/security/corpus/ssl_server_corpus/e8ebd49ee98cf57ca7eb35b6e96ef8866270aac6 Binary files differnew file mode 100644 index 0000000000..cc292176e8 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/e8ebd49ee98cf57ca7eb35b6e96ef8866270aac6 diff --git a/test/core/security/corpus/ssl_server_corpus/ea0645f46ccd233337a8389b6118db5b0289f040 b/test/core/security/corpus/ssl_server_corpus/ea0645f46ccd233337a8389b6118db5b0289f040 Binary files differnew file mode 100644 index 0000000000..8379f01823 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/ea0645f46ccd233337a8389b6118db5b0289f040 diff --git a/test/core/security/corpus/ssl_server_corpus/f6f7687df6b7056d3c819c03c9268e22a956b6b5 b/test/core/security/corpus/ssl_server_corpus/f6f7687df6b7056d3c819c03c9268e22a956b6b5 Binary files differnew file mode 100644 index 0000000000..0a3b794dbf --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/f6f7687df6b7056d3c819c03c9268e22a956b6b5 diff --git a/test/core/security/corpus/ssl_server_corpus/f725caa73aa9467c5e934c49780fc409b36b251c b/test/core/security/corpus/ssl_server_corpus/f725caa73aa9467c5e934c49780fc409b36b251c Binary files differnew file mode 100644 index 0000000000..146d7f9924 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/f725caa73aa9467c5e934c49780fc409b36b251c diff --git a/test/core/security/corpus/ssl_server_corpus/f8d3326a860091edd4d60725f96f429d13f3abe6 b/test/core/security/corpus/ssl_server_corpus/f8d3326a860091edd4d60725f96f429d13f3abe6 Binary files differnew file mode 100644 index 0000000000..fa54b7b7b6 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/f8d3326a860091edd4d60725f96f429d13f3abe6 diff --git a/test/core/security/corpus/ssl_server_corpus/f9261344b4049e90e88b5af784dd29b938c5c838 b/test/core/security/corpus/ssl_server_corpus/f9261344b4049e90e88b5af784dd29b938c5c838 Binary files differnew file mode 100644 index 0000000000..02a90fb3a4 --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/f9261344b4049e90e88b5af784dd29b938c5c838 diff --git a/test/core/security/corpus/ssl_server_corpus/f95b97ece3b46815204a8e6d6e94f92ec40a9672 b/test/core/security/corpus/ssl_server_corpus/f95b97ece3b46815204a8e6d6e94f92ec40a9672 Binary files differnew file mode 100644 index 0000000000..c21b9b830e --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/f95b97ece3b46815204a8e6d6e94f92ec40a9672 diff --git a/test/core/security/corpus/ssl_server_corpus/f97db29497e4e3225016a6ced837e20a13622f16 b/test/core/security/corpus/ssl_server_corpus/f97db29497e4e3225016a6ced837e20a13622f16 Binary files differnew file mode 100644 index 0000000000..1159a7772b --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/f97db29497e4e3225016a6ced837e20a13622f16 diff --git a/test/core/security/corpus/ssl_server_corpus/ff1a900b12f19772f9a86bd5f560a754cdb18d1a b/test/core/security/corpus/ssl_server_corpus/ff1a900b12f19772f9a86bd5f560a754cdb18d1a Binary files differnew file mode 100644 index 0000000000..85adeac4bb --- /dev/null +++ b/test/core/security/corpus/ssl_server_corpus/ff1a900b12f19772f9a86bd5f560a754cdb18d1a diff --git a/test/core/security/create_jwt.c b/test/core/security/create_jwt.c index 1bd135f175..741ace9bdd 100644 --- a/test/core/security/create_jwt.c +++ b/test/core/security/create_jwt.c @@ -37,21 +37,21 @@ #include "src/core/lib/iomgr/load_file.h" #include "src/core/lib/security/credentials/jwt/jwt_credentials.h" +#include <grpc/slice.h> #include <grpc/support/alloc.h> #include <grpc/support/cmdline.h> #include <grpc/support/log.h> -#include <grpc/support/slice.h> void create_jwt(const char *json_key_file_path, const char *service_url, const char *scope) { grpc_auth_json_key key; char *jwt; - gpr_slice json_key_data; + grpc_slice json_key_data; GPR_ASSERT(GRPC_LOG_IF_ERROR( "load_file", grpc_load_file(json_key_file_path, 1, &json_key_data))); key = grpc_auth_json_key_create_from_string( - (const char *)GPR_SLICE_START_PTR(json_key_data)); - gpr_slice_unref(json_key_data); + (const char *)GRPC_SLICE_START_PTR(json_key_data)); + grpc_slice_unref(json_key_data); if (!grpc_auth_json_key_is_valid(&key)) { fprintf(stderr, "Could not parse json key.\n"); exit(1); diff --git a/test/core/security/credentials_test.c b/test/core/security/credentials_test.c index b74baa33f1..d4c755088d 100644 --- a/test/core/security/credentials_test.c +++ b/test/core/security/credentials_test.c @@ -187,14 +187,14 @@ static void test_add_to_empty_md_store(void) { grpc_credentials_md_store *store = grpc_credentials_md_store_create(0); const char *key_str = "hello"; const char *value_str = "there blah blah blah blah blah blah blah"; - gpr_slice key = gpr_slice_from_copied_string(key_str); - gpr_slice value = gpr_slice_from_copied_string(value_str); + grpc_slice key = grpc_slice_from_copied_string(key_str); + grpc_slice value = grpc_slice_from_copied_string(value_str); grpc_credentials_md_store_add(store, key, value); GPR_ASSERT(store->num_entries == 1); - GPR_ASSERT(gpr_slice_cmp(key, store->entries[0].key) == 0); - GPR_ASSERT(gpr_slice_cmp(value, store->entries[0].value) == 0); - gpr_slice_unref(key); - gpr_slice_unref(value); + GPR_ASSERT(grpc_slice_cmp(key, store->entries[0].key) == 0); + GPR_ASSERT(grpc_slice_cmp(value, store->entries[0].value) == 0); + grpc_slice_unref(key); + grpc_slice_unref(value); grpc_credentials_md_store_unref(store); } @@ -204,8 +204,8 @@ static void test_add_cstrings_to_empty_md_store(void) { const char *value_str = "there blah blah blah blah blah blah blah"; grpc_credentials_md_store_add_cstrings(store, key_str, value_str); GPR_ASSERT(store->num_entries == 1); - GPR_ASSERT(gpr_slice_str_cmp(store->entries[0].key, key_str) == 0); - GPR_ASSERT(gpr_slice_str_cmp(store->entries[0].value, value_str) == 0); + GPR_ASSERT(grpc_slice_str_cmp(store->entries[0].key, key_str) == 0); + GPR_ASSERT(grpc_slice_str_cmp(store->entries[0].value, value_str) == 0); grpc_credentials_md_store_unref(store); } @@ -227,8 +227,8 @@ static void test_add_abunch_to_md_store(void) { grpc_credentials_md_store_add_cstrings(store, key_str, value_str); } for (i = 0; i < num_entries; i++) { - GPR_ASSERT(gpr_slice_str_cmp(store->entries[i].key, key_str) == 0); - GPR_ASSERT(gpr_slice_str_cmp(store->entries[i].value, value_str) == 0); + GPR_ASSERT(grpc_slice_str_cmp(store->entries[i].key, key_str) == 0); + GPR_ASSERT(grpc_slice_str_cmp(store->entries[i].value, value_str) == 0); } grpc_credentials_md_store_unref(store); } @@ -243,9 +243,10 @@ static void test_oauth2_token_fetcher_creds_parsing_ok(void) { GPR_ASSERT(token_lifetime.tv_sec == 3599); GPR_ASSERT(token_lifetime.tv_nsec == 0); GPR_ASSERT(token_md->num_entries == 1); - GPR_ASSERT(gpr_slice_str_cmp(token_md->entries[0].key, "authorization") == 0); - GPR_ASSERT(gpr_slice_str_cmp(token_md->entries[0].value, - "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_") == + GPR_ASSERT(grpc_slice_str_cmp(token_md->entries[0].key, "authorization") == + 0); + GPR_ASSERT(grpc_slice_str_cmp(token_md->entries[0].value, + "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_") == 0); grpc_credentials_md_store_unref(token_md); grpc_http_response_destroy(&response); @@ -333,8 +334,8 @@ static void check_metadata(expected_md *expected, grpc_credentials_md *md_elems, for (i = 0; i < num_md; i++) { size_t j; for (j = 0; j < num_md; j++) { - if (0 == gpr_slice_str_cmp(md_elems[j].key, expected[i].key)) { - GPR_ASSERT(gpr_slice_str_cmp(md_elems[j].value, expected[i].value) == + if (0 == grpc_slice_str_cmp(md_elems[j].key, expected[i].key)) { + GPR_ASSERT(grpc_slice_str_cmp(md_elems[j].value, expected[i].value) == 0); break; } @@ -528,9 +529,9 @@ static void on_oauth2_creds_get_metadata_success( GPR_ASSERT(status == GRPC_CREDENTIALS_OK); GPR_ASSERT(error_details == NULL); GPR_ASSERT(num_md == 1); - GPR_ASSERT(gpr_slice_str_cmp(md_elems[0].key, "authorization") == 0); - GPR_ASSERT(gpr_slice_str_cmp(md_elems[0].value, - "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_") == + GPR_ASSERT(grpc_slice_str_cmp(md_elems[0].key, "authorization") == 0); + GPR_ASSERT(grpc_slice_str_cmp(md_elems[0].value, + "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_") == 0); GPR_ASSERT(user_data != NULL); GPR_ASSERT(strcmp((const char *)user_data, test_user_data) == 0); @@ -781,8 +782,8 @@ static void on_jwt_creds_get_metadata_success( GPR_ASSERT(status == GRPC_CREDENTIALS_OK); GPR_ASSERT(error_details == NULL); GPR_ASSERT(num_md == 1); - GPR_ASSERT(gpr_slice_str_cmp(md_elems[0].key, "authorization") == 0); - GPR_ASSERT(gpr_slice_str_cmp(md_elems[0].value, expected_md_value) == 0); + GPR_ASSERT(grpc_slice_str_cmp(md_elems[0].key, "authorization") == 0); + GPR_ASSERT(grpc_slice_str_cmp(md_elems[0].value, expected_md_value) == 0); GPR_ASSERT(user_data != NULL); GPR_ASSERT(strcmp((const char *)user_data, test_user_data) == 0); gpr_free(expected_md_value); @@ -1057,8 +1058,8 @@ static void on_plugin_metadata_received_success( GPR_ASSERT(md_elems != NULL); GPR_ASSERT(num_md == GPR_ARRAY_SIZE(plugin_md)); for (i = 0; i < num_md; i++) { - GPR_ASSERT(gpr_slice_str_cmp(md_elems[i].key, plugin_md[i].key) == 0); - GPR_ASSERT(gpr_slice_str_cmp(md_elems[i].value, plugin_md[i].value) == 0); + GPR_ASSERT(grpc_slice_str_cmp(md_elems[i].key, plugin_md[i].key) == 0); + GPR_ASSERT(grpc_slice_str_cmp(md_elems[i].value, plugin_md[i].value) == 0); } } diff --git a/test/core/security/fetch_oauth2.c b/test/core/security/fetch_oauth2.c index 292f59a7c1..e9e211206c 100644 --- a/test/core/security/fetch_oauth2.c +++ b/test/core/security/fetch_oauth2.c @@ -36,10 +36,10 @@ #include <grpc/grpc.h> #include <grpc/grpc_security.h> +#include <grpc/slice.h> #include <grpc/support/alloc.h> #include <grpc/support/cmdline.h> #include <grpc/support/log.h> -#include <grpc/support/slice.h> #include <grpc/support/sync.h> #include "src/core/lib/iomgr/load_file.h" @@ -48,12 +48,12 @@ static grpc_call_credentials *create_refresh_token_creds( const char *json_refresh_token_file_path) { - gpr_slice refresh_token; + grpc_slice refresh_token; GPR_ASSERT(GRPC_LOG_IF_ERROR( "load_file", grpc_load_file(json_refresh_token_file_path, 1, &refresh_token))); return grpc_google_refresh_token_credentials_create( - (const char *)GPR_SLICE_START_PTR(refresh_token), NULL); + (const char *)GRPC_SLICE_START_PTR(refresh_token), NULL); } int main(int argc, char **argv) { diff --git a/test/core/security/json_token_test.c b/test/core/security/json_token_test.c index 405fe56c46..201655881f 100644 --- a/test/core/security/json_token_test.c +++ b/test/core/security/json_token_test.c @@ -37,9 +37,9 @@ #include <string.h> #include <grpc/grpc_security.h> +#include <grpc/slice.h> #include <grpc/support/alloc.h> #include <grpc/support/log.h> -#include <grpc/support/slice.h> #include "src/core/lib/json/json.h" #include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" @@ -223,20 +223,20 @@ static grpc_json *parse_json_part_from_jwt(const char *str, size_t len, char *b64; char *decoded; grpc_json *json; - gpr_slice slice; + grpc_slice slice; b64 = gpr_malloc(len + 1); strncpy(b64, str, len); b64[len] = '\0'; slice = grpc_base64_decode(b64, 1); - GPR_ASSERT(!GPR_SLICE_IS_EMPTY(slice)); - decoded = gpr_malloc(GPR_SLICE_LENGTH(slice) + 1); - strncpy(decoded, (const char *)GPR_SLICE_START_PTR(slice), - GPR_SLICE_LENGTH(slice)); - decoded[GPR_SLICE_LENGTH(slice)] = '\0'; + GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(slice)); + decoded = gpr_malloc(GRPC_SLICE_LENGTH(slice) + 1); + strncpy(decoded, (const char *)GRPC_SLICE_START_PTR(slice), + GRPC_SLICE_LENGTH(slice)); + decoded[GRPC_SLICE_LENGTH(slice)] = '\0'; json = grpc_json_parse_string(decoded); gpr_free(b64); *scratchpad = decoded; - gpr_slice_unref(slice); + grpc_slice_unref(slice); return json; } @@ -341,9 +341,9 @@ static void check_jwt_signature(const char *b64_signature, RSA *rsa_key, EVP_MD_CTX *md_ctx = EVP_MD_CTX_create(); EVP_PKEY *key = EVP_PKEY_new(); - gpr_slice sig = grpc_base64_decode(b64_signature, 1); - GPR_ASSERT(!GPR_SLICE_IS_EMPTY(sig)); - GPR_ASSERT(GPR_SLICE_LENGTH(sig) == 128); + grpc_slice sig = grpc_base64_decode(b64_signature, 1); + GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(sig)); + GPR_ASSERT(GRPC_SLICE_LENGTH(sig) == 128); GPR_ASSERT(md_ctx != NULL); GPR_ASSERT(key != NULL); @@ -352,10 +352,10 @@ static void check_jwt_signature(const char *b64_signature, RSA *rsa_key, GPR_ASSERT(EVP_DigestVerifyInit(md_ctx, NULL, EVP_sha256(), NULL, key) == 1); GPR_ASSERT(EVP_DigestVerifyUpdate(md_ctx, signed_data, signed_data_size) == 1); - GPR_ASSERT(EVP_DigestVerifyFinal(md_ctx, GPR_SLICE_START_PTR(sig), - GPR_SLICE_LENGTH(sig)) == 1); + GPR_ASSERT(EVP_DigestVerifyFinal(md_ctx, GRPC_SLICE_START_PTR(sig), + GRPC_SLICE_LENGTH(sig)) == 1); - gpr_slice_unref(sig); + grpc_slice_unref(sig); if (key != NULL) EVP_PKEY_free(key); if (md_ctx != NULL) EVP_MD_CTX_destroy(md_ctx); } diff --git a/test/core/security/jwt_verifier_test.c b/test/core/security/jwt_verifier_test.c index 36b331a777..f8afba8d6d 100644 --- a/test/core/security/jwt_verifier_test.c +++ b/test/core/security/jwt_verifier_test.c @@ -37,9 +37,9 @@ #include <grpc/grpc.h> +#include <grpc/slice.h> #include <grpc/support/alloc.h> #include <grpc/support/log.h> -#include <grpc/support/slice.h> #include <grpc/support/string_util.h> #include "src/core/lib/http/httpcli.h" @@ -181,9 +181,9 @@ typedef struct { static void test_claims_success(void) { grpc_jwt_claims *claims; - gpr_slice s = gpr_slice_from_copied_string(claims_without_time_constraint); + grpc_slice s = grpc_slice_from_copied_string(claims_without_time_constraint); grpc_json *json = grpc_json_parse_string_with_len( - (char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s)); + (char *)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s)); GPR_ASSERT(json != NULL); claims = grpc_jwt_claims_from_json(json, s); GPR_ASSERT(claims != NULL); @@ -199,9 +199,9 @@ static void test_claims_success(void) { static void test_expired_claims_failure(void) { grpc_jwt_claims *claims; - gpr_slice s = gpr_slice_from_copied_string(expired_claims); + grpc_slice s = grpc_slice_from_copied_string(expired_claims); grpc_json *json = grpc_json_parse_string_with_len( - (char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s)); + (char *)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s)); gpr_timespec exp_iat = {100, 0, GPR_CLOCK_REALTIME}; gpr_timespec exp_exp = {120, 0, GPR_CLOCK_REALTIME}; gpr_timespec exp_nbf = {60, 0, GPR_CLOCK_REALTIME}; @@ -223,17 +223,17 @@ static void test_expired_claims_failure(void) { } static void test_invalid_claims_failure(void) { - gpr_slice s = gpr_slice_from_copied_string(invalid_claims); + grpc_slice s = grpc_slice_from_copied_string(invalid_claims); grpc_json *json = grpc_json_parse_string_with_len( - (char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s)); + (char *)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s)); GPR_ASSERT(grpc_jwt_claims_from_json(json, s) == NULL); } static void test_bad_audience_claims_failure(void) { grpc_jwt_claims *claims; - gpr_slice s = gpr_slice_from_copied_string(claims_without_time_constraint); + grpc_slice s = grpc_slice_from_copied_string(claims_without_time_constraint); grpc_json *json = grpc_json_parse_string_with_len( - (char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s)); + (char *)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s)); GPR_ASSERT(json != NULL); claims = grpc_jwt_claims_from_json(json, s); GPR_ASSERT(claims != NULL); @@ -478,20 +478,20 @@ static void test_jwt_verifier_bad_json_key(void) { } static void corrupt_jwt_sig(char *jwt) { - gpr_slice sig; + grpc_slice sig; char *bad_b64_sig; uint8_t *sig_bytes; char *last_dot = strrchr(jwt, '.'); GPR_ASSERT(last_dot != NULL); sig = grpc_base64_decode(last_dot + 1, 1); - GPR_ASSERT(!GPR_SLICE_IS_EMPTY(sig)); - sig_bytes = GPR_SLICE_START_PTR(sig); + GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(sig)); + sig_bytes = GRPC_SLICE_START_PTR(sig); (*sig_bytes)++; /* Corrupt first byte. */ - bad_b64_sig = - grpc_base64_encode(GPR_SLICE_START_PTR(sig), GPR_SLICE_LENGTH(sig), 1, 0); + bad_b64_sig = grpc_base64_encode(GRPC_SLICE_START_PTR(sig), + GRPC_SLICE_LENGTH(sig), 1, 0); memcpy(last_dot + 1, bad_b64_sig, strlen(bad_b64_sig)); gpr_free(bad_b64_sig); - gpr_slice_unref(sig); + grpc_slice_unref(sig); } static void on_verification_bad_signature(void *user_data, diff --git a/test/core/security/oauth2_utils.c b/test/core/security/oauth2_utils.c index 9b97c38fcb..44a209258d 100644 --- a/test/core/security/oauth2_utils.c +++ b/test/core/security/oauth2_utils.c @@ -37,9 +37,9 @@ #include <grpc/grpc.h> #include <grpc/grpc_security.h> +#include <grpc/slice.h> #include <grpc/support/alloc.h> #include <grpc/support/log.h> -#include <grpc/support/slice.h> #include <grpc/support/sync.h> #include "src/core/lib/security/credentials/credentials.h" @@ -57,16 +57,16 @@ static void on_oauth2_response(grpc_exec_ctx *exec_ctx, void *user_data, const char *error_details) { oauth2_request *request = user_data; char *token = NULL; - gpr_slice token_slice; + grpc_slice token_slice; if (status == GRPC_CREDENTIALS_ERROR) { gpr_log(GPR_ERROR, "Fetching token failed."); } else { GPR_ASSERT(num_md == 1); token_slice = md_elems[0].value; - token = gpr_malloc(GPR_SLICE_LENGTH(token_slice) + 1); - memcpy(token, GPR_SLICE_START_PTR(token_slice), - GPR_SLICE_LENGTH(token_slice)); - token[GPR_SLICE_LENGTH(token_slice)] = '\0'; + token = gpr_malloc(GRPC_SLICE_LENGTH(token_slice) + 1); + memcpy(token, GRPC_SLICE_START_PTR(token_slice), + GRPC_SLICE_LENGTH(token_slice)); + token[GRPC_SLICE_LENGTH(token_slice)] = '\0'; } gpr_mu_lock(request->mu); request->is_done = 1; diff --git a/test/core/security/print_google_default_creds_token.c b/test/core/security/print_google_default_creds_token.c index a391c0876b..2b74690bc3 100644 --- a/test/core/security/print_google_default_creds_token.c +++ b/test/core/security/print_google_default_creds_token.c @@ -36,14 +36,15 @@ #include <grpc/grpc.h> #include <grpc/grpc_security.h> +#include <grpc/slice.h> #include <grpc/support/alloc.h> #include <grpc/support/cmdline.h> #include <grpc/support/log.h> -#include <grpc/support/slice.h> #include <grpc/support/sync.h> #include "src/core/lib/security/credentials/composite/composite_credentials.h" #include "src/core/lib/security/credentials/credentials.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" typedef struct { @@ -62,7 +63,7 @@ static void on_metadata_response(grpc_exec_ctx *exec_ctx, void *user_data, } else { char *token; GPR_ASSERT(num_md == 1); - token = gpr_dump_slice(md_elems[0].value, GPR_DUMP_ASCII); + token = grpc_dump_slice(md_elems[0].value, GPR_DUMP_ASCII); printf("\nGot token: %s\n\n", token); gpr_free(token); } diff --git a/test/core/security/secure_endpoint_test.c b/test/core/security/secure_endpoint_test.c index 2262fde98d..b5d95004fe 100644 --- a/test/core/security/secure_endpoint_test.c +++ b/test/core/security/secure_endpoint_test.c @@ -49,7 +49,7 @@ static gpr_mu *g_mu; static grpc_pollset *g_pollset; static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair( - size_t slice_size, gpr_slice *leftover_slices, size_t leftover_nslices) { + size_t slice_size, grpc_slice *leftover_slices, size_t leftover_nslices) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; tsi_frame_protector *fake_read_protector = tsi_create_fake_protector(NULL); tsi_frame_protector *fake_write_protector = tsi_create_fake_protector(NULL); @@ -74,11 +74,11 @@ static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair( size_t buffer_size = total_buffer_size; uint8_t *encrypted_buffer = gpr_malloc(buffer_size); uint8_t *cur = encrypted_buffer; - gpr_slice encrypted_leftover; + grpc_slice encrypted_leftover; for (i = 0; i < leftover_nslices; i++) { - gpr_slice plain = leftover_slices[i]; - uint8_t *message_bytes = GPR_SLICE_START_PTR(plain); - size_t message_size = GPR_SLICE_LENGTH(plain); + grpc_slice plain = leftover_slices[i]; + uint8_t *message_bytes = GRPC_SLICE_START_PTR(plain); + size_t message_size = GRPC_SLICE_LENGTH(plain); while (message_size > 0) { size_t protected_buffer_size_to_send = buffer_size; size_t processed_message_size = message_size; @@ -92,7 +92,7 @@ static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair( GPR_ASSERT(buffer_size >= protected_buffer_size_to_send); buffer_size -= protected_buffer_size_to_send; } - gpr_slice_unref(plain); + grpc_slice_unref(plain); } do { size_t protected_buffer_size_to_send = buffer_size; @@ -104,11 +104,11 @@ static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair( GPR_ASSERT(buffer_size >= protected_buffer_size_to_send); buffer_size -= protected_buffer_size_to_send; } while (still_pending_size > 0); - encrypted_leftover = gpr_slice_from_copied_buffer( + encrypted_leftover = grpc_slice_from_copied_buffer( (const char *)encrypted_buffer, total_buffer_size - buffer_size); f.client_ep = grpc_secure_endpoint_create(fake_read_protector, tcp.client, &encrypted_leftover, 1); - gpr_slice_unref(encrypted_leftover); + grpc_slice_unref(encrypted_leftover); gpr_free(encrypted_buffer); } @@ -125,8 +125,8 @@ secure_endpoint_create_fixture_tcp_socketpair_noleftover(size_t slice_size) { static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair_leftover(size_t slice_size) { - gpr_slice s = - gpr_slice_from_copied_string("hello world 12345678900987654321"); + grpc_slice s = + grpc_slice_from_copied_string("hello world 12345678900987654321"); grpc_endpoint_test_fixture f; f = secure_endpoint_create_fixture_tcp_socketpair(slice_size, &s, 1); @@ -149,29 +149,29 @@ static void inc_call_ctr(grpc_exec_ctx *exec_ctx, void *arg, static void test_leftover(grpc_endpoint_test_config config, size_t slice_size) { grpc_endpoint_test_fixture f = config.create_fixture(slice_size); - gpr_slice_buffer incoming; - gpr_slice s = - gpr_slice_from_copied_string("hello world 12345678900987654321"); + grpc_slice_buffer incoming; + grpc_slice s = + grpc_slice_from_copied_string("hello world 12345678900987654321"); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; int n = 0; grpc_closure done_closure; gpr_log(GPR_INFO, "Start test left over"); - gpr_slice_buffer_init(&incoming); + grpc_slice_buffer_init(&incoming); grpc_closure_init(&done_closure, inc_call_ctr, &n); grpc_endpoint_read(&exec_ctx, f.client_ep, &incoming, &done_closure); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(n == 1); GPR_ASSERT(incoming.count == 1); - GPR_ASSERT(0 == gpr_slice_cmp(s, incoming.slices[0])); + GPR_ASSERT(0 == grpc_slice_cmp(s, incoming.slices[0])); grpc_endpoint_shutdown(&exec_ctx, f.client_ep); grpc_endpoint_shutdown(&exec_ctx, f.server_ep); grpc_endpoint_destroy(&exec_ctx, f.client_ep); grpc_endpoint_destroy(&exec_ctx, f.server_ep); grpc_exec_ctx_finish(&exec_ctx); - gpr_slice_unref(s); - gpr_slice_buffer_destroy(&incoming); + grpc_slice_unref(s); + grpc_slice_buffer_destroy(&incoming); clean_up(); } diff --git a/test/core/security/security_connector_test.c b/test/core/security/security_connector_test.c index 6106bec9d3..8872cbe278 100644 --- a/test/core/security/security_connector_test.c +++ b/test/core/security/security_connector_test.c @@ -42,6 +42,7 @@ #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/transport/security_connector.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/env.h" #include "src/core/lib/support/string.h" #include "src/core/lib/support/tmpfile.h" @@ -368,9 +369,9 @@ static void test_default_ssl_roots(void) { value. */ gpr_setenv(GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR, ""); grpc_set_ssl_roots_override_callback(override_roots_success); - gpr_slice roots = grpc_get_default_ssl_roots_for_testing(); - char *roots_contents = gpr_dump_slice(roots, GPR_DUMP_ASCII); - gpr_slice_unref(roots); + grpc_slice roots = grpc_get_default_ssl_roots_for_testing(); + char *roots_contents = grpc_dump_slice(roots, GPR_DUMP_ASCII); + grpc_slice_unref(roots); GPR_ASSERT(strcmp(roots_contents, roots_for_override_api) == 0); gpr_free(roots_contents); @@ -378,8 +379,8 @@ static void test_default_ssl_roots(void) { instead. */ gpr_setenv(GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR, roots_env_var_file_path); roots = grpc_get_default_ssl_roots_for_testing(); - roots_contents = gpr_dump_slice(roots, GPR_DUMP_ASCII); - gpr_slice_unref(roots); + roots_contents = grpc_dump_slice(roots, GPR_DUMP_ASCII); + grpc_slice_unref(roots); GPR_ASSERT(strcmp(roots_contents, roots_for_env_var) == 0); gpr_free(roots_contents); @@ -387,8 +388,8 @@ static void test_default_ssl_roots(void) { the api. */ gpr_setenv(GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR, ""); roots = grpc_get_default_ssl_roots_for_testing(); - roots_contents = gpr_dump_slice(roots, GPR_DUMP_ASCII); - gpr_slice_unref(roots); + roots_contents = grpc_dump_slice(roots, GPR_DUMP_ASCII); + grpc_slice_unref(roots); GPR_ASSERT(strcmp(roots_contents, roots_for_override_api) == 0); gpr_free(roots_contents); @@ -396,7 +397,7 @@ static void test_default_ssl_roots(void) { an empty slice. */ grpc_set_ssl_roots_override_callback(override_roots_permanent_failure); roots = grpc_get_default_ssl_roots_for_testing(); - GPR_ASSERT(GPR_SLICE_IS_EMPTY(roots)); + GPR_ASSERT(GRPC_SLICE_IS_EMPTY(roots)); /* Cleanup. */ remove(roots_env_var_file_path); diff --git a/test/core/security/ssl_server_fuzzer.c b/test/core/security/ssl_server_fuzzer.c new file mode 100644 index 0000000000..ca629a6eba --- /dev/null +++ b/test/core/security/ssl_server_fuzzer.c @@ -0,0 +1,146 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include <grpc/grpc.h> +#include <grpc/grpc_security.h> +#include <grpc/support/log.h> + +#include "src/core/lib/iomgr/load_file.h" +#include "src/core/lib/security/credentials/credentials.h" +#include "src/core/lib/security/transport/security_connector.h" +#include "test/core/util/memory_counters.h" +#include "test/core/util/mock_endpoint.h" + +bool squelch = true; +// ssl has an array of global gpr_mu's that are never released. +// Turning this on will fail the leak check. +bool leak_check = false; + +#define SSL_CERT_PATH "src/core/lib/tsi/test_creds/server1.pem" +#define SSL_KEY_PATH "src/core/lib/tsi/test_creds/server1.key" +#define SSL_CA_PATH "src/core/lib/tsi/test_creds/ca.pem" + +static void discard_write(grpc_slice slice) {} + +static void dont_log(gpr_log_func_args *args) {} + +struct handshake_state { + bool done_callback_called; +}; + +static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + grpc_handshaker_args *args = arg; + struct handshake_state *state = args->user_data; + GPR_ASSERT(state->done_callback_called == false); + state->done_callback_called = true; + // The fuzzer should not pass the handshake. + GPR_ASSERT(error != GRPC_ERROR_NONE); +} + +int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { + struct grpc_memory_counters counters; + if (squelch) gpr_set_log_function(dont_log); + if (leak_check) grpc_memory_counters_init(); + grpc_init(); + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + + grpc_resource_quota *resource_quota = + grpc_resource_quota_create("ssl_server_fuzzer"); + grpc_endpoint *mock_endpoint = + grpc_mock_endpoint_create(discard_write, resource_quota); + grpc_resource_quota_internal_unref(&exec_ctx, resource_quota); + + grpc_mock_endpoint_put_read( + &exec_ctx, mock_endpoint, + grpc_slice_from_copied_buffer((const char *)data, size)); + + // Load key pair and establish server SSL credentials. + grpc_ssl_pem_key_cert_pair pem_key_cert_pair; + grpc_slice ca_slice, cert_slice, key_slice; + GPR_ASSERT(GRPC_LOG_IF_ERROR("load_file", + grpc_load_file(SSL_CA_PATH, 1, &ca_slice))); + GPR_ASSERT(GRPC_LOG_IF_ERROR("load_file", + grpc_load_file(SSL_CERT_PATH, 1, &cert_slice))); + GPR_ASSERT(GRPC_LOG_IF_ERROR("load_file", + grpc_load_file(SSL_KEY_PATH, 1, &key_slice))); + const char *ca_cert = (const char *)GRPC_SLICE_START_PTR(ca_slice); + pem_key_cert_pair.private_key = (const char *)GRPC_SLICE_START_PTR(key_slice); + pem_key_cert_pair.cert_chain = (const char *)GRPC_SLICE_START_PTR(cert_slice); + grpc_server_credentials *creds = grpc_ssl_server_credentials_create( + ca_cert, &pem_key_cert_pair, 1, 0, NULL); + + // Create security connector + grpc_server_security_connector *sc = NULL; + grpc_security_status status = + grpc_server_credentials_create_security_connector(creds, &sc); + GPR_ASSERT(status == GRPC_SECURITY_OK); + gpr_timespec deadline = gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), + gpr_time_from_seconds(1, GPR_TIMESPAN)); + + struct handshake_state state; + state.done_callback_called = false; + grpc_handshake_manager *handshake_mgr = grpc_handshake_manager_create(); + grpc_server_security_connector_create_handshakers(&exec_ctx, sc, + handshake_mgr); + grpc_handshake_manager_do_handshake( + &exec_ctx, handshake_mgr, mock_endpoint, NULL /* channel_args */, + deadline, NULL /* acceptor */, on_handshake_done, &state); + grpc_exec_ctx_flush(&exec_ctx); + + // If the given string happens to be part of the correct client hello, the + // server will wait for more data. Explicitly fail the server by shutting down + // the endpoint. + if (!state.done_callback_called) { + grpc_endpoint_shutdown(&exec_ctx, mock_endpoint); + grpc_exec_ctx_flush(&exec_ctx); + } + + GPR_ASSERT(state.done_callback_called); + + grpc_handshake_manager_destroy(&exec_ctx, handshake_mgr); + GRPC_SECURITY_CONNECTOR_UNREF(&sc->base, "test"); + grpc_server_credentials_release(creds); + grpc_slice_unref(cert_slice); + grpc_slice_unref(key_slice); + grpc_slice_unref(ca_slice); + grpc_exec_ctx_flush(&exec_ctx); + + grpc_shutdown(); + if (leak_check) { + counters = grpc_memory_counters_snapshot(); + grpc_memory_counters_destroy(); + GPR_ASSERT(counters.total_size_relative == 0); + } + return 0; +} diff --git a/test/core/security/verify_jwt.c b/test/core/security/verify_jwt.c index 728d2d637a..043d29e6bb 100644 --- a/test/core/security/verify_jwt.c +++ b/test/core/security/verify_jwt.c @@ -36,10 +36,10 @@ #include <grpc/grpc.h> #include <grpc/grpc_security.h> +#include <grpc/slice.h> #include <grpc/support/alloc.h> #include <grpc/support/cmdline.h> #include <grpc/support/log.h> -#include <grpc/support/slice.h> #include <grpc/support/sync.h> #include "src/core/lib/security/credentials/jwt/jwt_verifier.h" |