[xmlsec] Re: Loaded Private Key and mscrypto
aleksey at aleksey.com
Mon Jan 16 19:42:35 PST 2006
You can specify the signature key in the xmldsig context:
Though, I have no idea how it works with Python :)
Edward Shallow wrote:
> Hi Aleksey,
> In mscrypto, is there any way to save the private signing key or
> hold the key (KeyPtr really) and reuse it for subsequent sign
> operations ? Sort of like a memory loaded and resuable signing key. I
> need something like an xmlSecCryptoAppKeyLoad which returns a KeyPtr I
> can sign with. This works fine for P12s, but I need the equivalent for
> mscrypto keys in the MS Crypto Store.
> It seems like the only way to load and use a private signing key in
> mscrypto is via a template with a KeyName reference in it. Problem is I
> can't keep the keyPtr that got used.
> The 2 functions below do not allow one to subsequently sign with the
> retrieved key. I can find them, load them, even save them to an XML keys
> file, but I can't sign with them. Private RSA exponent does not seem to
> be available.
> key = xmlsec.xmlSecKeysMngrFindKey(keysMngr, "friendly name for the
> key", keyInfoCtx)
> … and ...
> key = xmlsec.xmlSecKeysMngrGetKey(keyInfoNode, keyInfoCtx)
> Any idea ? This is for a server-resident application which must
> repeatedly sign things and I do not want the password prompt.
More information about the xmlsec