activemq-cpp-3.6.0
decaf::security::cert::Certificate Class Reference

Base interface for all identity certificates. More...

#include <src/main/decaf/security/cert/Certificate.h>

Inheritance diagram for decaf::security::cert::Certificate:

Public Member Functions

virtual ~Certificate ()
virtual bool equals (const Certificate &cert) const =0
 Compares the encoded form of the two certificates.
virtual void getEncoded (std::vector< unsigned char > &output) const =0
 Provides the encoded form of this certificate.
virtual std::string getType () const =0
 Returns the type of this certificate.
virtual PublicKeygetPublicKey ()=0
 Gets the public key of this certificate.
virtual const PublicKeygetPublicKey () const =0
 Gets the public key of this certificate.
virtual void verify (const PublicKey &publicKey) const =0
 Verifies that this certificate was signed with the private key that corresponds to the specified public key.
virtual void verify (const PublicKey &publicKey, const std::string &sigProvider) const =0
 Verifies that this certificate was signed with the private key that corresponds to the specified public key.
virtual std::string toString () const =0
 Returns a string representation of this certificate.

Detailed Description

Base interface for all identity certificates.

Constructor & Destructor Documentation

virtual decaf::security::cert::Certificate::~Certificate ( )
inlinevirtual

Member Function Documentation

virtual bool decaf::security::cert::Certificate::equals ( const Certificate cert) const
pure virtual

Compares the encoded form of the two certificates.

Parameters
certThe certificate to be tested for equality with this certificate.
Returns
true if the given certificate is equal to this certificate.
virtual void decaf::security::cert::Certificate::getEncoded ( std::vector< unsigned char > &  output) const
pure virtual

Provides the encoded form of this certificate.

Parameters
outputReceives the encoded form of this certificate.
Exceptions
CertificateEncodingExceptionif an encoding error occurs
virtual PublicKey* decaf::security::cert::Certificate::getPublicKey ( )
pure virtual

Gets the public key of this certificate.

Returns
the public key
virtual const PublicKey* decaf::security::cert::Certificate::getPublicKey ( ) const
pure virtual

Gets the public key of this certificate.

Returns
the public key
virtual std::string decaf::security::cert::Certificate::getType ( ) const
pure virtual

Returns the type of this certificate.

Returns
the type of this certificate
virtual std::string decaf::security::cert::Certificate::toString ( ) const
pure virtual

Returns a string representation of this certificate.

Returns
a string representation of this certificate
virtual void decaf::security::cert::Certificate::verify ( const PublicKey publicKey) const
pure virtual

Verifies that this certificate was signed with the private key that corresponds to the specified public key.

Parameters
publicKeyThe public key used to carry out the validation.
Exceptions
NoSuchAlgorithmException- on unsupported signature algorithms.
InvalidKeyException- on incorrect key.
NoSuchProviderException- if there's no default provider.
SignatureException- on signature errors.
CertificateException- on encoding errors.
virtual void decaf::security::cert::Certificate::verify ( const PublicKey publicKey,
const std::string &  sigProvider 
) const
pure virtual

Verifies that this certificate was signed with the private key that corresponds to the specified public key.

Uses the verification engine of the specified provider.

Parameters
publicKeyThe public key used to carry out the validation.
sigProviderThe name of the signature provider
Exceptions
NoSuchAlgorithmException- on unsupported signature algorithms.
InvalidKeyException- on incorrect key.
NoSuchProviderException- if there's no default provider.
SignatureException- on signature errors.
CertificateException- on encoding errors.

The documentation for this class was generated from the following file: