[xmlsec] [PATCH] Load keys from memory and question about keys
aleksey at aleksey.com
Fri Aug 8 09:22:07 PDT 2003
> here is a patch that allows loading of keys from memory.
Thanks! The patch is applied and commited with a minor change to replace
"const xmlSecBuffer" with just "xmlSecBuffer" in xmlSecKeyReadBuffer ()
function parameters list. The reason is that xmlSecBuffer operations might
not be const due to internal implementation. For example, it might,
implementationn might be optimized for "append" operation and it would keep
a list of memory blocks instead one re-allocated block. Thus when you can
xmlSecBufferGetData () this causes the creation of one big memory block
from a list of blocks. This is not implemented yet but it might be at
some point :)
> Now my question:
> Is there a way to determine the xmlSecKeyDataId from the "Algorithm"
> in an encrypted XML file?
Yes, you already did almost everything :) If you have transform klass
then you can call xmlSecTransformSetKeyRequirementsMethod () function to
xmlSecKeyReqPtr structure with the key requirements for this transorm.
inside the xmlSecKeyReqPtr structure and you'll have the keyId, keyType
Thanks again for the patch!
More information about the xmlsec