Stop disabling security warnings in get_env.hpp; Fixed all incorrect … (#4655)
* Disable deprecation warnings in cmakelists.txt to avoid introducing new concepts; removed unnecessary uses of get_env.hpp * Removed use of GetEnvHelper from AMQP samples * Removed special case for get_env.hpp
This commit is contained in:
parent
46dd5674a6
commit
b303a70eaa
@ -43,9 +43,6 @@ UseTab: Never
|
||||
IncludeCategories:
|
||||
- Regex: '^<windows.h>$'
|
||||
Priority: 80
|
||||
# Note: get_env.hpp must be included before any other Azure SDK headers.
|
||||
- Regex: '^["<]get_env.hpp'
|
||||
Priority: 10
|
||||
- Regex: '<[[:alnum:]_.]+>'
|
||||
Priority: 90
|
||||
- Regex: '<Azure/.*>'
|
||||
|
||||
@ -7,22 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
|
||||
// Linux and macOS
|
||||
#include <cstdlib>
|
||||
|
||||
#else
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
|
||||
#if !defined(WIN32_LEAN_AND_MEAN)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
#if !defined(NOMINMAX)
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
#include <windows.h>
|
||||
|
||||
// The AppStore partition for the Win32 API surface does not include a definition for std::getenv,
|
||||
// so we provide our own definition here.
|
||||
#if !defined(WINAPI_PARTITION_DESKTOP) || WINAPI_PARTITION_DESKTOP
|
||||
// Win32
|
||||
#include <cstdlib>
|
||||
@ -33,7 +19,6 @@ char* getenv(const char* name);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
@ -41,7 +26,14 @@ struct GetEnvHelper
|
||||
{
|
||||
static std::string GetEnv(char const* env)
|
||||
{
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4996)
|
||||
#endif
|
||||
auto const val = std::getenv(env);
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
if (val == nullptr)
|
||||
{
|
||||
throw std::runtime_error("Could not find required environment variable: " + std::string(env));
|
||||
|
||||
@ -9,8 +9,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "get_env.hpp"
|
||||
|
||||
#include <azure/storage/blobs.hpp>
|
||||
|
||||
#include <exception>
|
||||
|
||||
@ -16,6 +16,10 @@ project(vcpkg-all-smoke LANGUAGES CXX)
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
|
||||
if(MSVC)
|
||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
add_executable (
|
||||
vcpkg-all-smoke
|
||||
src/main
|
||||
|
||||
@ -6,8 +6,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "get_env.hpp"
|
||||
|
||||
#include <azure/attestation.hpp>
|
||||
#include <azure/core.hpp>
|
||||
#include <azure/core/internal/json/json.hpp>
|
||||
|
||||
@ -21,14 +21,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <get_env.hpp>
|
||||
|
||||
#include "attestation_collateral.hpp"
|
||||
|
||||
#include <azure/attestation.hpp>
|
||||
#include <azure/core/base64.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <get_env.hpp>
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
@ -21,14 +21,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <get_env.hpp>
|
||||
|
||||
#include "attestation_collateral.hpp"
|
||||
|
||||
#include <azure/attestation.hpp>
|
||||
#include <azure/core/base64.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <get_env.hpp>
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
@ -90,13 +89,3 @@ issuancerules {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string GetEnv(char const* env)
|
||||
{
|
||||
auto const val = std::getenv(env);
|
||||
if (val == nullptr)
|
||||
{
|
||||
throw std::runtime_error("Could not find required environment variable: " + std::string(env));
|
||||
}
|
||||
return std::string(val);
|
||||
}
|
||||
@ -21,14 +21,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <get_env.hpp>
|
||||
|
||||
#include "attestation_collateral.hpp"
|
||||
|
||||
#include <azure/attestation.hpp>
|
||||
#include <azure/core/base64.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <get_env.hpp>
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
|
||||
@ -21,14 +21,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <get_env.hpp>
|
||||
|
||||
#include "attestation_collateral.hpp"
|
||||
|
||||
#include <azure/attestation.hpp>
|
||||
#include <azure/core/base64.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <get_env.hpp>
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
|
||||
@ -21,14 +21,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <get_env.hpp>
|
||||
|
||||
#include "attestation_collateral.hpp"
|
||||
|
||||
#include <azure/attestation.hpp>
|
||||
#include <azure/core/base64.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <get_env.hpp>
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
|
||||
@ -17,12 +17,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <get_env.hpp>
|
||||
|
||||
#include <azure/attestation.hpp>
|
||||
#include <azure/identity.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <get_env.hpp>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <thread>
|
||||
|
||||
@ -13,11 +13,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <get_env.hpp>
|
||||
|
||||
#include <azure/attestation.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <get_env.hpp>
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
|
||||
@ -15,11 +15,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <get_env.hpp>
|
||||
|
||||
#include <azure/attestation.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <get_env.hpp>
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
|
||||
@ -15,11 +15,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <get_env.hpp>
|
||||
|
||||
#include <azure/attestation.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <get_env.hpp>
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
|
||||
@ -23,14 +23,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <get_env.hpp>
|
||||
|
||||
#include "cryptohelpers.hpp"
|
||||
|
||||
#include <azure/attestation.hpp>
|
||||
#include <azure/identity.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <get_env.hpp>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
@ -18,14 +18,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <get_env.hpp>
|
||||
|
||||
#include "cryptohelpers.hpp"
|
||||
|
||||
#include <azure/attestation.hpp>
|
||||
#include <azure/identity.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <get_env.hpp>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
@ -37,17 +36,17 @@ using namespace Azure::Security::Attestation::Models;
|
||||
using namespace std::chrono_literals;
|
||||
using namespace Azure::Core;
|
||||
|
||||
std::string GetEnv(char const* env);
|
||||
|
||||
int main()
|
||||
{
|
||||
try
|
||||
{
|
||||
// create an administration client
|
||||
auto const credential = std::make_shared<Azure::Identity::ClientSecretCredential>(
|
||||
GetEnv("AZURE_TENANT_ID"), GetEnv("AZURE_CLIENT_ID"), GetEnv("AZURE_CLIENT_SECRET"));
|
||||
AttestationAdministrationClient adminClient(
|
||||
AttestationAdministrationClient::Create(GetEnv("ATTESTATION_ISOLATED_URL"), credential));
|
||||
GetEnvHelper::GetEnv("AZURE_TENANT_ID"),
|
||||
GetEnvHelper::GetEnv("AZURE_CLIENT_ID"),
|
||||
GetEnvHelper::GetEnv("AZURE_CLIENT_SECRET"));
|
||||
AttestationAdministrationClient adminClient(AttestationAdministrationClient::Create(
|
||||
GetEnvHelper::GetEnv("ATTESTATION_ISOLATED_URL"), credential));
|
||||
|
||||
// Retrieve the SGX Attestation Policy from this attestation service instance.
|
||||
Azure::Response<AttestationToken<IsolatedModeCertificateListResult>> const policyCertificates
|
||||
@ -89,13 +88,3 @@ int main()
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string GetEnv(char const* env)
|
||||
{
|
||||
auto const val = std::getenv(env);
|
||||
if (val == nullptr)
|
||||
{
|
||||
throw std::runtime_error("Could not find required environment variable: " + std::string(env));
|
||||
}
|
||||
return std::string(val);
|
||||
}
|
||||
|
||||
@ -14,12 +14,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <get_env.hpp>
|
||||
|
||||
#include <azure/attestation.hpp>
|
||||
#include <azure/identity.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <get_env.hpp>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
@ -16,8 +16,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <get_env.hpp>
|
||||
|
||||
#include <azure/attestation.hpp>
|
||||
#include <azure/core/base64.hpp>
|
||||
#include <azure/core/cryptography/hash.hpp>
|
||||
@ -25,6 +23,7 @@
|
||||
#include <azure/identity.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <get_env.hpp>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
@ -17,8 +17,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <get_env.hpp>
|
||||
|
||||
#include "cryptohelpers.hpp"
|
||||
|
||||
#include <azure/attestation.hpp>
|
||||
@ -28,6 +26,7 @@
|
||||
#include <azure/identity.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <get_env.hpp>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
@ -16,8 +16,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <get_env.hpp>
|
||||
|
||||
#include <azure/attestation.hpp>
|
||||
#include <azure/core/base64.hpp>
|
||||
#include <azure/core/cryptography/hash.hpp>
|
||||
@ -25,6 +23,7 @@
|
||||
#include <azure/identity.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <get_env.hpp>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
@ -17,8 +17,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <get_env.hpp>
|
||||
|
||||
#include "cryptohelpers.hpp"
|
||||
|
||||
#include <azure/attestation.hpp>
|
||||
@ -29,6 +27,7 @@
|
||||
|
||||
#include <cassert>
|
||||
#include <chrono>
|
||||
#include <get_env.hpp>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// SPDX-Licence-Identifier: MIT
|
||||
|
||||
#undef _CRT_SECURE_NO_WARNINGS
|
||||
#include <get_env.hpp>
|
||||
|
||||
#include <azure/core/amqp/connection.hpp>
|
||||
#include <azure/core/amqp/message_sender.hpp>
|
||||
|
||||
@ -24,7 +21,7 @@ int main()
|
||||
std::string targetEntity = credentials->GetEntityPath();
|
||||
if (targetEntity.empty())
|
||||
{
|
||||
targetEntity = GetEnvHelper::GetEnv("EVENTHUB_NAME");
|
||||
targetEntity = std::getenv("EVENTHUB_NAME");
|
||||
}
|
||||
Azure::Core::Amqp::_internal::ConnectionOptions connectionOptions;
|
||||
connectionOptions.ContainerId = "some";
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// SPDX-Licence-Identifier: MIT
|
||||
|
||||
#undef _CRT_SECURE_NO_WARNINGS
|
||||
#include <get_env.hpp>
|
||||
|
||||
#include <azure/core/amqp/connection.hpp>
|
||||
#include <azure/core/amqp/connection_string_credential.hpp>
|
||||
#include <azure/core/amqp/management.hpp>
|
||||
@ -160,14 +157,14 @@ int main()
|
||||
// Retrieve the eventhub connection string so we can extract the host name and entity name. We
|
||||
// are NOT using the connection string to authenticate with the eventhub, only to retrieve the
|
||||
// host name and entity (if present).
|
||||
std::string eventhubConnectionString = GetEnvHelper::GetEnv("EVENTHUB_CONNECTION_STRING");
|
||||
std::string eventhubConnectionString = std::getenv("EVENTHUB_CONNECTION_STRING");
|
||||
|
||||
Azure::Core::Amqp::_internal::ConnectionStringParser connectionParser(eventhubConnectionString);
|
||||
std::string eventhubsHost = connectionParser.GetHostName();
|
||||
std::string eventhubsEntity = connectionParser.GetEntityPath();
|
||||
if (eventhubsEntity.empty())
|
||||
{
|
||||
eventhubsEntity = GetEnvHelper::GetEnv("EVENTHUB_NAME");
|
||||
eventhubsEntity = std::getenv("EVENTHUB_NAME");
|
||||
}
|
||||
|
||||
// Establish the connection to the eventhub.
|
||||
@ -179,9 +176,9 @@ int main()
|
||||
connectionParser.GetHostName(), connectionOptions);
|
||||
|
||||
auto credential{std::make_shared<Azure::Identity::ClientSecretCredential>(
|
||||
GetEnvHelper::GetEnv("SAMPLES_TENANT_ID"),
|
||||
GetEnvHelper::GetEnv("SAMPLES_CLIENT_ID"),
|
||||
GetEnvHelper::GetEnv("SAMPLES_CLIENT_SECRET"))};
|
||||
std::getenv("SAMPLES_TENANT_ID"),
|
||||
std::getenv("SAMPLES_CLIENT_ID"),
|
||||
std::getenv("SAMPLES_CLIENT_SECRET"))};
|
||||
|
||||
// Establish a session to the eventhub.
|
||||
Azure::Core::Amqp::_internal::SessionOptions sessionOptions;
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// SPDX-Licence-Identifier: MIT
|
||||
|
||||
#undef _CRT_SECURE_NO_WARNINGS
|
||||
#include <get_env.hpp>
|
||||
|
||||
#include <azure/core/amqp/connection.hpp>
|
||||
#include <azure/core/amqp/message_receiver.hpp>
|
||||
#include <azure/core/amqp/network/sasl_transport.hpp>
|
||||
@ -15,7 +12,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
std::string eventhubConnectionString = GetEnvHelper::GetEnv("EVENTHUB_CONNECTION_STRING");
|
||||
std::string eventhubConnectionString = std::getenv("EVENTHUB_CONNECTION_STRING");
|
||||
|
||||
auto credential
|
||||
= std::make_shared<Azure::Core::Amqp::_internal::ServiceBusSasConnectionStringCredential>(
|
||||
@ -23,7 +20,7 @@ int main()
|
||||
std::string entityPath = credential->GetEntityPath();
|
||||
if (entityPath.empty())
|
||||
{
|
||||
entityPath = GetEnvHelper::GetEnv("EVENTHUB_NAME");
|
||||
entityPath = std::getenv("EVENTHUB_NAME");
|
||||
}
|
||||
|
||||
Azure::Core::Amqp::_internal::ConnectionOptions connectionOptions;
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// SPDX-Licence-Identifier: MIT
|
||||
|
||||
#undef _CRT_SECURE_NO_WARNINGS
|
||||
#include <get_env.hpp>
|
||||
|
||||
#include <azure/core/amqp/connection.hpp>
|
||||
#include <azure/core/amqp/connection_string_credential.hpp>
|
||||
#include <azure/core/amqp/message_sender.hpp>
|
||||
@ -15,7 +12,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
std::string eventhubConnectionString = GetEnvHelper::GetEnv("EVENTHUB_CONNECTION_STRING");
|
||||
std::string eventhubConnectionString = std::getenv("EVENTHUB_CONNECTION_STRING");
|
||||
|
||||
auto credential{
|
||||
std::make_shared<Azure::Core::Amqp::_internal::ServiceBusSasConnectionStringCredential>(
|
||||
@ -23,7 +20,7 @@ int main()
|
||||
std::string entityPath = credential->GetEntityPath();
|
||||
if (entityPath.empty())
|
||||
{
|
||||
entityPath = GetEnvHelper::GetEnv("EVENTHUB_NAME");
|
||||
entityPath = std::getenv("EVENTHUB_NAME");
|
||||
}
|
||||
Azure::Core::Amqp::_internal::ConnectionOptions connectionOptions;
|
||||
connectionOptions.ContainerId = "some";
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// SPDX-Licence-Identifier: MIT
|
||||
|
||||
#undef _CRT_SECURE_NO_WARNINGS
|
||||
#include <get_env.hpp>
|
||||
|
||||
#include <azure/core/amqp/connection.hpp>
|
||||
#include <azure/core/amqp/message_receiver.hpp>
|
||||
#include <azure/core/amqp/network/sasl_transport.hpp>
|
||||
@ -15,7 +12,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
std::string eventhubConnectionString = GetEnvHelper::GetEnv("EVENTHUB_CONNECTION_STRING");
|
||||
std::string eventhubConnectionString = std::getenv("EVENTHUB_CONNECTION_STRING");
|
||||
|
||||
auto credential
|
||||
= std::make_shared<Azure::Core::Amqp::_internal::ServiceBusSasConnectionStringCredential>(
|
||||
@ -23,7 +20,7 @@ int main()
|
||||
std::string entityPath = credential->GetEntityPath();
|
||||
if (entityPath.empty())
|
||||
{
|
||||
entityPath = GetEnvHelper::GetEnv("EVENTHUB_NAME");
|
||||
entityPath = std::getenv("EVENTHUB_NAME");
|
||||
}
|
||||
|
||||
Azure::Core::Amqp::_internal::ConnectionOptions connectionOptions;
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// SPDX-Licence-Identifier: MIT
|
||||
|
||||
#undef _CRT_SECURE_NO_WARNINGS
|
||||
#include <get_env.hpp>
|
||||
|
||||
#include <azure/core/amqp/connection.hpp>
|
||||
#include <azure/core/amqp/connection_string_credential.hpp>
|
||||
#include <azure/core/amqp/message_sender.hpp>
|
||||
@ -21,7 +18,7 @@ int main()
|
||||
{
|
||||
// Retrieve the eventhub connection string so we can extract the host name and entity name. We are
|
||||
// NOT using the connection string to connect to the eventhub.
|
||||
std::string eventhubConnectionString = GetEnvHelper::GetEnv("EVENTHUB_CONNECTION_STRING");
|
||||
std::string eventhubConnectionString = std::getenv("EVENTHUB_CONNECTION_STRING");
|
||||
Azure::Core::Amqp::_internal::ConnectionStringParser connectionStringCredential(
|
||||
eventhubConnectionString);
|
||||
std::string eventhubsHost = connectionStringCredential.GetHostName();
|
||||
@ -31,14 +28,14 @@ int main()
|
||||
// environment variable.
|
||||
if (eventhubsEntity.empty())
|
||||
{
|
||||
eventhubsEntity = GetEnvHelper::GetEnv("EVENTHUB_NAME");
|
||||
eventhubsEntity = std::getenv("EVENTHUB_NAME");
|
||||
}
|
||||
|
||||
// Establish credentials for the eventhub client.
|
||||
auto credential{std::make_shared<Azure::Identity::ClientSecretCredential>(
|
||||
GetEnvHelper::GetEnv("SAMPLES_TENANT_ID"),
|
||||
GetEnvHelper::GetEnv("SAMPLES_CLIENT_ID"),
|
||||
GetEnvHelper::GetEnv("SAMPLES_CLIENT_SECRET"))};
|
||||
std::getenv("SAMPLES_TENANT_ID"),
|
||||
std::getenv("SAMPLES_CLIENT_ID"),
|
||||
std::getenv("SAMPLES_CLIENT_SECRET"))};
|
||||
|
||||
Azure::Core::Amqp::_internal::ConnectionOptions connectionOptions;
|
||||
connectionOptions.ContainerId = "some";
|
||||
|
||||
@ -7,6 +7,10 @@ project (azure-identity-samples LANGUAGES CXX)
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
|
||||
if(MSVC)
|
||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
add_executable(azure_cli_credential_sample azure_cli_credential.cpp)
|
||||
target_link_libraries(azure_cli_credential_sample PRIVATE azure-identity service)
|
||||
target_include_directories(azure_cli_credential_sample PRIVATE .)
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <get_env.hpp>
|
||||
|
||||
#include <azure/identity/client_certificate_credential.hpp>
|
||||
#include <azure/service/client.hpp>
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <get_env.hpp>
|
||||
|
||||
#include <azure/identity/client_secret_credential.hpp>
|
||||
#include <azure/service/client.hpp>
|
||||
|
||||
|
||||
@ -13,8 +13,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "get_env.hpp"
|
||||
|
||||
#include <azure/identity.hpp>
|
||||
#include <azure/keyvault/administration.hpp>
|
||||
|
||||
|
||||
@ -3,6 +3,10 @@
|
||||
|
||||
cmake_minimum_required (VERSION 3.13)
|
||||
|
||||
if(MSVC)
|
||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
add_subdirectory(certificate-basic-operations)
|
||||
add_subdirectory(certificate-get-certificates)
|
||||
add_subdirectory(certificate-import-certificate)
|
||||
|
||||
@ -13,8 +13,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "get_env.hpp"
|
||||
|
||||
#include <azure/identity.hpp>
|
||||
#include <azure/keyvault/certificates.hpp>
|
||||
|
||||
|
||||
@ -16,8 +16,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "get_env.hpp"
|
||||
|
||||
#include <azure/identity.hpp>
|
||||
#include <azure/keyvault/certificates.hpp>
|
||||
|
||||
|
||||
@ -13,8 +13,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "get_env.hpp"
|
||||
|
||||
#include <azure/core.hpp>
|
||||
#include <azure/identity.hpp>
|
||||
#include <azure/keyvault/certificates.hpp>
|
||||
|
||||
@ -3,6 +3,10 @@
|
||||
|
||||
cmake_minimum_required (VERSION 3.13)
|
||||
|
||||
if(MSVC)
|
||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
add_subdirectory(sample1-hello-world)
|
||||
add_subdirectory(sample2-backup-and-restore)
|
||||
add_subdirectory(sample3-get-keys)
|
||||
|
||||
@ -13,8 +13,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "get_env.hpp"
|
||||
|
||||
#include <azure/core.hpp>
|
||||
#include <azure/identity.hpp>
|
||||
#include <azure/keyvault/keys.hpp>
|
||||
|
||||
@ -13,8 +13,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "get_env.hpp"
|
||||
|
||||
#include <azure/core.hpp>
|
||||
#include <azure/identity.hpp>
|
||||
#include <azure/keyvault/keys.hpp>
|
||||
|
||||
@ -14,8 +14,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "get_env.hpp"
|
||||
|
||||
#include <azure/core.hpp>
|
||||
#include <azure/identity.hpp>
|
||||
#include <azure/keyvault/keys.hpp>
|
||||
|
||||
@ -13,8 +13,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "get_env.hpp"
|
||||
|
||||
#include <azure/core.hpp>
|
||||
#include <azure/identity.hpp>
|
||||
#include <azure/keyvault/keys.hpp>
|
||||
|
||||
@ -13,8 +13,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "get_env.hpp"
|
||||
|
||||
#include <azure/core.hpp>
|
||||
#include <azure/identity.hpp>
|
||||
#include <azure/keyvault/keys.hpp>
|
||||
|
||||
@ -13,8 +13,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "get_env.hpp"
|
||||
|
||||
#include <azure/core.hpp>
|
||||
#include <azure/identity.hpp>
|
||||
#include <azure/keyvault/keys.hpp>
|
||||
|
||||
@ -13,8 +13,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "get_env.hpp"
|
||||
|
||||
#include <azure/core.hpp>
|
||||
#include <azure/identity.hpp>
|
||||
#include <azure/keyvault/keyvault_keys.hpp>
|
||||
|
||||
@ -3,6 +3,10 @@
|
||||
|
||||
cmake_minimum_required (VERSION 3.13)
|
||||
|
||||
if(MSVC)
|
||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
add_subdirectory(sample1-basic-operations)
|
||||
add_subdirectory(sample2-backup-restore)
|
||||
add_subdirectory(sample3-delete-recover)
|
||||
|
||||
@ -13,8 +13,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "get_env.hpp"
|
||||
|
||||
#include <azure/identity.hpp>
|
||||
#include <azure/keyvault/secrets.hpp>
|
||||
|
||||
|
||||
@ -13,8 +13,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "get_env.hpp"
|
||||
|
||||
#include <azure/identity.hpp>
|
||||
#include <azure/keyvault/secrets.hpp>
|
||||
|
||||
|
||||
@ -13,8 +13,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "get_env.hpp"
|
||||
|
||||
#include <azure/identity.hpp>
|
||||
#include <azure/keyvault/secrets.hpp>
|
||||
|
||||
|
||||
@ -13,8 +13,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "get_env.hpp"
|
||||
|
||||
#include <azure/identity.hpp>
|
||||
#include <azure/keyvault/secrets.hpp>
|
||||
|
||||
|
||||
@ -13,8 +13,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "get_env.hpp"
|
||||
|
||||
#include <azure/identity.hpp>
|
||||
#include <azure/keyvault/certificates.hpp>
|
||||
#include <azure/keyvault/keys.hpp>
|
||||
|
||||
@ -3,6 +3,10 @@
|
||||
|
||||
cmake_minimum_required (VERSION 3.13)
|
||||
|
||||
if(MSVC)
|
||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
add_executable(blob-getting-started blob_getting_started.cpp)
|
||||
target_link_libraries(blob-getting-started PRIVATE azure-storage-blobs get-env-helper)
|
||||
create_per_service_target_build_for_sample(storage blob-getting-started)
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include "get_env.hpp"
|
||||
|
||||
#include <azure/storage/blobs.hpp>
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include "get_env.hpp"
|
||||
|
||||
#include <azure/storage/blobs.hpp>
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include "get_env.hpp"
|
||||
|
||||
#include <azure/storage/blobs.hpp>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include "get_env.hpp"
|
||||
|
||||
#include <azure/storage/blobs.hpp>
|
||||
#include <azure/storage/common/storage_exception.hpp>
|
||||
|
||||
|
||||
@ -1,10 +1,8 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include "get_env.hpp"
|
||||
|
||||
#include <azure/storage/blobs.hpp>
|
||||
#include <azure/storage/common/crypt.hpp>
|
||||
#include <azure/storage/common/storage_exception.hpp>
|
||||
|
||||
#include <cstdio>
|
||||
#include <iostream>
|
||||
|
||||
@ -3,6 +3,10 @@
|
||||
|
||||
cmake_minimum_required (VERSION 3.13)
|
||||
|
||||
if(MSVC)
|
||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
add_executable(datalake-getting-started datalake_getting_started.cpp)
|
||||
create_per_service_target_build_for_sample(storage datalake-getting-started)
|
||||
target_link_libraries(datalake-getting-started PRIVATE azure-storage-files-datalake get-env-helper)
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include "get_env.hpp"
|
||||
|
||||
#include <azure/storage/files/datalake.hpp>
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
@ -3,6 +3,10 @@
|
||||
|
||||
cmake_minimum_required (VERSION 3.13)
|
||||
|
||||
if(MSVC)
|
||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
add_executable(file-share-getting-started file_share_getting_started.cpp)
|
||||
create_per_service_target_build_for_sample(storage file-share-getting-started)
|
||||
target_link_libraries(file-share-getting-started PRIVATE azure-storage-files-shares get-env-helper)
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include "get_env.hpp"
|
||||
|
||||
#include <azure/storage/files/shares.hpp>
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
@ -3,6 +3,10 @@
|
||||
|
||||
cmake_minimum_required (VERSION 3.13)
|
||||
|
||||
if(MSVC)
|
||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
add_executable(queue-getting-started queue_getting_started.cpp)
|
||||
target_link_libraries(queue-getting-started PRIVATE azure-storage-queues get-env-helper)
|
||||
create_per_service_target_build_for_sample(storage queue-getting-started)
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include "get_env.hpp"
|
||||
|
||||
#include <azure/core/base64.hpp>
|
||||
#include <azure/storage/queues.hpp>
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include "get_env.hpp"
|
||||
|
||||
#include <azure/storage/queues.hpp>
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user