[xmlsec] Add key to keysmanager
Wacław Szewczyk
szewczykw at zetokatowice.pl
Thu Aug 3 03:33:03 PDT 2006
HI! First, Aleksey thanks for last answer. It was help me some;)
Now, I create key from certificate and then want to add this key to keys
manager. It is my code part:
---------------------------
key = xmlSecMSCryptoAppKeyLoadMemory(pbSignerCert, cbSignerCert,
xmlSecKeyDataFormatCertDer, NULL, NULL, NULL);
if (key == NULL) {
...
}
keysManager = xmlSecKeysMngrCreate();
if (keysManager == NULL) {
...
}
if (xmlSecMSCryptoAppDefaultKeysMngrAdoptKey(keysManager, key) < 0) {
...}
or
if (xmlSecSimpleKeysStoreAdoptKey(keysManager->keysStore, key) < 0) {
...
}
---------------------------
Then i want to create dsigContext with xmlSecDSigCtxCreate(keysManager) and
verify signature.
Fuction xmlSecMSCryptoAppDefaultKeysMngrAdoptKey or
xmlSecSimpleKeysStoreAdoptKey always return -1. What do I wrong?
How to properly add key to created keys manager?
Thanks for help!
Iguana
More information about the xmlsec
mailing list