xmltooling
3.0.1
|
Class for specifying criteria by which a CredentialResolver should resolve credentials. More...
#include <xmltooling/security/CredentialCriteria.h>
Public Types | |
enum | keyinfo_extraction_t { KEYINFO_EXTRACTION_KEY = 1, KEYINFO_EXTRACTION_KEYNAMES = 2 } |
Bitmask constants controlling the kinds of criteria set automatically based on a KeyInfo object. | |
Public Member Functions | |
CredentialCriteria () | |
Default constructor. More... | |
virtual bool | matches (const Credential &credential) const |
Determines whether the supplied Credential matches this CredentialCriteria. More... | |
unsigned int | getUsage () const |
Get key usage criteria. More... | |
void | setUsage (unsigned int usage) |
Set key usage criteria. More... | |
const char * | getPeerName () const |
Get the peer name criteria. More... | |
void | setPeerName (const char *peerName) |
Set the peer name criteria. More... | |
const char * | getKeyAlgorithm () const |
Get the key algorithm criteria. More... | |
void | setKeyAlgorithm (const char *keyAlgorithm) |
Set the key algorithm criteria. More... | |
unsigned int | getKeySize () const |
Get the key size criteria. More... | |
void | setKeySize (unsigned int keySize) |
Set the key size criteria. More... | |
unsigned int | getMaxKeySize () const |
Get the maximum key size criteria. More... | |
void | setMaxKeySize (unsigned int keySize) |
Set the maximum key size criteria. More... | |
void | setXMLAlgorithm (const XMLCh *algorithm) |
Set the key algorithm and size criteria based on an XML algorithm specifier. More... | |
const std::set< std::string > & | getKeyNames () const |
Gets key name criteria. More... | |
std::set< std::string > & | getKeyNames () |
Gets key name criteria. More... | |
virtual XSECCryptoKey * | getPublicKey () const |
Returns the public key criteria. More... | |
void | setPublicKey (XSECCryptoKey *key) |
Sets the public key criteria. More... | |
const xmlsignature::KeyInfo * | getKeyInfo () const |
Gets the KeyInfo criteria. More... | |
virtual void | setKeyInfo (const xmlsignature::KeyInfo *keyInfo, int extraction=0) |
Sets the KeyInfo criteria. More... | |
DSIGKeyInfoList * | getNativeKeyInfo () const |
Gets the native KeyInfo criteria. More... | |
virtual void | setNativeKeyInfo (DSIGKeyInfoList *keyInfo, int extraction=0) |
Sets the KeyInfo criteria. More... | |
void | setSignature (const xmlsignature::Signature &sig, int extraction=0) |
Sets the KeyInfo criteria from an XML Signature. More... | |
virtual void | reset () |
Resets object to a default state. | |
Class for specifying criteria by which a CredentialResolver should resolve credentials.
xmltooling::CredentialCriteria::CredentialCriteria | ( | ) |
Default constructor.
const char* xmltooling::CredentialCriteria::getKeyAlgorithm | ( | ) | const |
Get the key algorithm criteria.
const xmlsignature::KeyInfo* xmltooling::CredentialCriteria::getKeyInfo | ( | ) | const |
Gets the KeyInfo criteria.
const std::set<std::string>& xmltooling::CredentialCriteria::getKeyNames | ( | ) | const |
Gets key name criteria.
std::set<std::string>& xmltooling::CredentialCriteria::getKeyNames | ( | ) |
Gets key name criteria.
unsigned int xmltooling::CredentialCriteria::getKeySize | ( | ) | const |
Get the key size criteria.
If a a maximum size is also set, this is treated as a minimum.
unsigned int xmltooling::CredentialCriteria::getMaxKeySize | ( | ) | const |
Get the maximum key size criteria.
DSIGKeyInfoList* xmltooling::CredentialCriteria::getNativeKeyInfo | ( | ) | const |
Gets the native KeyInfo criteria.
const char* xmltooling::CredentialCriteria::getPeerName | ( | ) | const |
Get the peer name criteria.
|
virtual |
Returns the public key criteria.
unsigned int xmltooling::CredentialCriteria::getUsage | ( | ) | const |
Get key usage criteria.
|
virtual |
Determines whether the supplied Credential matches this CredentialCriteria.
credential | the Credential to evaluate |
void xmltooling::CredentialCriteria::setKeyAlgorithm | ( | const char * | keyAlgorithm | ) |
Set the key algorithm criteria.
keyAlgorithm | the key algorithm to set |
|
virtual |
Sets the KeyInfo criteria.
keyInfo | the KeyInfo criteria |
extraction | bitmask of criteria to auto-extract from KeyInfo |
void xmltooling::CredentialCriteria::setKeySize | ( | unsigned int | keySize | ) |
Set the key size criteria.
If a a maximum size is also set, this is treated as a minimum.
keySize | key size to set |
void xmltooling::CredentialCriteria::setMaxKeySize | ( | unsigned int | keySize | ) |
Set the maximum key size criteria.
keySize | maximum key size to set |
|
virtual |
Sets the KeyInfo criteria.
keyInfo | the KeyInfo criteria |
extraction | bitmask of criteria to auto-extract from KeyInfo |
void xmltooling::CredentialCriteria::setPeerName | ( | const char * | peerName | ) |
Set the peer name criteria.
peerName | peer name to set |
void xmltooling::CredentialCriteria::setPublicKey | ( | XSECCryptoKey * | key | ) |
Sets the public key criteria.
The lifetime of the key MUST extend for the lifetime of this object.
key | a public key |
void xmltooling::CredentialCriteria::setSignature | ( | const xmlsignature::Signature & | sig, |
int | extraction = 0 |
||
) |
Sets the KeyInfo criteria from an XML Signature.
sig | the Signature containing KeyInfo criteria |
extraction | bitmask of criteria to auto-extract from KeyInfo |
void xmltooling::CredentialCriteria::setUsage | ( | unsigned int | usage | ) |
Set key usage criteria.
usage | the usage mask to set |
void xmltooling::CredentialCriteria::setXMLAlgorithm | ( | const XMLCh * | algorithm | ) |
Set the key algorithm and size criteria based on an XML algorithm specifier.
algorithm | XML algorithm specifier |