ikariiin / connectbot

Automatically exported from code.google.com/p/connectbot
Apache License 2.0
0 stars 0 forks source link

Private keys can't be imported in git HEAD #538

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

- Attempt to import a private key

What is the expected output? What do you see instead?

- I expect the key to be imported. Instead I get "Problem parsing imported 
private key".

What version of the product are you using (you can see this by using Menu
-> About in the Host List)?

- git HEAD (specifically, 3a4327febcc58fe16074ea97b7e53b1e05b3a7c7)

Please provide any additional information below.

- adb logcat gives a backtrace:

    E/ConnectBot.PubkeyListActivity(13971): Problem parsing imported private key
    E/ConnectBot.PubkeyListActivity(13971): java.lang.NullPointerException
    E/ConnectBot.PubkeyListActivity(13971):         at org.connectbot.bean.PubkeyBean.getValues(PubkeyBean.java:213)
    E/ConnectBot.PubkeyListActivity(13971):         at org.connectbot.util.PubkeyDatabase.savePubkey(PubkeyDatabase.java:311)
    E/ConnectBot.PubkeyListActivity(13971):         at org.connectbot.PubkeyListActivity.readKeyFromFile(PubkeyListActivity.java:562)
    E/ConnectBot.PubkeyListActivity(13971):         at org.connectbot.PubkeyListActivity.access$100(PubkeyListActivity.java:83)
    E/ConnectBot.PubkeyListActivity(13971):         at org.connectbot.PubkeyListActivity$13.onClick(PubkeyListActivity.java:611)

- The offending commit is 29871e6c72bcb06c881c4d98fb7e23cc21c6b930 (Move public 
key functions into Pubkey class). Looks like savePubkey calls getValues, which 
calls getEncoded on the uninitialized public key of the imported key.

Original issue reported on code.google.com by jus...@justinbogner.com on 5 Dec 2011 at 8:27

GoogleCodeExporter commented 9 years ago
I have recently fixed this in my clone VX ConnectBot, they can merge it if they 
want:
https://github.com/vx/connectbot/commit/45b061479284137c3f223312ba0f8918404e2388

More info: http://connectbot.vx.sk

Original comment by martin.m...@vx.sk on 27 Dec 2011 at 11:42

GoogleCodeExporter commented 9 years ago
I ran into this as well, but since I was loading up a custom ConnectBot based 
on the standard release + my own changes, the first indication of the bug was 
that all my already-imported keys no longer worked -- the unlock prompt never 
happened.  Trying to get to the page to manage the keys caused connectbot to 
force close.

The fix cited above (in vx) worked fine to fix things up.  Thanks!

Original comment by 4WayneD on 2 Jan 2012 at 10:26