Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

Nsch - generating RSA key fails with casting exception #54

Open
dougrathbone opened this issue Mar 13, 2013 · 1 comment
Open

Nsch - generating RSA key fails with casting exception #54

dougrathbone opened this issue Mar 13, 2013 · 1 comment

Comments

@dougrathbone
Copy link

if you do:

var keyPair = NSch.KeyPair.GenKeyPair(jsch, NSch.KeyPair.RSA, 1024);

you get a casting exception:

Unable to cast object of type 'Sharpen.RSAPrivateKey' to type 'Sharpen.RSAPrivateCrtKey'.

I'm going to try and clone and fix the bug, but I'm just wanting to check i'm calling it correctly?

@ArsenShnurkov
Copy link

Now i understand you both better. He #55 (comment) is still right in his position.

I'm just wanting to check i'm calling it correctly?

I think yes. No conditions is given in docs:
http://epaul.github.io/jsch-documentation/javadoc/com/jcraft/jsch/KeyPair.html
so you should be able to just create a keypair this way.

So this should be labelled as bug, debugged and discussed.

I hasn't applied your patch yet. Just built NGit on mono-4 (on gentoo family).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants