Re: WodKeys GetPrivateKey returns an empty string (General questions)
One more note - you probably use MFC which converts BSTR to CString for you. That's why you receive 0 string - because BSTR contains binary data and conversion done by MFC fails. You should convert it by yuorself using WideCharToMultiByte
Hi Kreso,
Thanks for your answer. Actually I am passing in a CComBStr.
[code]CComBSTR bsPrivateKey;
hr = m_pWodKeysCom->get_PrivateKey( ( SSHKeyTypes )type, &bsPrivateKey );[/code]
I do not convert it to a CString. I have tried setting the Private key property directly with a string before connecting and it works. Its the load and get_PrivateKey operation that is failing. We receive a file and hence the load operation makes it easier. If not, we have to read the file, store the contents in a byte array and then use it.
Any suggestion is welcome :)
Thanks
Arun
Complete thread:
- WodKeys GetPrivateKey returns an empty string - Arun, 2006-09-21, 16:43
- Re: WodKeys GetPrivateKey returns an empty string - wodDrazen, 2006-09-21, 16:51
- Re: WodKeys GetPrivateKey returns an empty string - Arun, 2006-09-21, 17:20
- Re: WodKeys GetPrivateKey returns an empty string - Arun, 2006-09-21, 20:59
- Re: WodKeys GetPrivateKey returns an empty string - wodSupport, 2006-09-21, 21:19
- Re: WodKeys GetPrivateKey returns an empty string - wodSupport, 2006-09-21, 21:27
- Re: WodKeys GetPrivateKey returns an empty string - Arun, 2006-09-21, 21:44
- Re: WodKeys GetPrivateKey returns an empty string - wodSupport, 2006-09-21, 21:47
- Re: WodKeys GetPrivateKey returns an empty string - Arun, 2006-09-22, 00:34
- Re: WodKeys GetPrivateKey returns an empty string - wodSupport, 2006-09-21, 21:47
- Re: WodKeys GetPrivateKey returns an empty string - Arun, 2006-09-21, 21:44
- Re: WodKeys GetPrivateKey returns an empty string - wodSupport, 2006-09-21, 21:27
- Re: WodKeys GetPrivateKey returns an empty string - wodSupport, 2006-09-21, 21:19
- Re: WodKeys GetPrivateKey returns an empty string - Arun, 2006-09-21, 20:59
- Re: WodKeys GetPrivateKey returns an empty string - Arun, 2006-09-21, 17:20
- Re: WodKeys GetPrivateKey returns an empty string - wodDrazen, 2006-09-21, 16:51