[JSch-users] Problems with KeyPairGenerator.getInstance("DH")
Status: Alpha
Brought to you by:
ymnk
From: Jeff B. <JBa...@sa...> - 2003-06-11 17:39:21
|
Howdy, I'm using a software package from Jakarta-Commons called VFS = (http://jakarta.apache.org/commons/sandbox/vfs/index.html). This = package uses JSch. Unfortunately the unit tests that exercise the JSch = dependent code are failing on JSch calls, and I can't figure out why. I'm using jdk1.3. I've tried jsch 0.1.2 (specified for vfs) and 0.1.5 = (the most current) with no different behavior. I also tried using = straight jce 1.2.2 from Sun and jce from bouncycastle = (http://www.bouncycastle.org) v119. I've tried manually connecting to two different linux servers both = running ssh2 is installed on both machines and I'm able to do a = commandline connection using sftp, so I know that works. The problem starts with a call to Session.connect(). Everything seems = peachy until line 52 in com.jcraft.jsch.jce.DH which looks like so: myKpairGen=3DKeyPairGenerator.getInstance("DH"); This is apparently a java.security.KeyPairGenerator. This barfs with = this message: "DH KeyPairGenerator not available". =20 This exception then leads to other down stream issues resulting in a = NPE: java.lang.NullPointerException at com.jcraft.jsch.jce.DH.getE(DH.java:58) at com.jcraft.jsch.jce.DHG1.init(DHG1.java:114) at com.jcraft.jsch.Session.receive_kexinit(Session.java:379) at com.jcraft.jsch.Session.connect(Session.java:246) at = org.apache.commons.vfs.provider.sftp.SftpFileSystem.getChannel(SftpFileSy= stem.java:108) at = org.apache.commons.vfs.provider.sftp.SftpFileObject.statSelf(SftpFileObje= ct.java:138) at = org.apache.commons.vfs.provider.sftp.SftpFileObject.doGetType(SftpFileObj= ect.java:106) at = org.apache.commons.vfs.provider.AbstractFileObject.attach(AbstractFileObj= ect.java:919) at = org.apache.commons.vfs.provider.AbstractFileObject.exists(AbstractFileObj= ect.java:372) at = org.apache.commons.vfs.test.ProviderTestSuite.setUp(ProviderTestSuite.jav= a:198) at junit.extensions.TestSetup$1.protect(TestSetup.java:18) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.extensions.TestSetup.run(TestSetup.java:23) at = org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTes= tRunner.java:392) at = org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunn= er.java:276) at = org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRun= ner.java:167) Has anyone come across this? I peeked at the = KeyPairGenerator.getInstance() docs, and it looks like DH isn't a valid = option. This doesn't seem to be an issue for lots of other people = though, a google search reveals lots of code on the net with the line: = KeyPairGenerator.getInstance("DH"). thanks, +jeff The information in this email and subsequent attachments may contain = confidential information that is intended solely for the attention and = use of the named addressee(s). This message or any part thereof must not = be disclosed, copied, distributed, or retained by any person without the = authorization from the addressee. =20 |