class
OperationalCertificateManagerManage creation and serialization of node operational certificates.
Public static functions
- static auto generate(const KesVerificationKey& hot_key, const OperationalCertificateIssueCounter& counter, size_t kes_period, const ColdSigningKey& skey) → OperationalCertificateManager
- Generate a complete cert with signature.
- static auto generate(const KesVerificationKey& hot_key, const OperationalCertificateIssueCounter& counter, size_t kes_period, const ExtendedColdSigningKey& skey) → OperationalCertificateManager
- Generate a complete cert with signature.
- static auto generateUnsigned(const KesVerificationKey& hot_key, const OperationalCertificateIssueCounter& counter, size_t kes_period) → OperationalCertificateManager
- Generate a new cert without a signature.
Constructors, destructors, conversion operators
-
OperationalCertificateManager(cardano::
shelley:: OperationalCert cert) explicit - Construct a manager object from an operational certificate.
Public functions
- auto certificate() const → const cardano::shelley::OperationalCert&
- Provide a constant reference to the certificate struct.
-
void saveToFile(std::
string_view fpath, const ColdVerificationKey& vkey) const - Export the certifiate to a file in the text envelope format.
- auto serialize() const → std::vector<uint8_t>
- Serialize the certificate to CBOR.
- auto serialize(const ColdVerificationKey& vkey) const → std::vector<uint8_t>
- Serialize the certificate to CBOR with the pool vkey.
- void sign(const ColdSigningKey& skey)
- Add a signature to the certificate.
- void sign(const ExtendedColdSigningKey& skey)
- Add a signature to the certificate.
- auto verify(const ColdVerificationKey& vkey) const → bool
- Verify the certificate signature.
Function documentation
static OperationalCertificateManager cardano:: stake_pool:: OperationalCertificateManager:: generate(const KesVerificationKey& hot_key,
const OperationalCertificateIssueCounter& counter,
size_t kes_period,
const ColdSigningKey& skey)
Generate a complete cert with signature.
Parameters | |
---|---|
hot_key | The stake pool hot public key (KES key). |
counter | The issue counter object. |
kes_period | The current KES period (int). |
skey | The stake pool cold signing key. |
Returns | A new OperationalCertificateManager object. |
static OperationalCertificateManager cardano:: stake_pool:: OperationalCertificateManager:: generate(const KesVerificationKey& hot_key,
const OperationalCertificateIssueCounter& counter,
size_t kes_period,
const ExtendedColdSigningKey& skey)
Generate a complete cert with signature.
Parameters | |
---|---|
hot_key | The stake pool hot public key (KES key). |
counter | The issue counter object. |
kes_period | The current KES period (int). |
skey | The stake pool cold signing key (extended key). |
Returns | A new OperationalCertificateManager object. |
static OperationalCertificateManager cardano:: stake_pool:: OperationalCertificateManager:: generateUnsigned(const KesVerificationKey& hot_key,
const OperationalCertificateIssueCounter& counter,
size_t kes_period)
Generate a new cert without a signature.
Parameters | |
---|---|
hot_key | The stake pool hot public key (KES key). |
counter | The issue counter object. |
kes_period | The current KES period (int). |
Returns | A new OperationalCertificateManager object. |
cardano:: stake_pool:: OperationalCertificateManager:: OperationalCertificateManager(cardano:: shelley:: OperationalCert cert) explicit
Construct a manager object from an operational certificate.
Parameters | |
---|---|
cert | An operational certificate struct. |
const cardano::shelley::OperationalCert& cardano:: stake_pool:: OperationalCertificateManager:: certificate() const
Provide a constant reference to the certificate struct.
Returns | A constant reference to the wrapped certificate struct. |
---|
void cardano:: stake_pool:: OperationalCertificateManager:: saveToFile(std:: string_view fpath,
const ColdVerificationKey& vkey) const
Export the certifiate to a file in the text envelope format.
Parameters | |
---|---|
fpath | Path to the file to be (over)written. |
vkey | The public key corresponding to the cert signing key. |
std::vector<uint8_t> cardano:: stake_pool:: OperationalCertificateManager:: serialize() const
Serialize the certificate to CBOR.
Returns | The CBOR byte string as a byte vector. |
---|
std::vector<uint8_t> cardano:: stake_pool:: OperationalCertificateManager:: serialize(const ColdVerificationKey& vkey) const
Serialize the certificate to CBOR with the pool vkey.
Parameters | |
---|---|
vkey | Stake pool verification key. |
Returns | The CBOR byte string as a byte vector. |
void cardano:: stake_pool:: OperationalCertificateManager:: sign(const ColdSigningKey& skey)
Add a signature to the certificate.
Parameters | |
---|---|
skey | Stake pool cold signing key. |
void cardano:: stake_pool:: OperationalCertificateManager:: sign(const ExtendedColdSigningKey& skey)
Add a signature to the certificate.
Parameters | |
---|---|
skey | Stake pool cold signing key (extended key). |
bool cardano:: stake_pool:: OperationalCertificateManager:: verify(const ColdVerificationKey& vkey) const
Verify the certificate signature.
Parameters | |
---|---|
vkey | Stake pool verification key. |
Returns | True if the cert contains a valid cold key signature. |