XML Security Library

LibXML2
LibXSLT
OpenSSL

pkikeys

Name

pkikeys -- PKI keys data implementation.

Synopsis

xmlSecKeyDataPtr    xmlSecNssPKIAdoptKey                (SECKEYPrivateKey *privkey,
                                                         SECKEYPublicKey *pubkey);
intxmlSecNssPKIKeyDataDuplicate        (xmlSecKeyDataPtr dst,
                                                         xmlSecKeyDataPtr src);
KeyTypexmlSecNssPKIKeyDataGetKeyType       (xmlSecKeyDataPtr data);
SECKEYPrivateKey *  xmlSecNssPKIKeyDataGetPrivKey       (xmlSecKeyDataPtr data);
SECKEYPublicKey *   xmlSecNssPKIKeyDataGetPubKey        (xmlSecKeyDataPtr data);

Description

PKI keys data implementation.

Details

xmlSecNssPKIAdoptKey ()

xmlSecKeyDataPtr    xmlSecNssPKIAdoptKey                (SECKEYPrivateKey *privkey,
                                                         SECKEYPublicKey *pubkey);

Build a KeyData object from the given Private Key and Public Key handles.

privkey :

the NSS Private Key handle

pubkey :

the NSS Public Key handle

Returns :

pointer to KeyData object or NULL if an error occurs.


xmlSecNssPKIKeyDataDuplicate ()

int                 xmlSecNssPKIKeyDataDuplicate        (xmlSecKeyDataPtr dst,
                                                         xmlSecKeyDataPtr src);

Duplicates the keydata from src to dst

dst :

the pointer to NSS Key data to copy to.

src :

the pointer to NSS Key data to copy from.

Returns :

-1 on error, 0 on success


xmlSecNssPKIKeyDataGetKeyType ()

KeyType             xmlSecNssPKIKeyDataGetKeyType       (xmlSecKeyDataPtr data);

Gets the Key Type from the key data.

data :

the pointer to NSS Key data.

Returns :

Key Type


xmlSecNssPKIKeyDataGetPrivKey ()

SECKEYPrivateKey *  xmlSecNssPKIKeyDataGetPrivKey       (xmlSecKeyDataPtr data);

Gets the Private Key from the key data.

data :

the pointer to NSS Key data.

Returns :

pointer to SECKEYPrivateKey or NULL if an error occurs. Caller is responsible for freeing the key when done


xmlSecNssPKIKeyDataGetPubKey ()

SECKEYPublicKey *   xmlSecNssPKIKeyDataGetPubKey        (xmlSecKeyDataPtr data);

Gets the Public Key from the key data.

data :

the pointer to NSS Key data.

Returns :

pointer to SECKEYPublicKey or NULL if an error occurs. Caller is responsible for freeing the key when done