Key generate issue - WeOnlyDo Discussion board

Key generate issue (wodSSHServer)

by wineggdrop, Tuesday, September 12, 2017, 12:45 (67 days ago)

wodSSHDComLIB::ISSHKeyPairPtr keys;
keys = pwodSSH->GetKeys();
_bstr_t name = "mykey.rsa";
_variant_t var;
var.vt = VT_I2;
var.iVal = 2048;
var.vt = VT_ERROR;

keys->raw_Generate(wodSSHDComLIB::RSAkey,var);
keys->raw_Save(wodSSHDComLIB::RSAkey,name,var);

I fail to generate 2048 bit RSA key with above code,the key generated is 1024 bit

Key generate issue

by Jasmine, Tuesday, September 12, 2017, 12:46 (67 days ago) @ wineggdrop

Hi.

First thing, without trying, would be to move var.vt = VT_ERROR after Generate method call. Can you try that?

Jasmine.