CCF
Loading...
Searching...
No Matches
ledger_sign_mode.h
Go to the documentation of this file.
1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the Apache 2.0 License.
3#pragma once
4
5#include "ccf/ds/json.h"
6
7#include <cstdint>
8
9namespace ccf
10{
11 enum class LedgerSignMode : uint8_t
12 {
13 // Emit both traditional node signatures and COSE Sign1 signatures.
14 // Accept join requests from nodes in any signing mode.
15 Dual = 0,
16
17 // Emit only COSE Sign1 signatures, but accept join requests from
18 // nodes still running in Dual mode. Use during rolling upgrades.
20
21 // Emit only COSE Sign1 signatures and reject join requests from
22 // nodes running in Dual mode. Final state after a completed upgrade.
23 CoseOnly = 2
24 };
25
28 {{LedgerSignMode::Dual, "Dual"},
29 {LedgerSignMode::CoseAllowDualJoin, "CoseAllowDualJoin"},
30 {LedgerSignMode::CoseOnly, "CoseOnly"}});
31
40}
#define DECLARE_JSON_ENUM(TYPE,...)
Definition json.h:864
Definition app_interface.h:13
LedgerSignMode get_ledger_sign_mode()
Definition get_ledger_sign_mode_cose.cpp:8
LedgerSignMode
Definition ledger_sign_mode.h:12