Details
enum xmlSecKeyUsage
typedef enum {
xmlSecKeyUsageAny = 0,
xmlSecKeyUsageSign,
xmlSecKeyUsageVerify,
xmlSecKeyUsageEncrypt,
xmlSecKeyUsageDecrypt
} xmlSecKeyUsage; |
The key usage.
struct xmlSecKeyReq
struct xmlSecKeyReq {
xmlSecKeyDataId keyId;
xmlSecKeyDataType keyType;
xmlSecKeyUsage keyUsage;
size_t keyBitsSize;
}; |
xmlSecKeyReqInitialize ()
int xmlSecKeyReqInitialize (xmlSecKeyReqPtr keyReq); |
xmlSecKeyReqFinalize ()
void xmlSecKeyReqFinalize (xmlSecKeyReqPtr keyReq); |
xmlSecKeyReqCopy ()
int xmlSecKeyReqCopy (xmlSecKeyReqPtr dst,
xmlSecKeyReqPtr src); |
xmlSecKeyReqMatchKey ()
int xmlSecKeyReqMatchKey (xmlSecKeyReqPtr keyReq,
xmlSecKeyPtr key); |
xmlSecKeyReqMatchKeyValue ()
int xmlSecKeyReqMatchKeyValue (xmlSecKeyReqPtr keyReq,
xmlSecKeyDataPtr value); |
xmlSecKeyInifiteRetrivals
#define xmlSecKeyInifiteRetrivals 99999 |
Macro. Inifinite number of retrievals (really big number :) )
xmlSecKeyIsValid()
#define xmlSecKeyIsValid(key) |
Macro. Returns 1 if key is not NULL and key->id is not NULL
or 0 otherwise.
xmlSecKeyCheckId()
#define xmlSecKeyCheckId(key, keyId) |
Macro. Returns 1 if key is valid and key's id is equal to keyId.
xmlSecKeyOrigin
typedef long xmlSecKeyOrigin; |
The key origin (keys manager, remote document, cert, etc.).
xmlSecKeyOriginDefault
#define xmlSecKeyOriginDefault 0 |
Default origin (unknown).
xmlSecKeyOriginKeyManager
#define xmlSecKeyOriginKeyManager 1 |
The key was found in the keys manager.
xmlSecKeyOriginKeyName
#define xmlSecKeyOriginKeyName 2 |
The key was found in the keys manager via key name
specified in the <dsig:KeyName> node. (useless w/o
xmlSecKeyOriginKeyManager).
xmlSecKeyOriginKeyValue
#define xmlSecKeyOriginKeyValue 4 |
The key was extracted from <dsig:KeyValue> node.
xmlSecKeyOriginRetrievalDocument
#define xmlSecKeyOriginRetrievalDocument 8 |
The key was extracted thru <dsig:RetrievalMethod>
pointing in the same document.
xmlSecKeyOriginRetrievalRemote
#define xmlSecKeyOriginRetrievalRemote 16 |
The key was extracted thru <dsig:RetrievalMethod>
pointing to another document.
xmlSecKeyOriginX509
#define xmlSecKeyOriginX509 32 |
The key was extracted from X509 certificate
in the <dsig:X509Data> node.
xmlSecKeyOriginPGP
#define xmlSecKeyOriginPGP 64 |
The PGP key from <dsig:PGPData> node. Not used.
xmlSecKeyOriginEncryptedKey
#define xmlSecKeyOriginEncryptedKey 128 |
The key was extracted from <enc:EncryptedKey> node.
xmlSecKeyOriginAll
#define xmlSecKeyOriginAll |
All of the above.
struct xmlSecKey
struct xmlSecKey {
xmlSecKeyDataPtr value;
xmlChar* name;
xmlSecPtrListPtr dataList;
xmlSecKeyDataType type;
xmlSecKeyOrigin origin;
}; |
The key.
xmlSecKeyCreate ()
xmlSecKeyPtr xmlSecKeyCreate (void); |
Creates new key of the specified type id.
xmlSecKeyDestroy ()
void xmlSecKeyDestroy (xmlSecKeyPtr key); |
Destroys the key and frees all allocated memory.
xmlSecKeyEmpty ()
void xmlSecKeyEmpty (xmlSecKeyPtr key); |
xmlSecKeyDuplicate ()
xmlSecKeyPtr xmlSecKeyDuplicate (xmlSecKeyPtr key); |
Creates a duplicate of the given key.
xmlSecKeyCopy ()
int xmlSecKeyCopy (xmlSecKeyPtr keyDst,
xmlSecKeyPtr keySrc); |
xmlSecKeyGetName ()
const xmlChar* xmlSecKeyGetName (xmlSecKeyPtr key); |
xmlSecKeySetName ()
int xmlSecKeySetName (xmlSecKeyPtr key,
const xmlChar *name); |
xmlSecKeyGetType ()
xmlSecKeyDataType xmlSecKeyGetType (xmlSecKeyPtr key); |
xmlSecKeyGetValue ()
xmlSecKeyDataPtr xmlSecKeyGetValue (xmlSecKeyPtr key); |
xmlSecKeySetValue ()
int xmlSecKeySetValue (xmlSecKeyPtr key,
xmlSecKeyDataPtr value); |
xmlSecKeyGetData ()
xmlSecKeyDataPtr xmlSecKeyGetData (xmlSecKeyPtr key,
xmlSecKeyDataId dataId); |
xmlSecKeyEnsureData ()
xmlSecKeyDataPtr xmlSecKeyEnsureData (xmlSecKeyPtr key,
xmlSecKeyDataId dataId); |
xmlSecKeyAdoptData ()
int xmlSecKeyAdoptData (xmlSecKeyPtr key,
xmlSecKeyDataPtr data); |
xmlSecKeyDebugDump ()
void xmlSecKeyDebugDump (xmlSecKeyPtr key,
FILE *output); |
Prints the information about the key to the output.
xmlSecKeyDebugXmlDump ()
void xmlSecKeyDebugXmlDump (xmlSecKeyPtr key,
FILE *output); |
Prints the information about the key to the output in XML format.
xmlSecKeyGenerate ()
xmlSecKeyPtr xmlSecKeyGenerate (const xmlChar *type,
const xmlChar *name,
size_t sizeBits); |
xmlSecKeyMatch ()
int xmlSecKeyMatch (xmlSecKeyPtr key,
const xmlChar *name,
xmlSecKeyReqPtr keyReq); |
Checks whether the key matches the given criteria
(key name is equal to name, key id is equal to id,
key type is type).
xmlSecKeyPtrListId
#define xmlSecKeyPtrListId xmlSecKeyPtrListGetKlass() |
xmlSecKeyPtrListGetKlass ()
xmlSecPtrListId xmlSecKeyPtrListGetKlass (void); |