Skip to content

Commit

Permalink
Add follow ups and remove deprecation mentions
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel40791765 committed Nov 29, 2023
1 parent 842dc83 commit a8f1c87
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
5 changes: 0 additions & 5 deletions PORTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,6 @@ OpenSSL and BoringSSL. Note that BoringSSL's function versions will be
type-checked and may require more care with types. See the end of this
document for a table of functions to use.

### HMAC `EVP_PKEY`s

`EVP_PKEY_HMAC` is removed. Use the `HMAC_*` functions in `hmac.h` instead. This
is compatible with OpenSSL.

### DSA `EVP_PKEY`s

`EVP_PKEY_DSA` is deprecated. It is currently still possible to parse DER into a
Expand Down
2 changes: 1 addition & 1 deletion crypto/evp_extra/p_hmac_asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static void hmac_key_free(EVP_PKEY *pkey) {

const EVP_PKEY_ASN1_METHOD hmac_asn1_meth = {
EVP_PKEY_HMAC,
{0xff} /* TODO: placeholder oid */,
{0xff} /* placeholder oid */,
0 /* oid_len */,
NULL /* pub_decode */,
NULL /* pub_encode */,
Expand Down
4 changes: 4 additions & 0 deletions crypto/fipsmodule/service_indicator/service_indicator_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1296,6 +1296,10 @@ class HMACServiceIndicatorTest : public TestWithNoErrors<HMACTestVector> {};
INSTANTIATE_TEST_SUITE_P(All, HMACServiceIndicatorTest,
testing::ValuesIn(kHMACTestVectors));

// TODO: |EVP_PKEY_HMAC| does not indicate support for FIPS yet. Mark
// |EVP_PKEY_HMAC| as approved by modifying
// |EVP_DigestSign_verify_service_indicator| and add to the list of approved
// FIPS APIs.
TEST_P(HMACServiceIndicatorTest, HMACTest) {
const HMACTestVector &test = GetParam();

Expand Down
4 changes: 2 additions & 2 deletions crypto/hmac_extra/hmac_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ static bool RunHMACTestEVP(const std::vector<uint8_t> &key,
EXPECT_TRUE(EVP_DigestSignFinal(mctx.get(), actual.data(), &len));
actual.resize(len);

// Wycheproof tests truncate the tags down to |tagSize|. Tests in
// hmac_tests.txt already have the correct corresponding tagSize.
// Wycheproof tests truncate the tags down to |tagSize|. Expected outputs in
// hmac_tests.txt have the length of the entire tag.
EXPECT_EQ(Bytes(tag), Bytes(actual.data(), tag.size()));
return true;
}
Expand Down

0 comments on commit a8f1c87

Please sign in to comment.