Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update AndroidConfig #389

Merged
merged 3 commits into from
Dec 28, 2017

Conversation

eidottermihi
Copy link
Contributor

AndroidConfig didn't register some KeyExchange- and FileKeyProviderFactories, because the method SecurityUtils.isBouncyCastleRegistered evaluates to false if SpongyCastle is used (see #308 for a description of that issue).

Also adds EdDSA Signature Factory which was introduced in db75bad, but not included in AndroidConfig.

@codecov-io
Copy link

codecov-io commented Dec 28, 2017

Codecov Report

Merging #389 into master will increase coverage by 0.15%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #389      +/-   ##
============================================
+ Coverage     55.09%   55.24%   +0.15%     
- Complexity     1144     1148       +4     
============================================
  Files           189      189              
  Lines          7482     7486       +4     
  Branches        651      651              
============================================
+ Hits           4122     4136      +14     
+ Misses         3011     3002       -9     
+ Partials        349      348       -1
Impacted Files Coverage Δ Complexity Δ
src/main/java/net/schmizz/sshj/AndroidConfig.java 0% <0%> (ø) 0 <0> (ø) ⬇️
src/main/java/net/schmizz/sshj/SSHClient.java 58.28% <0%> (-0.62%) 32% <0%> (-1%)
...zz/sshj/connection/channel/ChannelInputStream.java 76.11% <0%> (+2.98%) 16% <0%> (+1%) ⬆️
...va/net/schmizz/sshj/connection/ConnectionImpl.java 63.71% <0%> (+3.53%) 20% <0%> (+1%) ⬆️
.../main/java/net/schmizz/sshj/sftp/PacketReader.java 95.65% <0%> (+4.34%) 13% <0%> (+1%) ⬆️
...main/java/net/schmizz/sshj/sftp/SFTPException.java 40.9% <0%> (+13.63%) 5% <0%> (+1%) ⬆️
...t/schmizz/sshj/connection/ConnectionException.java 44.44% <0%> (+22.22%) 4% <0%> (+2%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ca81c2e...ee857ab. Read the comment docs.

@hierynomus hierynomus merged commit 54018a4 into hierynomus:master Dec 28, 2017
@eidottermihi eidottermihi deleted the update-android-config branch December 28, 2017 22:05
CCLiu added a commit to CCLiu/sshj that referenced this pull request Jan 11, 2018
* Check whether filename is a child of the current file (Fixes hierynomus#341)

* Fixed codacy

* Updated README release notes

* Removed oraclejdk7 as that is no longer supported on trusty, added openjdk

* Added gradle caching to travis config

* Removed use of DataTypeConverter as that is no longer in default JDK9

* Removed build of broken openJDK7 in favour of using animal-sniffer to detect java 1.6 compatibility

* Improved test stability

* Correctly determine KeyType for ECDSA public key (Fixes hierynomus#356)

* fixed build

* Fixed Java9 build?

* Disambiguated signature initialization

* Removed deprecated method

* Organised imports

* Added 'out/' to gitignore

* Added support for new-style fingerprints (hierynomus#365)

* Added support for new-style fingerprints

* Fixed codacy warnings

* Fix decoding signature bytes (Fixes hierynomus#355, hierynomus#354) (hierynomus#361)

* Fix for signature verify in DSA

* Cleaned up signature verification

* Fixed import

* Ignored erroneous pmd warnings

* Updated JavaDoc

* Extracted ASN.1/DER encoding to method (hierynomus#368)

* Update net.i2p.crypto:eddsa to 0.2.0 (hierynomus#372)

* Update net.i2p.crypto:eddsa to 0.2.0

* Update net.i2p.crypto.eddsa to 0.2.0

* Update net.i2p.crypto.eddsa to 0.2.0

* Update net.i2p.crypto.eddsa to 0.2.0

* Log security provider registration failures (hierynomus#374)

* Migrate remaining block ciphers

* Updated README for v0.23.0 release

* Using new release plugin

* Updated build plugins

* Fix escaping in WildcardHostMatcher (hierynomus#382)

* Escape '[' and ']' in WildcardHostMatcher

* Anchoring regex to match entire string (Fixes hierynomus#381)

* Updated builds to include CodeCov

* - Experimenting with travis

* - fix ip for online testing

* - account for different working dir

* - yaml-yaml

* - double before_install

* - still -d

* - try common format

* - Fixed server keys
- Use sshj branding

* - grr, ip

* - minor improvements

* - eh?

* - switch username back

* - orly?

* - desperation

* - One more time

* Upgraded gradle to cope with java9

* Separated out integration tests

* Fixed length bug in putString (Fixes hierynomus#187)

* Removed docker from travis yml as it is included in gradle build now

* Added integration test to travis

* Update AndroidConfig (hierynomus#389)

* Add EdDSA signature for AndroidConfig.

* Initialize KeyExchange- and FileKeyProviderFactories with registered "bouncyCastle" (in fact, SpongyCastle is registered).

See hierynomus#308 for discussion.

* Added integration test for append scenario (Fixes hierynomus#390)

* Fixed headers
@Abu-Abdullah
Copy link

Abu-Abdullah commented Jan 24, 2018

@hierynomus
I'm still facing the same issue even after applying this patch

01-24 21:27:34.154 8926-9006/com.test W/System.err: net.schmizz.sshj.transport.TransportException: ECDSA KeyPairGenerator not available
01-24 21:27:34.154 8926-9006/com.test W/System.err:     at net.schmizz.sshj.transport.TransportException$1.chain(TransportException.java:33)
01-24 21:27:34.154 8926-9006/com.test W/System.err:     at net.schmizz.sshj.transport.TransportException$1.chain(TransportException.java:27)
01-24 21:27:34.154 8926-9006/com.test W/System.err:     at net.schmizz.concurrent.Promise.deliverError(Promise.java:95)
01-24 21:27:34.154 8926-9006/com.test W/System.err:     at net.schmizz.concurrent.Event.deliverError(Event.java:74)
01-24 21:27:34.154 8926-9006/com.test W/System.err:     at net.schmizz.concurrent.ErrorDeliveryUtil.alertEvents(ErrorDeliveryUtil.java:34)
01-24 21:27:34.155 8926-9006/com.test W/System.err:     at net.schmizz.sshj.transport.KeyExchanger.notifyError(KeyExchanger.java:386)
01-24 21:27:34.155 8926-9006/com.test W/System.err:     at net.schmizz.sshj.transport.TransportImpl.die(TransportImpl.java:600)
01-24 21:27:34.155 8926-9006/com.test W/System.err:     at net.schmizz.sshj.transport.Reader.run(Reader.java:67)
01-24 21:27:34.155 8926-9006/com.test W/System.err: Caused by: net.schmizz.sshj.common.SSHException: ECDSA KeyPairGenerator not available
01-24 21:27:34.155 8926-9006/com.test W/System.err:     at net.schmizz.sshj.common.SSHException$1.chain(SSHException.java:36)
01-24 21:27:34.155 8926-9006/com.test W/System.err:     at net.schmizz.sshj.common.SSHException$1.chain(SSHException.java:29)
01-24 21:27:34.155 8926-9006/com.test W/System.err:     at net.schmizz.sshj.transport.TransportImpl.die(TransportImpl.java:595)
01-24 21:27:34.155 8926-9006/com.test W/System.err: 	... 1 more
01-24 21:27:34.155 8926-9006/com.test W/System.err: Caused by: net.schmizz.sshj.common.SSHRuntimeException: ECDSA KeyPairGenerator not available
01-24 21:27:34.155 8926-9006/com.test W/System.err:     at net.schmizz.sshj.transport.kex.DHBase.<init>(DHBase.java:41)
01-24 21:27:34.155 8926-9006/com.test W/System.err:     at net.schmizz.sshj.transport.kex.Curve25519DH.<init>(Curve25519DH.java:34)
01-24 21:27:34.155 8926-9006/com.test W/System.err:     at net.schmizz.sshj.transport.kex.Curve25519SHA256.<init>(Curve25519SHA256.java:39)
01-24 21:27:34.155 8926-9006/com.test W/System.err:     at net.schmizz.sshj.transport.kex.Curve25519SHA256$Factory.create(Curve25519SHA256.java:29)
01-24 21:27:34.155 8926-9006/com.test W/System.err:     at net.schmizz.sshj.transport.kex.Curve25519SHA256$Factory.create(Curve25519SHA256.java:24)
01-24 21:27:34.155 8926-9006/com.test W/System.err:     at net.schmizz.sshj.common.Factory$Named$Util.create(Factory.java:54)
01-24 21:27:34.155 8926-9006/com.test W/System.err:     at net.schmizz.sshj.transport.KeyExchanger.gotKexInit(KeyExchanger.java:227)
01-24 21:27:34.155 8926-9006/com.test W/System.err:     at net.schmizz.sshj.transport.KeyExchanger.handle(KeyExchanger.java:350)
01-24 21:27:34.155 8926-9006/com.test W/System.err:     at net.schmizz.sshj.transport.TransportImpl.handle(TransportImpl.java:503)
01-24 21:27:34.155 8926-9006/com.test W/System.err:     at net.schmizz.sshj.transport.Decoder.decode(Decoder.java:102)
01-24 21:27:34.155 8926-9006/com.test W/System.err:     at net.schmizz.sshj.transport.Decoder.received(Decoder.java:170)
01-24 21:27:34.156 8926-9006/com.test W/System.err:     at net.schmizz.sshj.transport.Reader.run(Reader.java:59)
01-24 21:27:34.160 8926-9006/com.test W/System.err: Caused by: java.security.NoSuchAlgorithmException: ECDSA KeyPairGenerator not available
01-24 21:27:34.160 8926-9006/com.test W/System.err:     at java.security.KeyPairGenerator.getInstance(KeyPairGenerator.java:225)
01-24 21:27:34.160 8926-9006/com.test W/System.err:     at net.schmizz.sshj.common.SecurityUtils.getKeyPairGenerator(SecurityUtils.java:163)
01-24 21:27:34.160 8926-9006/com.test W/System.err:     at net.schmizz.sshj.transport.kex.DHBase.<init>(DHBase.java:38)

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

Successfully merging this pull request may close these issues.

4 participants