46 const CertificateInfo& certificate_info);
51 bool AddPublicKey(
const CertificateKey& pub_key,
bool need_verify =
true);
54 absl::StatusOr<KeyInfo>
GetPublicKey(int64_t node_id)
const;
61 virtual absl::StatusOr<SignatureInfo>
SignMessage(
const std::string& message);
63 const CertificateKeyInfo& info);
67 const SignatureInfo& sign);
69 const SignatureInfo& sign);
70 bool VerifyKey(
const CertificateKeyInfo& info,
const SignatureInfo& sign);
75 const KeyInfo& public_key,
76 const std::string& signature);
79 std::map<int64_t, CertificateKey> keys_;
83 KeyInfo admin_public_key_;
85 std::unique_ptr<CryptoPP::ed25519::Signer> signer_;
86 mutable std::shared_mutex mutex_;