Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1385146 - Experimental API, r=ekr
--HG-- extra : source : 2ee5a53ee2412a8adce32ed96bd7903a34e14905 extra : amend_source : 7389c6910c42239d9b16c71341f33e9d6935148b extra : intermediate-source : bb10e9d5ec116ca72e7131811b772aae37996e23
- Loading branch information
1 parent
a853912
commit c960d70
Showing
13 changed files
with
124 additions
and
0 deletions.
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
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,20 @@ | ||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | ||
/* vim: set ts=2 et sw=2 tw=80: */ | ||
/* 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 "sslexp.h" | ||
|
||
#include "gtest_utils.h" | ||
|
||
namespace nss_test { | ||
|
||
class MiscTest : public ::testing::Test {}; | ||
|
||
TEST_F(MiscTest, NonExistentExperimentalAPI) { | ||
EXPECT_EQ(nullptr, SSL_GetExperimentalAPI("blah")); | ||
EXPECT_EQ(SSL_ERROR_UNSUPPORTED_EXPERIMENTAL_API, PORT_GetError()); | ||
} | ||
|
||
} // namespace nss_test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
'preenc.h', | ||
'ssl.h', | ||
'sslerr.h', | ||
'sslexp.h', | ||
'sslproto.h', | ||
'sslt.h' | ||
], | ||
|
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 |
---|---|---|
|
@@ -10,6 +10,7 @@ EXPORTS = \ | |
ssl.h \ | ||
sslt.h \ | ||
sslerr.h \ | ||
sslexp.h \ | ||
sslproto.h \ | ||
preenc.h \ | ||
$(NULL) | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* This file contains prototypes for experimental SSL functions. | ||
* | ||
* 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/. */ | ||
|
||
#ifndef __sslexp_h_ | ||
#define __sslexp_h_ | ||
|
||
#include "ssl.h" | ||
#include "sslerr.h" | ||
|
||
SEC_BEGIN_PROTOS | ||
|
||
/* The functions in this header file are not guaranteed to remain available in | ||
* future NSS versions. Code that uses these functions needs to safeguard | ||
* against the function not being available. */ | ||
|
||
#define SSL_EXPERIMENTAL_API(name, arglist, args) \ | ||
(SSL_GetExperimentalAPI(name) \ | ||
? ((SECStatus(*) arglist)SSL_GetExperimentalAPI(name))args \ | ||
: SECFailure) | ||
|
||
SEC_END_PROTOS | ||
|
||
#endif /* __sslexp_h_ */ |
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