Functions
xmlSecKeysMngrCreate ()
xmlSecKeysMngrPtr
xmlSecKeysMngrCreate (void
);
Creates new keys manager. Caller is responsible for freeing it with
xmlSecKeysMngrDestroy function.
Returns
the pointer to newly allocated keys manager or NULL if
an error occurs.
xmlSecKeysMngrFindKey ()
xmlSecKeyPtr
xmlSecKeysMngrFindKey (xmlSecKeysMngrPtr mngr
,
const xmlChar *name
,
xmlSecKeyInfoCtxPtr keyInfoCtx
);
Lookups key in the keys manager keys store. The caller is responsible
for destroying the returned key using xmlSecKeyDestroy method.
Returns
the pointer to a key or NULL if key is not found or an error occurs.
xmlSecKeysMngrAdoptKeysStore ()
int
xmlSecKeysMngrAdoptKeysStore (xmlSecKeysMngrPtr mngr
,
xmlSecKeyStorePtr store
);
Adopts keys store in the keys manager mngr
.
Returns
0 on success or a negative value if an error occurs.
xmlSecKeysMngrGetKeysStore ()
xmlSecKeyStorePtr
xmlSecKeysMngrGetKeysStore (xmlSecKeysMngrPtr mngr
);
Gets the keys store.
Returns
the keys store in the keys manager mngr
or NULL if
there is no store or an error occurs.
xmlSecKeysMngrAdoptDataStore ()
int
xmlSecKeysMngrAdoptDataStore (xmlSecKeysMngrPtr mngr
,
xmlSecKeyDataStorePtr store
);
Adopts data store in the keys manager.
Returns
0 on success or a negative value if an error occurs.
xmlSecKeysMngrGetDataStore ()
xmlSecKeyDataStorePtr
xmlSecKeysMngrGetDataStore (xmlSecKeysMngrPtr mngr
,
xmlSecKeyDataStoreId id
);
Lookups the data store of given klass id
in the keys manager.
Returns
pointer to data store or NULL if it is not found or an error
occurs.
xmlSecGetKeyCallback ()
xmlSecKeyPtr
(*xmlSecGetKeyCallback) (xmlNodePtr keyInfoNode
,
xmlSecKeyInfoCtxPtr keyInfoCtx
);
Reads the <dsig:KeyInfo/> node keyInfoNode
and extracts the key.
Returns
the pointer to key or NULL if the key is not found or
an error occurs.
xmlSecKeysMngrGetKey ()
xmlSecKeyPtr
xmlSecKeysMngrGetKey (xmlNodePtr keyInfoNode
,
xmlSecKeyInfoCtxPtr keyInfoCtx
);
Reads the <dsig:KeyInfo/> node keyInfoNode
and extracts the key.
Returns
the pointer to key or NULL if the key is not found or
an error occurs.
xmlSecKeyStoreCreate ()
xmlSecKeyStorePtr
xmlSecKeyStoreCreate (xmlSecKeyStoreId id
);
Creates new store of the specified klass klass
. Caller is responsible
for freeing the returned store by calling xmlSecKeyStoreDestroy function.
Returns
the pointer to newly allocated keys store or NULL if an error occurs.
xmlSecKeyStoreFindKey ()
xmlSecKeyPtr
xmlSecKeyStoreFindKey (xmlSecKeyStorePtr store
,
const xmlChar *name
,
xmlSecKeyInfoCtxPtr keyInfoCtx
);
Lookups key in the store. The caller is responsible for destroying
the returned key using xmlSecKeyDestroy method.
Returns
the pointer to a key or NULL if key is not found or an error occurs.
xmlSecKeyStoreGetName()
#define xmlSecKeyStoreGetName(store)
Macro. Returns key store name.
xmlSecKeyStoreIsValid()
#define xmlSecKeyStoreIsValid(store)
Macro. Returns 1 if store
is not NULL and store->id
is not NULL
or 0 otherwise.
xmlSecKeyStoreCheckId()
#define xmlSecKeyStoreCheckId(store, storeId)
Macro. Returns 1 if store
is valid and store
's id is equal to storeId
.
xmlSecKeyStoreCheckSize()
#define xmlSecKeyStoreCheckSize(store, size)
Macro. Returns 1 if store
is valid and stores
's object has at least size
bytes.
xmlSecKeyStoreIdUnknown
#define xmlSecKeyStoreIdUnknown ((xmlSecKeyDataStoreId)NULL)
The "unknown" id.
xmlSecKeyStoreInitializeMethod ()
int
(*xmlSecKeyStoreInitializeMethod) (xmlSecKeyStorePtr store
);
Keys store specific initialization method.
Returns
0 on success or a negative value if an error occurs.
xmlSecKeyStoreFinalizeMethod ()
void
(*xmlSecKeyStoreFinalizeMethod) (xmlSecKeyStorePtr store
);
Keys store specific finalization (destroy) method.
xmlSecKeyStoreFindKeyMethod ()
xmlSecKeyPtr
(*xmlSecKeyStoreFindKeyMethod) (xmlSecKeyStorePtr store
,
const xmlChar *name
,
xmlSecKeyInfoCtxPtr keyInfoCtx
);
Keys store specific find method. The caller is responsible for destroying
the returned key using xmlSecKeyDestroy method.
Returns
the pointer to a key or NULL if key is not found or an error occurs.
xmlSecKeyStoreKlassGetName()
#define xmlSecKeyStoreKlassGetName(klass)
Macro. Returns store klass name.
xmlSecSimpleKeysStoreGetKlass ()
xmlSecKeyStoreId
xmlSecSimpleKeysStoreGetKlass (void
);
The simple list based keys store klass.
Returns
simple list based keys store klass.
xmlSecSimpleKeysStoreAdoptKey ()
int
xmlSecSimpleKeysStoreAdoptKey (xmlSecKeyStorePtr store
,
xmlSecKeyPtr key
);
Adds key
to the store
.
Returns
0 on success or a negative value if an error occurs.
xmlSecSimpleKeysStoreLoad ()
int
xmlSecSimpleKeysStoreLoad (xmlSecKeyStorePtr store
,
const char *uri
,
xmlSecKeysMngrPtr keysMngr
);
Reads keys from an XML file.
Returns
0 on success or a negative value if an error occurs.
xmlSecSimpleKeysStoreSave ()
int
xmlSecSimpleKeysStoreSave (xmlSecKeyStorePtr store
,
const char *filename
,
xmlSecKeyDataType type
);
Writes keys from store
to an XML file.
Returns
0 on success or a negative value if an error occurs.
xmlSecSimpleKeysStoreGetKeys ()
xmlSecPtrListPtr
xmlSecSimpleKeysStoreGetKeys (xmlSecKeyStorePtr store
);
Gets list of keys from simple keys store.
Returns
pointer to the list of keys stored in the keys store or NULL
if an error occurs.