xmltooling  3.2.2
xmltooling::SignatureTrustEngine Class Referenceabstract

TrustEngine interface that adds validation of digital signatures. More...

#include <xmltooling/security/SignatureTrustEngine.h>

Inheritance diagram for xmltooling::SignatureTrustEngine:
xmltooling::TrustEngine xmltooling::AbstractPKIXTrustEngine xmltooling::ChainingTrustEngine

Public Member Functions

virtual bool validate (xmlsignature::Signature &sig, const CredentialResolver &credResolver, CredentialCriteria *criteria=0) const =0
 Determines whether an XML signature is correct and valid with respect to the source of credentials supplied. More...
 
virtual bool validate (const XMLCh *sigAlgorithm, const char *sig, xmlsignature::KeyInfo *keyInfo, const char *in, unsigned int in_len, const CredentialResolver &credResolver, CredentialCriteria *criteria=0) const =0
 Determines whether a raw signature is correct and valid with respect to the source of credentials supplied. More...
 
- Public Member Functions inherited from xmltooling::TrustEngine
void setKeyInfoResolver (KeyInfoResolver *keyInfoResolver)
 Supplies a KeyInfoResolver instance. More...
 

Protected Member Functions

 SignatureTrustEngine (const xercesc::DOMElement *e=0, bool deprecationSupport=true)
 Constructor. More...
 
- Protected Member Functions inherited from xmltooling::TrustEngine
 TrustEngine (const xercesc::DOMElement *e=0, bool deprecationSupport=true)
 Constructor. More...
 

Additional Inherited Members

- Protected Attributes inherited from xmltooling::TrustEngine
KeyInfoResolverm_keyInfoResolver
 Custom KeyInfoResolver instance. More...
 

Detailed Description

TrustEngine interface that adds validation of digital signatures.

Constructor & Destructor Documentation

◆ SignatureTrustEngine()

xmltooling::SignatureTrustEngine::SignatureTrustEngine ( const xercesc::DOMElement *  e = 0,
bool  deprecationSupport = true 
)
protected

Constructor.

Parameters
eDOM to supply configuration for provider
deprecationSupporttrue iff deprecated features and settings should be supported

Member Function Documentation

◆ validate() [1/2]

virtual bool xmltooling::SignatureTrustEngine::validate ( xmlsignature::Signature sig,
const CredentialResolver credResolver,
CredentialCriteria criteria = 0 
) const
pure virtual

Determines whether an XML signature is correct and valid with respect to the source of credentials supplied.

It is the responsibility of the application to ensure that the credentials supplied are in fact associated with the peer who created the signature.

If criteria with a peer name are supplied, the "name" of the Credential that verifies the signature may also be checked to ensure that it identifies the intended peer. The peer name itself or implementation-specific rules based on the content of the peer credentials may be applied. Implementations may omit this check if they deem it unnecessary.

Parameters
sigreference to a signature object to validate
credResolvera locked resolver to supply trusted peer credentials to the TrustEngine
criteriacriteria for selecting peer credentials
Returns
true iff the signature validates

Implemented in xmltooling::AbstractPKIXTrustEngine, and xmltooling::ChainingTrustEngine.

◆ validate() [2/2]

virtual bool xmltooling::SignatureTrustEngine::validate ( const XMLCh *  sigAlgorithm,
const char *  sig,
xmlsignature::KeyInfo *  keyInfo,
const char *  in,
unsigned int  in_len,
const CredentialResolver credResolver,
CredentialCriteria criteria = 0 
) const
pure virtual

Determines whether a raw signature is correct and valid with respect to the source of credentials supplied.

It is the responsibility of the application to ensure that the Credentials supplied are in fact associated with the peer who created the signature.

If criteria with a peer name are supplied, the "name" of the Credential that verifies the signature may also be checked to ensure that it identifies the intended peer. The peer name itself or implementation-specific rules based on the content of the peer credentials may be applied. Implementations may omit this check if they deem it unnecessary.

Note that the keyInfo parameter is not part of the implicitly trusted set of information supplied via the CredentialResolver, but rather advisory data that may have accompanied the signature itself.

Parameters
sigAlgorithmXML Signature identifier for the algorithm used
signull-terminated base64-encoded signature value
keyInfoKeyInfo object accompanying the signature, if any
inthe input data over which the signature was created
in_lensize of input data in bytes
credResolvera locked resolver to supply trusted peer credentials to the TrustEngine
criteriacriteria for selecting peer credentials
Returns
true iff the signature validates

Implemented in xmltooling::AbstractPKIXTrustEngine, and xmltooling::ChainingTrustEngine.


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