#include <tnlCertificate.h>
Inheritance diagram for TNL::Certificate:
Certificates consist of an application-defined payload, a public key, and a signature. It is up to the application to determine from the payload what, if any, certificate authority (CA) signed the certificate. The validate() method can be used to check the certificate's authenticity against the known public key of the signing Certificate Authority.
The payload could include such items as:
Public Types | |
enum | { MaxPayloadSize = 512 } |
Public Member Functions | |
Certificate (U8 *dataPtr, U32 dataSize) | |
Certificate constructor. | |
Certificate (const ByteBuffer &buffer) | |
Certificate (BitStream *stream) | |
Certificate (const ByteBuffer &payload, RefPtr< AsymmetricKey > publicKey, RefPtr< AsymmetricKey > theCAPrivateKey) | |
void | parse () |
Parses this certificate into the payload, public key, identiy, certificate authority and signature. | |
bool | isValid () |
returns the validity of the certificate's formation | |
bool | validate (RefPtr< AsymmetricKey > signatoryPublicKey) |
returns true if this certificate was signed by the private key corresponding to the passed public key. | |
RefPtr< AsymmetricKey > | getPublicKey () |
Returns the public key from the certificate. | |
ByteBufferPtr | getPayload () |
Returns the certificate payload. | |
Protected Attributes | |
RefPtr< AsymmetricKey > | mPublicKey |
The public key for the holder of this certificate. | |
ByteBufferPtr | mPayload |
The certificate payload, including the identity of the holder and the Certificate Authority. | |
ByteBufferPtr | mSignature |
The digital signature of this certificate by the signatory. | |
bool | mIsValid |
flag to signify whether this certificate has a valid form | |
U32 | mSignatureByteSize |
Number of bytes of the ByteBuffer signed by the CA. |
|
|
|
Certificate constructor.
|
|
|
|
|
|
|
|
Parses this certificate into the payload, public key, identiy, certificate authority and signature.
|
|
returns the validity of the certificate's formation
|
|
returns true if this certificate was signed by the private key corresponding to the passed public key.
|
|
Returns the public key from the certificate.
|
|
Returns the certificate payload.
|
|
The public key for the holder of this certificate.
|
|
The certificate payload, including the identity of the holder and the Certificate Authority.
|
|
The digital signature of this certificate by the signatory.
|
|
flag to signify whether this certificate has a valid form
|
|
Number of bytes of the ByteBuffer signed by the CA.
|