XML Security Library

LibXML2
LibXSLT
OpenSSL

keysmngr

Name

keysmngr -- 

Synopsis


xmlSecKeysMngrPtr xmlSecKeysMngrCreate      (void);
void        xmlSecKeysMngrDestroy           (xmlSecKeysMngrPtr mngr);
int         xmlSecKeysMngrFindKey           (xmlSecKeysMngrPtr mngr,
                                             xmlSecKeyPtr key,
                                             const xmlChar *name,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);
int         xmlSecKeysMngrAdoptKeysStore    (xmlSecKeysMngrPtr mngr,
                                             xmlSecKeyStorePtr store);
xmlSecKeyStorePtr xmlSecKeysMngrGetKeysStore
                                            (xmlSecKeysMngrPtr mngr);
int         xmlSecKeysMngrAdoptDataStore    (xmlSecKeysMngrPtr mngr,
                                             xmlSecKeyDataStorePtr store);
xmlSecKeyDataStorePtr xmlSecKeysMngrGetDataStore
                                            (xmlSecKeysMngrPtr mngr,
                                             xmlSecKeyDataStoreId id);
xmlSecKeyPtr (*xmlSecGetKeyCallback)        (xmlNodePtr keyInfoNode,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);
struct      xmlSecKeysMngr;
xmlSecKeyPtr xmlSecKeysMngrGetKey           (xmlNodePtr keyInfoNode,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);
struct      xmlSecKeyStore;
xmlSecKeyStorePtr xmlSecKeyStoreCreate      (xmlSecKeyStoreId id);
void        xmlSecKeyStoreDestroy           (xmlSecKeyStorePtr store);
int         xmlSecKeyStoreFind              (xmlSecKeyStorePtr store,
                                             xmlSecKeyPtr key,
                                             const xmlChar *name,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);
#define     xmlSecKeyStoreGetName           (store)
#define     xmlSecKeyStoreIsValid           (store)
#define     xmlSecKeyStoreCheckId           (store, storeId)
#define     xmlSecKeyStoreCheckSize         (store, size)
#define     xmlSecKeyStoreIdUnknown
int         (*xmlSecKeyStoreInitializeMethod)
                                            (xmlSecKeyStorePtr store);
void        (*xmlSecKeyStoreFinalizeMethod) (xmlSecKeyStorePtr store);
int         (*xmlSecKeyStoreFindMethod)     (xmlSecKeyStorePtr store,
                                             xmlSecKeyPtr key,
                                             const xmlChar *name,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);
struct      xmlSecKeyStoreKlass;
#define     xmlSecKeyStoreKlassGetName      (klass)
#define     xmlSecSimpleKeysStoreId
xmlSecKeyStoreId xmlSecSimpleKeysStoreGetKlass
                                            (void);
int         xmlSecSimpleKeysStoreAdoptKey   (xmlSecKeyStorePtr store,
                                             xmlSecKeyPtr key);
xmlSecKeyPtr xmlSecSimpleKeysStoreFindKey   (xmlSecKeyStorePtr store,
                                             const xmlChar *name,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);
int         xmlSecSimpleKeysStoreLoad       (xmlSecKeyStorePtr store,
                                             const char *uri,
                                             xmlSecKeysMngrPtr keysMngr);
int         xmlSecSimpleKeysStoreSave       (xmlSecKeyStorePtr store,
                                             const char *filename,
                                             xmlSecKeyDataType type);

Description

Details

xmlSecKeysMngrCreate ()

xmlSecKeysMngrPtr xmlSecKeysMngrCreate      (void);

Returns :  


xmlSecKeysMngrDestroy ()

void        xmlSecKeysMngrDestroy           (xmlSecKeysMngrPtr mngr);

mngr :  


xmlSecKeysMngrFindKey ()

int         xmlSecKeysMngrFindKey           (xmlSecKeysMngrPtr mngr,
                                             xmlSecKeyPtr key,
                                             const xmlChar *name,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);

mngr :  
key :  
name :  
keyInfoCtx :  
Returns :  


xmlSecKeysMngrAdoptKeysStore ()

int         xmlSecKeysMngrAdoptKeysStore    (xmlSecKeysMngrPtr mngr,
                                             xmlSecKeyStorePtr store);

mngr :  
store :  
Returns :  


xmlSecKeysMngrGetKeysStore ()

xmlSecKeyStorePtr xmlSecKeysMngrGetKeysStore
                                            (xmlSecKeysMngrPtr mngr);

mngr :  
Returns :  


xmlSecKeysMngrAdoptDataStore ()

int         xmlSecKeysMngrAdoptDataStore    (xmlSecKeysMngrPtr mngr,
                                             xmlSecKeyDataStorePtr store);

mngr :  
store :  
Returns :  


xmlSecKeysMngrGetDataStore ()

xmlSecKeyDataStorePtr xmlSecKeysMngrGetDataStore
                                            (xmlSecKeysMngrPtr mngr,
                                             xmlSecKeyDataStoreId id);

mngr :  
id :  
Returns :  


xmlSecGetKeyCallback ()

xmlSecKeyPtr (*xmlSecGetKeyCallback)        (xmlNodePtr keyInfoNode,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);

Reads the <dsig:KeyInfo/> node keyInfoNode and extracts the key.

keyInfoNode : the pointer to <dsig:KeyInfo/> node.
keyInfoCtx :  
Returns : the pointer to key or NULL if the key is not found or an error occurs.


struct xmlSecKeysMngr

struct xmlSecKeysMngr {	
    xmlSecKeyStorePtr		keysStore;	
    xmlSecPtrListPtr		storesList;	
    xmlSecGetKeyCallback	getKey;		
};

The keys manager structure.

xmlSecKeyStorePtr keysStore the key store (list of keys known to keys manager).
xmlSecPtrListPtr storesList the list of key data stores known to keys manager.
xmlSecGetKeyCallback getKey the callback used to read <dsig:KeyInfo/> node.


xmlSecKeysMngrGetKey ()

xmlSecKeyPtr xmlSecKeysMngrGetKey           (xmlNodePtr keyInfoNode,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);

Reads the <dsig:KeyInfo> node keyInfoNode and extracts the key.

keyInfoNode : the pointer to <dsig:KeyInfo> node.
keyInfoCtx :  
Returns : the pointer to key or NULL if the key is not found or an error occurs.


struct xmlSecKeyStore

struct xmlSecKeyStore {
    xmlSecKeyStoreId			id;

    /* for the future */
    void*				reserved0;
    void*				reserved1;
};

The keys store.

xmlSecKeyStoreId id the store id (xmlSecKeyStoreId).
void *reserved0 reserved for the future.
void *reserved1 reserved for the future.


xmlSecKeyStoreCreate ()

xmlSecKeyStorePtr xmlSecKeyStoreCreate      (xmlSecKeyStoreId id);

Creates new store of the specified type id.

id : the store id.
Returns : the pointer to newly allocated xmlSecKeyStore structure or NULL if an error occurs.


xmlSecKeyStoreDestroy ()

void        xmlSecKeyStoreDestroy           (xmlSecKeyStorePtr store);

Destroys the store and frees all allocated memory.

store : the pointer to the xmlSecKeyStore structure.


xmlSecKeyStoreFind ()

int         xmlSecKeyStoreFind              (xmlSecKeyStorePtr store,
                                             xmlSecKeyPtr key,
                                             const xmlChar *name,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);

store :  
key :  
name :  
keyInfoCtx :  
Returns :  


xmlSecKeyStoreGetName()

#define     xmlSecKeyStoreGetName(store)

Macro. Returns key store name.

store : the pointer to store.


xmlSecKeyStoreIsValid()

#define     xmlSecKeyStoreIsValid(store)

Macro. Returns 1 if store is not NULL and store->id is not NULL or 0 otherwise.

store : the pointer to store.


xmlSecKeyStoreCheckId()

#define     xmlSecKeyStoreCheckId(store, storeId)

Macro. Returns 1 if store is valid and store's id is equal to storeId.

store : the pointer to store.
storeId : the store Id.


xmlSecKeyStoreCheckSize()

#define     xmlSecKeyStoreCheckSize(store, size)

Macro. Returns 1 if store is valid and stores's object has at least size bytes.

store : the pointer to store.
size : the expected size.


xmlSecKeyStoreIdUnknown

#define xmlSecKeyStoreIdUnknown 			NULL

The "unknown" id.


xmlSecKeyStoreInitializeMethod ()

int         (*xmlSecKeyStoreInitializeMethod)
                                            (xmlSecKeyStorePtr store);

Keys store specific initialization method.

store : the store.
Returns : 0 on success or a negative value if an error occurs.


xmlSecKeyStoreFinalizeMethod ()

void        (*xmlSecKeyStoreFinalizeMethod) (xmlSecKeyStorePtr store);

Keys store specific finalization (destroy) method.

store : the store.


xmlSecKeyStoreFindMethod ()

int         (*xmlSecKeyStoreFindMethod)     (xmlSecKeyStorePtr store,
                                             xmlSecKeyPtr key,
                                             const xmlChar *name,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);

Keys store specific find method.

store : the store.
key : the destination key.
name : the desired key name.
keyInfoCtx : the pointer to key info context.
Returns : 0 on success or a negative value if an error occurs.


struct xmlSecKeyStoreKlass

struct xmlSecKeyStoreKlass {
    size_t				klassSize;
    size_t				objSize;

    /* data */
    const xmlChar*			name;    
        
    /* constructors/destructor */
    xmlSecKeyStoreInitializeMethod	initialize;
    xmlSecKeyStoreFinalizeMethod	finalize;
    xmlSecKeyStoreFindMethod		find;

    /* for the future */
    void*				reserved0;
    void*				reserved1;
};


xmlSecKeyStoreKlassGetName()

#define     xmlSecKeyStoreKlassGetName(klass)

Macro. Returns store klass name.

klass : the pointer to store klass.


xmlSecSimpleKeysStoreId

#define xmlSecSimpleKeysStoreId		xmlSecSimpleKeysStoreGetKlass()

A simple keys store klass id.


xmlSecSimpleKeysStoreGetKlass ()

xmlSecKeyStoreId xmlSecSimpleKeysStoreGetKlass
                                            (void);

Returns :  


xmlSecSimpleKeysStoreAdoptKey ()

int         xmlSecSimpleKeysStoreAdoptKey   (xmlSecKeyStorePtr store,
                                             xmlSecKeyPtr key);

store :  
key :  
Returns :  


xmlSecSimpleKeysStoreFindKey ()

xmlSecKeyPtr xmlSecSimpleKeysStoreFindKey   (xmlSecKeyStorePtr store,
                                             const xmlChar *name,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);

store :  
name :  
keyInfoCtx :  
Returns :  


xmlSecSimpleKeysStoreLoad ()

int         xmlSecSimpleKeysStoreLoad       (xmlSecKeyStorePtr store,
                                             const char *uri,
                                             xmlSecKeysMngrPtr keysMngr);

store :  
uri :  
keysMngr :  
Returns :  


xmlSecSimpleKeysStoreSave ()

int         xmlSecSimpleKeysStoreSave       (xmlSecKeyStorePtr store,
                                             const char *filename,
                                             xmlSecKeyDataType type);

store :  
filename :  
type :  
Returns :  



Aleksey Sanin