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

GUI fails to launch when the secret key is unaccessible #3

Closed
chrislee35 opened this issue Sep 13, 2015 · 3 comments
Closed

GUI fails to launch when the secret key is unaccessible #3

chrislee35 opened this issue Sep 13, 2015 · 3 comments

Comments

@chrislee35
Copy link
Owner

In relation to issue #2, Hideio discovered a GUI launch bug when the secret keys are not found:
selectedKeyIds = new GPGKeyList();
for(GPGKeyId kid : secretKeyList.getKeyIDArray()) <-- crashes here
selectedKeyIds.addKeyId(kid);

I could hide the bug with some exceptions and default values, but I probably should present a warning dialog that no secret keys were found. The tool doesn't need secret keys to encrypt the email, but rather as a way of selecting the public keys that are most likely to be used. Furthermore, it decreases the chance that someone will encrypt to a key that they can't decrypt from.

So, a "fix" would be easy, but the proper interface will take time to think through... I think I'll patch around the issue for a patch-version, and then add the proper interface for a point-version later.

@chrislee35
Copy link
Owner Author

When I remove all keys, I get the following exception:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at org.dhs.chrislee.imapgui.KeySelectorPanel.addGPGKeyIDToModel(KeySelectorPanel.java:158)

@chrislee35
Copy link
Owner Author

I was able to do the first-level patch to this. Look for the changes in version 2.0.3.

@Hideio
Copy link

Hideio commented Sep 14, 2015

Command line works but Gui not.

C:\Users\root\Downloads>java -jar imapcrypt-2.0.3.jar
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at org.dhs.chrislee.imapgui.KeySelectorPanel.<init>(KeySelectorPanel.java:62)
        at org.dhs.chrislee.imapgui.KeySelectorPanel.<init>(KeySelectorPanel.java:38)
        at org.dhs.chrislee.imapgui.groups.RecipientPanel.<init>(RecipientPanel.java:36)
        at org.dhs.chrislee.imapgui.IMAPGui.<init>(IMAPGui.java:79)
        at org.dhs.chrislee.imapgui.IMAPGui$4.run(IMAPGui.java:328)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$500(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

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

No branches or pull requests

2 participants