diff options
39 files changed, 43 insertions, 2 deletions
diff --git a/fuzz/gnutls_pkcs12_key_parser_fuzzer.in/1b7aa3df2ff93a851c77d0585bef787eadbfafd1 b/fuzz/gnutls_pkcs12_key_parser_fuzzer.in/1b7aa3df2ff93a851c77d0585bef787eadbfafd1 Binary files differnew file mode 100644 index 0000000000..20a2cc3d4c --- /dev/null +++ b/fuzz/gnutls_pkcs12_key_parser_fuzzer.in/1b7aa3df2ff93a851c77d0585bef787eadbfafd1 diff --git a/fuzz/gnutls_pkcs12_key_parser_fuzzer.in/8a1320975e683bfe2c82ceb4c34a15d95cff03a0 b/fuzz/gnutls_pkcs12_key_parser_fuzzer.in/8a1320975e683bfe2c82ceb4c34a15d95cff03a0 Binary files differnew file mode 100644 index 0000000000..63f660be21 --- /dev/null +++ b/fuzz/gnutls_pkcs12_key_parser_fuzzer.in/8a1320975e683bfe2c82ceb4c34a15d95cff03a0 diff --git a/fuzz/gnutls_pkcs12_key_parser_fuzzer.in/a8aae3d777beab137ab6b48fb5c7140dca34fe43 b/fuzz/gnutls_pkcs12_key_parser_fuzzer.in/a8aae3d777beab137ab6b48fb5c7140dca34fe43 Binary files differnew file mode 100644 index 0000000000..895b6f063b --- /dev/null +++ b/fuzz/gnutls_pkcs12_key_parser_fuzzer.in/a8aae3d777beab137ab6b48fb5c7140dca34fe43 diff --git a/fuzz/gnutls_pkcs7_parser_fuzzer.in/09d844fe63ca873c7348138833e04f1f160651aa b/fuzz/gnutls_pkcs7_parser_fuzzer.in/09d844fe63ca873c7348138833e04f1f160651aa Binary files differnew file mode 100644 index 0000000000..72e791e786 --- /dev/null +++ b/fuzz/gnutls_pkcs7_parser_fuzzer.in/09d844fe63ca873c7348138833e04f1f160651aa diff --git a/fuzz/gnutls_pkcs7_parser_fuzzer.in/09f357044a8ad65a369a245e703066d17c275b60 b/fuzz/gnutls_pkcs7_parser_fuzzer.in/09f357044a8ad65a369a245e703066d17c275b60 Binary files differnew file mode 100644 index 0000000000..0f2b64e81f --- /dev/null +++ b/fuzz/gnutls_pkcs7_parser_fuzzer.in/09f357044a8ad65a369a245e703066d17c275b60 diff --git a/fuzz/gnutls_pkcs7_parser_fuzzer.in/16eab262550ea4a553c31cf8b705dd82fbb420dd b/fuzz/gnutls_pkcs7_parser_fuzzer.in/16eab262550ea4a553c31cf8b705dd82fbb420dd Binary files differnew file mode 100644 index 0000000000..bde80ba844 --- /dev/null +++ b/fuzz/gnutls_pkcs7_parser_fuzzer.in/16eab262550ea4a553c31cf8b705dd82fbb420dd diff --git a/fuzz/gnutls_pkcs7_parser_fuzzer.in/198337d10286b07fc87e469ef43ed1a47a144351 b/fuzz/gnutls_pkcs7_parser_fuzzer.in/198337d10286b07fc87e469ef43ed1a47a144351 Binary files differnew file mode 100644 index 0000000000..f7465c650a --- /dev/null +++ b/fuzz/gnutls_pkcs7_parser_fuzzer.in/198337d10286b07fc87e469ef43ed1a47a144351 diff --git a/fuzz/gnutls_pkcs7_parser_fuzzer.in/1c9af21e2b948c52fa18108d9f75f4b38dd1788d b/fuzz/gnutls_pkcs7_parser_fuzzer.in/1c9af21e2b948c52fa18108d9f75f4b38dd1788d Binary files differnew file mode 100644 index 0000000000..bc1b56a29c --- /dev/null +++ b/fuzz/gnutls_pkcs7_parser_fuzzer.in/1c9af21e2b948c52fa18108d9f75f4b38dd1788d diff --git a/fuzz/gnutls_pkcs7_parser_fuzzer.in/22cc23413577e1b88e3b3a857f951e93a52636a9 b/fuzz/gnutls_pkcs7_parser_fuzzer.in/22cc23413577e1b88e3b3a857f951e93a52636a9 Binary files differnew file mode 100644 index 0000000000..8de6f8f6ea --- /dev/null +++ b/fuzz/gnutls_pkcs7_parser_fuzzer.in/22cc23413577e1b88e3b3a857f951e93a52636a9 diff --git a/fuzz/gnutls_pkcs7_parser_fuzzer.in/2d847a5ee0d02e9ce72be0847246d36307805f5f b/fuzz/gnutls_pkcs7_parser_fuzzer.in/2d847a5ee0d02e9ce72be0847246d36307805f5f Binary files differnew file mode 100644 index 0000000000..4944d5068b --- /dev/null +++ b/fuzz/gnutls_pkcs7_parser_fuzzer.in/2d847a5ee0d02e9ce72be0847246d36307805f5f diff --git a/fuzz/gnutls_pkcs7_parser_fuzzer.in/4d1ac74cf61692264b0f335eccd88643a824b250 b/fuzz/gnutls_pkcs7_parser_fuzzer.in/4d1ac74cf61692264b0f335eccd88643a824b250 Binary files differnew file mode 100644 index 0000000000..f650eae88a --- /dev/null +++ b/fuzz/gnutls_pkcs7_parser_fuzzer.in/4d1ac74cf61692264b0f335eccd88643a824b250 diff --git a/fuzz/gnutls_pkcs7_parser_fuzzer.in/516a419fab465593d859be6fed68be30b6e7e842 b/fuzz/gnutls_pkcs7_parser_fuzzer.in/516a419fab465593d859be6fed68be30b6e7e842 Binary files differnew file mode 100644 index 0000000000..13b5b26e2e --- /dev/null +++ b/fuzz/gnutls_pkcs7_parser_fuzzer.in/516a419fab465593d859be6fed68be30b6e7e842 diff --git a/fuzz/gnutls_pkcs7_parser_fuzzer.in/bd383251a4f658f1734b2e9a49b4d7e8e98cdf0f b/fuzz/gnutls_pkcs7_parser_fuzzer.in/bd383251a4f658f1734b2e9a49b4d7e8e98cdf0f Binary files differnew file mode 100644 index 0000000000..b5cdb705c7 --- /dev/null +++ b/fuzz/gnutls_pkcs7_parser_fuzzer.in/bd383251a4f658f1734b2e9a49b4d7e8e98cdf0f diff --git a/fuzz/gnutls_pkcs7_parser_fuzzer.in/c0b6cd402992896a40947b3100c59ae8b8f3d662 b/fuzz/gnutls_pkcs7_parser_fuzzer.in/c0b6cd402992896a40947b3100c59ae8b8f3d662 Binary files differnew file mode 100644 index 0000000000..956f0bcf21 --- /dev/null +++ b/fuzz/gnutls_pkcs7_parser_fuzzer.in/c0b6cd402992896a40947b3100c59ae8b8f3d662 diff --git a/fuzz/gnutls_pkcs7_parser_fuzzer.in/f62a8c5e536f3963e40df78f268ab3b405973a09 b/fuzz/gnutls_pkcs7_parser_fuzzer.in/f62a8c5e536f3963e40df78f268ab3b405973a09 Binary files differnew file mode 100644 index 0000000000..b7da47f335 --- /dev/null +++ b/fuzz/gnutls_pkcs7_parser_fuzzer.in/f62a8c5e536f3963e40df78f268ab3b405973a09 diff --git a/fuzz/gnutls_pkcs7_parser_fuzzer.in/fed888903b0e9af3d95b1904dbddf6cc88fdcea2 b/fuzz/gnutls_pkcs7_parser_fuzzer.in/fed888903b0e9af3d95b1904dbddf6cc88fdcea2 Binary files differnew file mode 100644 index 0000000000..c6979804b8 --- /dev/null +++ b/fuzz/gnutls_pkcs7_parser_fuzzer.in/fed888903b0e9af3d95b1904dbddf6cc88fdcea2 diff --git a/fuzz/gnutls_pkcs8_key_parser_fuzzer.in/4b33790b8f739639aa8867f55245a5152889738a b/fuzz/gnutls_pkcs8_key_parser_fuzzer.in/4b33790b8f739639aa8867f55245a5152889738a Binary files differnew file mode 100644 index 0000000000..4389c9cc4a --- /dev/null +++ b/fuzz/gnutls_pkcs8_key_parser_fuzzer.in/4b33790b8f739639aa8867f55245a5152889738a diff --git a/fuzz/gnutls_pkcs8_key_parser_fuzzer.in/c2cf384dff485c778b0d4bf480cde56f22b0c278 b/fuzz/gnutls_pkcs8_key_parser_fuzzer.in/c2cf384dff485c778b0d4bf480cde56f22b0c278 Binary files differnew file mode 100644 index 0000000000..c798950ad2 --- /dev/null +++ b/fuzz/gnutls_pkcs8_key_parser_fuzzer.in/c2cf384dff485c778b0d4bf480cde56f22b0c278 diff --git a/fuzz/gnutls_pkcs8_key_parser_fuzzer.in/cd39456de3dfba9c20878500c671c5b0328cfe25 b/fuzz/gnutls_pkcs8_key_parser_fuzzer.in/cd39456de3dfba9c20878500c671c5b0328cfe25 Binary files differnew file mode 100644 index 0000000000..491c348cb6 --- /dev/null +++ b/fuzz/gnutls_pkcs8_key_parser_fuzzer.in/cd39456de3dfba9c20878500c671c5b0328cfe25 diff --git a/fuzz/gnutls_x509_parser_fuzzer.in/01865dcfe78cf1e2da38b79b4731b87c590492e1 b/fuzz/gnutls_x509_parser_fuzzer.in/01865dcfe78cf1e2da38b79b4731b87c590492e1 Binary files differnew file mode 100644 index 0000000000..b0a1e6e776 --- /dev/null +++ b/fuzz/gnutls_x509_parser_fuzzer.in/01865dcfe78cf1e2da38b79b4731b87c590492e1 diff --git a/fuzz/gnutls_x509_parser_fuzzer.in/0953fdd45bb46478f2cbf7df2764d2c2b9433387 b/fuzz/gnutls_x509_parser_fuzzer.in/0953fdd45bb46478f2cbf7df2764d2c2b9433387 Binary files differnew file mode 100644 index 0000000000..1ad16d47bc --- /dev/null +++ b/fuzz/gnutls_x509_parser_fuzzer.in/0953fdd45bb46478f2cbf7df2764d2c2b9433387 diff --git a/fuzz/gnutls_x509_parser_fuzzer.in/1185bb0f3aed7dfc21aeb8b951c2bc5344bc73e0 b/fuzz/gnutls_x509_parser_fuzzer.in/1185bb0f3aed7dfc21aeb8b951c2bc5344bc73e0 Binary files differnew file mode 100644 index 0000000000..1bd161aa04 --- /dev/null +++ b/fuzz/gnutls_x509_parser_fuzzer.in/1185bb0f3aed7dfc21aeb8b951c2bc5344bc73e0 diff --git a/fuzz/gnutls_x509_parser_fuzzer.in/152f4d903dc51d79cb864b56a037d631e9277deb b/fuzz/gnutls_x509_parser_fuzzer.in/152f4d903dc51d79cb864b56a037d631e9277deb Binary files differnew file mode 100644 index 0000000000..d9fdea2c8a --- /dev/null +++ b/fuzz/gnutls_x509_parser_fuzzer.in/152f4d903dc51d79cb864b56a037d631e9277deb diff --git a/fuzz/gnutls_x509_parser_fuzzer.in/19c4ff5b7bd2756ef6aa3f7333cb54b427bdfb5b b/fuzz/gnutls_x509_parser_fuzzer.in/19c4ff5b7bd2756ef6aa3f7333cb54b427bdfb5b Binary files differnew file mode 100644 index 0000000000..8d3e820bcc --- /dev/null +++ b/fuzz/gnutls_x509_parser_fuzzer.in/19c4ff5b7bd2756ef6aa3f7333cb54b427bdfb5b diff --git a/fuzz/gnutls_x509_parser_fuzzer.in/3399de0770467a07b3a2bdd0cdd6874d5d9391be b/fuzz/gnutls_x509_parser_fuzzer.in/3399de0770467a07b3a2bdd0cdd6874d5d9391be Binary files differnew file mode 100644 index 0000000000..71564dad0c --- /dev/null +++ b/fuzz/gnutls_x509_parser_fuzzer.in/3399de0770467a07b3a2bdd0cdd6874d5d9391be diff --git a/fuzz/gnutls_x509_parser_fuzzer.in/428e6e5042f8a04e74e1affb8dabd676563b0979 b/fuzz/gnutls_x509_parser_fuzzer.in/428e6e5042f8a04e74e1affb8dabd676563b0979 Binary files differnew file mode 100644 index 0000000000..33328140a8 --- /dev/null +++ b/fuzz/gnutls_x509_parser_fuzzer.in/428e6e5042f8a04e74e1affb8dabd676563b0979 diff --git a/fuzz/gnutls_x509_parser_fuzzer.in/58fb953ce8f894d4f58d9000145214e6c1e119de b/fuzz/gnutls_x509_parser_fuzzer.in/58fb953ce8f894d4f58d9000145214e6c1e119de Binary files differnew file mode 100644 index 0000000000..d08770c32d --- /dev/null +++ b/fuzz/gnutls_x509_parser_fuzzer.in/58fb953ce8f894d4f58d9000145214e6c1e119de diff --git a/fuzz/gnutls_x509_parser_fuzzer.in/5de8f9db720d083b1e319ec8bb9223520ecc4bba b/fuzz/gnutls_x509_parser_fuzzer.in/5de8f9db720d083b1e319ec8bb9223520ecc4bba Binary files differnew file mode 100644 index 0000000000..554c114cbc --- /dev/null +++ b/fuzz/gnutls_x509_parser_fuzzer.in/5de8f9db720d083b1e319ec8bb9223520ecc4bba diff --git a/fuzz/gnutls_x509_parser_fuzzer.in/655d50379e1854166164cb6de57eebeb58b5b73a b/fuzz/gnutls_x509_parser_fuzzer.in/655d50379e1854166164cb6de57eebeb58b5b73a Binary files differnew file mode 100644 index 0000000000..c6791563ca --- /dev/null +++ b/fuzz/gnutls_x509_parser_fuzzer.in/655d50379e1854166164cb6de57eebeb58b5b73a diff --git a/fuzz/gnutls_x509_parser_fuzzer.in/68a06d22fcd02410e1afa763645155d7d7239a27 b/fuzz/gnutls_x509_parser_fuzzer.in/68a06d22fcd02410e1afa763645155d7d7239a27 Binary files differnew file mode 100644 index 0000000000..933b842b94 --- /dev/null +++ b/fuzz/gnutls_x509_parser_fuzzer.in/68a06d22fcd02410e1afa763645155d7d7239a27 diff --git a/fuzz/gnutls_x509_parser_fuzzer.in/7ebfa2fe8a0cefa830241d47963a5f80168fe15e b/fuzz/gnutls_x509_parser_fuzzer.in/7ebfa2fe8a0cefa830241d47963a5f80168fe15e Binary files differnew file mode 100644 index 0000000000..f78a2b2c28 --- /dev/null +++ b/fuzz/gnutls_x509_parser_fuzzer.in/7ebfa2fe8a0cefa830241d47963a5f80168fe15e diff --git a/fuzz/gnutls_x509_parser_fuzzer.in/c2e84dbccc11c6f1de7332fff740c93ecdd37769 b/fuzz/gnutls_x509_parser_fuzzer.in/c2e84dbccc11c6f1de7332fff740c93ecdd37769 Binary files differnew file mode 100644 index 0000000000..92aa6f36b7 --- /dev/null +++ b/fuzz/gnutls_x509_parser_fuzzer.in/c2e84dbccc11c6f1de7332fff740c93ecdd37769 diff --git a/fuzz/gnutls_x509_parser_fuzzer.in/cba0e4e585f5dc40d93a32ccefe2ccd1937122c5 b/fuzz/gnutls_x509_parser_fuzzer.in/cba0e4e585f5dc40d93a32ccefe2ccd1937122c5 Binary files differnew file mode 100644 index 0000000000..80c5abebcb --- /dev/null +++ b/fuzz/gnutls_x509_parser_fuzzer.in/cba0e4e585f5dc40d93a32ccefe2ccd1937122c5 diff --git a/fuzz/gnutls_x509_parser_fuzzer.in/cddda9519a46e64ca98ee83385eeb748b4b25e97 b/fuzz/gnutls_x509_parser_fuzzer.in/cddda9519a46e64ca98ee83385eeb748b4b25e97 Binary files differnew file mode 100644 index 0000000000..388dd43679 --- /dev/null +++ b/fuzz/gnutls_x509_parser_fuzzer.in/cddda9519a46e64ca98ee83385eeb748b4b25e97 diff --git a/fuzz/gnutls_x509_parser_fuzzer.in/d43782a1f943a966f4ea1ac96bd048fe68d4d951 b/fuzz/gnutls_x509_parser_fuzzer.in/d43782a1f943a966f4ea1ac96bd048fe68d4d951 Binary files differnew file mode 100644 index 0000000000..fe152851f6 --- /dev/null +++ b/fuzz/gnutls_x509_parser_fuzzer.in/d43782a1f943a966f4ea1ac96bd048fe68d4d951 diff --git a/fuzz/gnutls_x509_parser_fuzzer.in/d9658f8a95f423df24d7ba47a3bc33abea643fa8 b/fuzz/gnutls_x509_parser_fuzzer.in/d9658f8a95f423df24d7ba47a3bc33abea643fa8 Binary files differnew file mode 100644 index 0000000000..d040c1bc4e --- /dev/null +++ b/fuzz/gnutls_x509_parser_fuzzer.in/d9658f8a95f423df24d7ba47a3bc33abea643fa8 diff --git a/fuzz/gnutls_x509_parser_fuzzer.in/eb7100f31cd1529dcae4e2666d09da01191a4699 b/fuzz/gnutls_x509_parser_fuzzer.in/eb7100f31cd1529dcae4e2666d09da01191a4699 Binary files differnew file mode 100644 index 0000000000..c1760db7d6 --- /dev/null +++ b/fuzz/gnutls_x509_parser_fuzzer.in/eb7100f31cd1529dcae4e2666d09da01191a4699 diff --git a/src/tests.c b/src/tests.c index 9b608119f5..82474b0995 100644 --- a/src/tests.c +++ b/src/tests.c @@ -134,20 +134,31 @@ char prio_str[768] = ""; #define INIT_STR "NONE:" char rest[384] = "%UNSAFE_RENEGOTIATION:+SIGN-ALL:+GROUP-ALL" GOST_REST; -#define _gnutls_priority_set_direct(s, str) __gnutls_priority_set_direct(s, str, __LINE__) +#define _gnutls_priority_set_direct(s, str) { \ + int _ret; \ + if ((_ret=__gnutls_priority_set_direct(s, str, __LINE__)) != TEST_SUCCEED) { \ + return _ret; \ + } \ + } -static inline void +static inline int __gnutls_priority_set_direct(gnutls_session_t session, const char *str, int line) { const char *err; int ret = gnutls_priority_set_direct(session, str, &err); if (ret < 0) { + /* this can happen when some cipher is disabled system-wide */ + if (ret == GNUTLS_E_NO_PRIORITIES_WERE_SET) + return TEST_IGNORE; + fprintf(stderr, "Error at %d with string %s\n", line, str); fprintf(stderr, "Error at %s: %s\n", err, gnutls_strerror(ret)); exit(1); } + + return TEST_SUCCEED; } test_code_t test_server(gnutls_session_t session) diff --git a/tests/gnutls-cli-debug.sh b/tests/gnutls-cli-debug.sh index 51f77bb565..0ab6069b8f 100755 --- a/tests/gnutls-cli-debug.sh +++ b/tests/gnutls-cli-debug.sh @@ -24,6 +24,7 @@ srcdir="${srcdir:-.}" SERV="${SERV:-../src/gnutls-serv${EXEEXT}}" DCLI="${DCLI:-../src/gnutls-cli-debug${EXEEXT}}" OUTFILE=cli-debug.$$.tmp +TMPFILE=config.$$.tmp unset RETCODE if ! test -x "${SERV}"; then @@ -169,7 +170,36 @@ check_text "whether the server accepts default record size (512 bytes)... no" check_text "whether %ALLOW_SMALL_RECORDS is required... yes" check_text "for RSA key exchange support... no" +echo "" +echo "Checking output of gnutls-cli-debug when algorithms are disabled" +eval "${GETPORT}" +launch_server $$ --echo --priority "NORMAL:-VERS-ALL:+VERS-TLS1.3:+VERS-TLS1.2" --x509keyfile ${KEY1} --x509certfile ${CERT1} \ + --x509keyfile ${KEY2} --x509certfile ${CERT2} --x509keyfile ${KEY3} --x509certfile ${CERT3} >/dev/null 2>&1 +PID=$! +wait_server ${PID} + +cat <<_EOF_ > ${TMPFILE} +[overrides] + +tls-disabled-cipher = CAMELLIA-128-CBC +tls-disabled-cipher = CAMELLIA-256-CBC +_EOF_ +export GNUTLS_SYSTEM_PRIORITY_FILE="${TMPFILE}" + +timeout 1800 datefudge "2017-08-9" \ +"${DCLI}" -p "${PORT}" localhost >$OUTFILE 2>&1 || fail ${PID} "gnutls-cli-debug run should have succeeded!" + +unset GNUTLS_SYSTEM_PRIORITY_FILE + +kill ${PID} +wait + +check_text "for AES-GCM cipher (RFC5288) support... yes" +check_text "for RSA key exchange support... yes" +check_text "for SHA1 MAC support... yes" + rm -f ${OUTFILE} +rm -f ${TMPFILE} if test "${ENABLE_GOST}" = "1" && test "${GNUTLS_FORCE_FIPS_MODE}" != 1 ; then # GOST_CNT test |