Bug 952876: Add test for bug 952808 (OCSP stapling not honored when there is a error entry in the OCSP cache), r=keeler

This commit is contained in:
Brian Smith 2014-01-06 14:45:35 -08:00
Родитель e78c9d7289
Коммит 7a3a090854
2 изменённых файлов: 27 добавлений и 1 удалений

Просмотреть файл

@ -81,6 +81,32 @@ function run_test() {
clearSessionCache);
add_test(function() { do_check_eq(gFetchCount, 2); run_next_test(); });
//---------------------------------------------------------------------------
// Reset state
add_test(function() { clearOCSPCache(); gFetchCount = 0; run_next_test(); });
// A failure to retrieve an OCSP response will result in an error entry being
// added to the cache.
add_connection_test("ocsp-stapling-none.example.com", Cr.NS_OK,
clearSessionCache);
add_test(function() { do_check_eq(gFetchCount, 1); run_next_test(); });
// The error entry will prevent a fetch from happening for a while.
add_connection_test("ocsp-stapling-none.example.com", Cr.NS_OK,
clearSessionCache);
add_test(function() { do_check_eq(gFetchCount, 1); run_next_test(); });
// The error entry must not prevent a stapled OCSP response from being
// honored.
add_connection_test("ocsp-stapling-revoked.example.com",
getXPCOMStatusFromNSS(SEC_ERROR_REVOKED_CERTIFICATE),
clearSessionCache);
add_test(function() { do_check_eq(gFetchCount, 1); run_next_test(); });
//---------------------------------------------------------------------------
add_test(function() { ocspResponder.stop(run_next_test); run_next_test(); });
run_next_test();

Просмотреть файл

@ -37,7 +37,7 @@ fail-if = os == "android"
run-sequentially = hardcoded ports
# Bug 676972: test fails consistently on Android
fail-if = os == "android"
[test_ocsp_unknown_caching.js]
[test_ocsp_caching.js]
run-sequentially = hardcoded ports
# Bug 676972: test fails consistently on Android
fail-if = os == "android"