Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion kmipclient/src/Key.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ namespace kmipclient {
return std::make_unique<X509Certificate>(
core_key.value(), core_key.attributes()
);
case KeyType::UNSET:
default:
throw kmipcore::KmipException(
"Unsupported key type in core->client conversion"
Expand Down
13 changes: 2 additions & 11 deletions kmipcore/include/kmipcore/key.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,7 @@
namespace kmipcore {

/** @brief Key object families represented by @ref Key. */
enum class KeyType {
UNSET,
SYMMETRIC_KEY,
PUBLIC_KEY,
PRIVATE_KEY,
CERTIFICATE
};
enum class KeyType { SYMMETRIC_KEY, PUBLIC_KEY, PRIVATE_KEY, CERTIFICATE };

/**
* Minimal crypto key representation as KMIP spec sees it.
Expand All @@ -46,9 +40,6 @@ namespace kmipcore {
)
: ManagedObject(value, std::move(attrs)), key_type(k_type) {}

/** @brief Constructs an empty key object. */
Key() = default;

Key(const Key &) = default;
Key &operator=(const Key &) = default;
Key(Key &&) noexcept = default;
Expand All @@ -61,7 +52,7 @@ namespace kmipcore {
[[nodiscard]] size_t size() const noexcept { return value_.size(); }

private:
KeyType key_type = KeyType::UNSET;
KeyType key_type;
};

} // namespace kmipcore
Expand Down
2 changes: 0 additions & 2 deletions kmipcore/src/kmip_requests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ namespace kmipcore {
KMIP_NOT_IMPLEMENTED,
"Certificate registration is not yet supported"
);
case KeyType::UNSET:
default:
throw KmipException(
KMIP_INVALID_FIELD, "Unsupported key type for Register"
Expand All @@ -250,7 +249,6 @@ namespace kmipcore {
return KMIP_OBJTYPE_PUBLIC_KEY;
case KeyType::CERTIFICATE:
return KMIP_OBJTYPE_CERTIFICATE;
case KeyType::UNSET:
default:
throw KmipException(
KMIP_INVALID_FIELD, "Unsupported key type for Register"
Expand Down
Loading