![]() |
Zero Trust IoT library
|
Issues and signs certificates for Zero Trust identity validation. More...
#include <zt-certificate.h>
Public Member Functions | |
| CertificateAuthority () | |
| Constructor that initializes and generates RSA key pair. | |
| std::string | SignIdentity (uint32_t nodeId, const std::string &role, time_t expiry) |
| Signs an identity certificate with node ID, role, and expiry. | |
| CryptoPP::RSA::PublicKey | GetPublicKey () const |
| Retrieves the public RSA key of the CA. | |
Private Attributes | |
| CryptoPP::RSA::PrivateKey | privateKey |
| RSA private key used for signing certificates. | |
| CryptoPP::RSA::PublicKey | publicKey |
| RSA public key distributed for verification. | |
Issues and signs certificates for Zero Trust identity validation.
Simulates a Certificate Authority (CA) that issues and signs identity certificates.
The CA generates a public-private RSA key pair and uses it to sign certificates for nodes, which include identity, role, and expiry information.
Definition at line 17 of file zt-certificate.h.
| CertificateAuthority::CertificateAuthority | ( | ) |
Constructor that initializes and generates RSA key pair.
Definition at line 16 of file zt-certificate.cc.
| RSA::PublicKey CertificateAuthority::GetPublicKey | ( | ) | const |
Retrieves the public RSA key of the CA.
Returns the public key of the Certificate Authority.
Definition at line 52 of file zt-certificate.cc.
| std::string CertificateAuthority::SignIdentity | ( | uint32_t | nodeId, |
| const std::string & | role, | ||
| time_t | expiry | ||
| ) |
Signs an identity certificate with node ID, role, and expiry.
Signs a certificate with node ID, role, and expiry.
| nodeId | The unique identifier of the node. |
| role | The assigned role of the node (e.g., "sensor", "gateway"). |
| expiry | Expiry timestamp for the certificate. |
| nodeId | ID of the node requesting certificate |
| role | Role assigned to the node (e.g., sensor, gateway) |
| expiry | Expiry timestamp of the certificate |
Definition at line 29 of file zt-certificate.cc.
|
private |
RSA private key used for signing certificates.
Definition at line 40 of file zt-certificate.h.
|
private |
RSA public key distributed for verification.
Definition at line 41 of file zt-certificate.h.