Remove JsonWebKey.HasPrivateKey() since it is not required by anyone. (#2634)

* Remove JsonWebKey.HasPrivateKey() since it is not required by anyone.

* Update CL.

* Update CL to be consistent.
This commit is contained in:
Ahson Khan 2021-07-15 13:37:10 -07:00 committed by GitHub
parent fb1d66ee0c
commit b9a7a014ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 18 deletions

View File

@ -16,6 +16,7 @@
- Removed access to `Iv` field member from `EncryptParameters` and `DecryptParameters`.
- Removed `Encrypt(EncryptionAlgorithm, std::vector, context)`.
- Removed `Decrypt(DecryptAlgorithm, std::vector, context)`.
- Removed `JsonWebKey::HasPrivateKey()`.
- Removed the `MaxPageResults` field from `GetPropertiesOfKeysOptions`, `GetPropertiesOfKeyVersionsOptions`, and `GetDeletedKeysOptions`.
- Renamed header `list_keys_single_page_result.hpp` to `list_keys_responses.hpp`.
- Updated `BackupKey()` API return type to `BackupKeyResult` model type.

View File

@ -101,22 +101,6 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Keys {
/// Gets the Y coordinate for the elliptic curve point.
std::vector<uint8_t> Y;
bool HasPrivateKey() const
{
if (KeyType == KeyVaultKeyType::Rsa || KeyType == KeyVaultKeyType::Ec
|| KeyType == KeyVaultKeyType::RsaHsm || KeyType == KeyVaultKeyType::EcHsm)
{
return D.size() > 0;
}
if (KeyType == KeyVaultKeyType::Oct)
{
return K.size() > 0;
}
return false;
}
bool SupportsOperation(KeyOperation operation) const
{
for (auto supportedOperation : m_keyOps)

View File

@ -44,7 +44,5 @@ namespace Azure {
}
bool CanRemote() const noexcept override { return m_canRemote; };
bool MustRemote() const { return m_canRemote && !m_keyMaterial.HasPrivateKey(); }
};
}}}}}} // namespace Azure::Security::KeyVault::Keys::Cryptography::_detail