[xmlsec] Empty KeyValue element after a call to
xmlSecKeyInfoNodeWrite()
Nicolas Clapies
nclapies at entrouvert.com
Wed Oct 12 09:01:45 PDT 2005
Hi,
I need to get public key value from an xmlSecKey object (it was
created from a simple public key PEM file).
I have an xmlNodePtr key_info_node "KeyInfo" containing a "KeyValue"
child node.
I have a local temporary key info context I initialize like this :
ctx = xmlSecKeyInfoCtxCreate(NULL);
ctx->mode = xmlSecKeyInfoModeWrite;
public_key is my xmlSecKey object
I do a call to xmlSecKeyInfoNodeWrite(key_info_node, public_key,
ctx), but my "KeyValue" node is still empty.
If I display debug dump xml output with a call to
xmlSecKeyDebugXmlDump() it looks like this :
<KeyInfo>
<KeyMethod>RSAKeyValue</KeyMethod>
<KeyType>Public
</KeyType>
<RSAKeyValue size="2048" />
</KeyInfo>
I don't know if the empty KeyValue / RSAKeyValue element is the
problem or if I forget to set something with my public key.
Any idea about this ?
Thanks in advance for the help,
Nicolas.
More information about the xmlsec
mailing list