-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clang-tidy conformance and updated tests for FIPS mode
- Loading branch information
Showing
12 changed files
with
130 additions
and
32 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
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,23 @@ | ||
#include "fips.h" | ||
#include <openssl/evp.h> | ||
#include <openssl/provider.h> | ||
#include <set> | ||
|
||
using namespace mls; | ||
|
||
bool | ||
fips() | ||
{ | ||
return OSSL_PROVIDER_available(nullptr, "fips") == 1 || | ||
EVP_default_properties_is_fips_enabled(nullptr) == 1; | ||
} | ||
|
||
bool | ||
is_fips_approved(CipherSuite::ID id) | ||
{ | ||
static const auto disallowed = std::set<CipherSuite::ID>{ | ||
CipherSuite::ID::X25519_CHACHA20POLY1305_SHA256_Ed25519, | ||
CipherSuite::ID::X448_CHACHA20POLY1305_SHA512_Ed448, | ||
}; | ||
return disallowed.count(id) == 0; | ||
} |
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,7 @@ | ||
#include <mls/crypto.h> | ||
|
||
bool | ||
fips(); | ||
|
||
bool | ||
is_fips_approved(mls::CipherSuite::ID id); |
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,23 @@ | ||
#include "fips.h" | ||
#include <openssl/evp.h> | ||
#include <openssl/provider.h> | ||
#include <set> | ||
|
||
using namespace mls; | ||
|
||
bool | ||
fips() | ||
{ | ||
return OSSL_PROVIDER_available(nullptr, "fips") == 1 || | ||
EVP_default_properties_is_fips_enabled(nullptr) == 1; | ||
} | ||
|
||
bool | ||
is_fips_approved(CipherSuite::ID id) | ||
{ | ||
static const auto disallowed = std::set<CipherSuite::ID>{ | ||
CipherSuite::ID::X25519_CHACHA20POLY1305_SHA256_Ed25519, | ||
CipherSuite::ID::X448_CHACHA20POLY1305_SHA512_Ed448, | ||
}; | ||
return disallowed.count(id) == 0; | ||
} |
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,7 @@ | ||
#include <mls/crypto.h> | ||
|
||
bool | ||
fips(); | ||
|
||
bool | ||
is_fips_approved(mls::CipherSuite::ID id); |
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