Add const& to input std::string params in ClientCertificateCredential. (#5993)

This commit is contained in:
Ahson Khan 2024-09-17 15:56:31 -07:00 committed by GitHub
parent ea00a69e04
commit d7b63eef12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 12 deletions

View File

@ -99,8 +99,8 @@ namespace Azure { namespace Identity {
explicit ClientCertificateCredential(
std::string tenantId,
std::string const& clientId,
std::string clientCertificate,
std::string privateKey,
std::string const& clientCertificate,
std::string const& privateKey,
std::string const& authorityHost,
std::vector<std::string> additionallyAllowedTenants,
bool sendCertificateChain,
@ -137,8 +137,8 @@ namespace Azure { namespace Identity {
explicit ClientCertificateCredential(
std::string tenantId,
std::string const& clientId,
std::string clientCertificate,
std::string privateKey,
std::string const& clientCertificate,
std::string const& privateKey,
ClientCertificateCredentialOptions const& options = {});
/**

View File

@ -322,8 +322,8 @@ UniquePrivateKey ImportPemPrivateKey(std::string const& pem)
}
std::tuple<CertificateThumbprint, UniquePrivateKey> ReadPemCertificate(
std::string clientCertificate,
std::string privateKey)
std::string const& clientCertificate,
std::string const& privateKey)
{
auto certContext = ImportPemCertificate(clientCertificate);
@ -422,8 +422,8 @@ std::tuple<CertificateThumbprint, UniquePrivateKey> GetThumbprintAndKey(
}
std::tuple<CertificateThumbprint, UniquePrivateKey> ReadPemCertificate(
std::string clientCertificate,
std::string privateKey)
std::string const& clientCertificate,
std::string const& privateKey)
{
// Create a BIO from the private key vector data in memory.
UniqueHandle<BIO> bioKey(BIO_new_mem_buf(privateKey.data(), static_cast<int>(privateKey.size())));
@ -585,8 +585,8 @@ ClientCertificateCredential::ClientCertificateCredential(
ClientCertificateCredential::ClientCertificateCredential(
std::string tenantId,
std::string const& clientId,
std::string clientCertificate,
std::string privateKey,
std::string const& clientCertificate,
std::string const& privateKey,
std::string const& authorityHost,
std::vector<std::string> additionallyAllowedTenants,
bool sendCertificateChain,
@ -655,8 +655,8 @@ ClientCertificateCredential::ClientCertificateCredential(
ClientCertificateCredential::ClientCertificateCredential(
std::string tenantId,
std::string const& clientId,
std::string clientCertificate,
std::string privateKey,
std::string const& clientCertificate,
std::string const& privateKey,
ClientCertificateCredentialOptions const& options)
: ClientCertificateCredential(
tenantId,