Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1315193 - Fuzzing mode: ssl_Time() must return a constant value r…
…=franziskus Differential Revision: https://nss-review.dev.mozaws.net/D19
- Loading branch information
Tim Taubert
committed
Nov 4, 2016
1 parent
bcb1a4c
commit 0f22e53
Showing
6 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#include "ssl.h" | ||
#include "sslimpl.h" | ||
|
||
#include "gtest/gtest.h" | ||
|
||
namespace nss_test { | ||
|
||
#ifdef UNSAFE_FUZZER_MODE | ||
|
||
class TlsFuzzTest : public ::testing::Test {}; | ||
|
||
// Ensure that ssl_Time() returns a constant value. | ||
TEST_F(TlsFuzzTest, Fuzz_SSL_Time_Constant) { | ||
PRInt32 now = ssl_Time(); | ||
PR_Sleep(PR_SecondsToInterval(2)); | ||
EXPECT_EQ(ssl_Time(), now); | ||
} | ||
|
||
#endif | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters