IKeys.FromXmlString returns access denied (General questions)
I am getting access denied calling IKeys.FromXmlString(str). My intent is to extract the private key.
i.e.
pKeys.CreateInstance (CLSID_Keys, NULL);
BSTR sXml = L ... RSAKeyValue ... ;
hr = pKeys.FromXmlString(sXml);
// hr is access denied
BSTR privkey = pKeys.PrivateKey(RSAkey);
Re: IKeys.FromXmlString returns access denied
Hi,
I can't tell. This is a VC project? Can you perhaps zip and send it to techsupport@weonlydo.com?
Regards,
Damba
Re: IKeys.FromXmlString returns access denied
I resolved the FromXmlString issue by copying my string into a new CComBSTR variable. It must not have liked my wchar_t*.
Now I'm not able to get the private key out:
BSTR privkey;
hr = pKeys->get_PrivateKey(RSAkey, &privkey);
privkey appears to have a length of 625, but a printf() prints nothing.
Re: IKeys.FromXmlString returns access denied
After talking with Tech Support, pKeys.get_PrivateKey() returns a BSTR, but in proprietary format.
I decided to use pKeys.Save() instead. This saves the private key in pem format. There is currently no mechanism to get the private key in pem format as a string from IKeys.
Re: IKeys.FromXmlString returns access denied
After talking with Tech Support, pKeys.get_PrivateKey() returns a BSTR, but in proprietary format.
I decided to use pKeys.Save() instead. This saves the private key in pem format. There is currently no mechanism to get the private key in pem format as a string from IKeys.
Hi !
I've just visited this forum. Happy to get acquainted with you. Thanks.