Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Final merge to main for Key Vault 7.3 #3783

Merged
merged 20 commits into from
Jul 6, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
one last round
  • Loading branch information
gearama committed Jul 6, 2022
commit b09d76ad14173f5401d16f66a46e76186e305b46
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// SPDX-License-Identifier: MIT

#include "../../azure-security-attestation/src/private/crypto/inc/crypto.hpp"
#include "key_client_base_test.hpp"

#include "private/key_constants.hpp"
@@ -240,7 +239,7 @@ std::string BinaryToHexString(std::vector<uint8_t> const& src)
{
static constexpr char hexMap[]
= {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
std::string output(static_cast<size_t>(src.size()) * 2, ' ');
std::string output(static_cast<size_t>(src.size()) * 2, '\0');
const uint8_t* input = src.data();

for (size_t i = 0; i < src.size(); i++)
@@ -262,13 +261,20 @@ TEST_F(KeyVaultKeyClient, CreateKeyWithReleasePolicyOptions)
options.KeyOperations.push_back(Azure::Security::KeyVault::Keys::KeyOperation::Verify);
options.ReleasePolicy = KeyReleasePolicy();
options.ReleasePolicy.Value().Immutable = false;
std::string dataStr = "{"
"\"anyOf\" : [ {"
"\"allOf\" : [ {\"claim\" : \"claim\", \"equals\" : \"0123456789\"} ],"
"\"authority\" : \"https://sharedeus.eus.test.attest.azure.net/\""
"} ],"
" \"version\" : \"1.0.0\""
"} ";
std::string dataStr = R"JSON({
"anyOf":[
{
"allOf":[
{
"claim":"claim",
"equals":"0123456789"
}
],
"authority":"https://sharedeus.eus.test.attest.azure.net/"
}
],
"version":"1.0.0"
})JSON";
auto jsonParser = json::parse(dataStr);
auto parsedJson = jsonParser.dump();
options.ReleasePolicy.Value().EncodedPolicy