You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(119) |
Oct
(111) |
Nov
(238) |
Dec
(395) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(239) |
Feb
(59) |
Mar
(354) |
Apr
(489) |
May
(23) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(5) |
Jun
(2) |
Jul
|
Aug
|
Sep
(3) |
Oct
(14) |
Nov
(17) |
Dec
(9) |
| 2007 |
Jan
(4) |
Feb
(3) |
Mar
|
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
|
Aug
|
Sep
(1) |
Oct
(2) |
Nov
(1) |
Dec
|
| 2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
(7) |
May
(3) |
Jun
(6) |
Jul
(4) |
Aug
(3) |
Sep
(15) |
Oct
(13) |
Nov
(35) |
Dec
(40) |
| 2009 |
Jan
(19) |
Feb
(21) |
Mar
(16) |
Apr
(18) |
May
(36) |
Jun
(20) |
Jul
(32) |
Aug
(11) |
Sep
(3) |
Oct
(2) |
Nov
(2) |
Dec
(13) |
| 2010 |
Jan
(5) |
Feb
(5) |
Mar
(7) |
Apr
(1) |
May
(1) |
Jun
(3) |
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
(4) |
Nov
|
Dec
(3) |
| 2012 |
Jan
(3) |
Feb
(3) |
Mar
(1) |
Apr
(4) |
May
(8) |
Jun
(4) |
Jul
(9) |
Aug
(2) |
Sep
(8) |
Oct
(3) |
Nov
(8) |
Dec
(4) |
| 2013 |
Jan
(2) |
Feb
(1) |
Mar
(5) |
Apr
(6) |
May
(10) |
Jun
(5) |
Jul
(6) |
Aug
(7) |
Sep
(5) |
Oct
(2) |
Nov
(4) |
Dec
(4) |
| 2014 |
Jan
(13) |
Feb
(4) |
Mar
(7) |
Apr
(9) |
May
(20) |
Jun
(13) |
Jul
(10) |
Aug
(3) |
Sep
(5) |
Oct
(2) |
Nov
(2) |
Dec
(2) |
| 2015 |
Jan
(3) |
Feb
(3) |
Mar
(5) |
Apr
(4) |
May
(3) |
Jun
(2) |
Jul
(4) |
Aug
(3) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(3) |
| 2016 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
(4) |
Sep
(3) |
Oct
(3) |
Nov
(4) |
Dec
(2) |
| 2017 |
Jan
|
Feb
(2) |
Mar
|
Apr
(2) |
May
(1) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Pelle B. <pe...@us...> - 2004-04-14 00:10:38
|
Update of /cvsroot/neuclear/neuclear-signer/src/java/org/neuclear/signers/standalone In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4377/src/java/org/neuclear/signers/standalone Modified Files: StandaloneSigner.java Log Message: Added a MessageLabel for handling errors, validation and info Save works well now. It's pretty much there I think. Index: StandaloneSigner.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-signer/src/java/org/neuclear/signers/standalone/StandaloneSigner.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** StandaloneSigner.java 19 Dec 2003 00:30:55 -0000 1.4 --- StandaloneSigner.java 14 Apr 2004 00:10:30 -0000 1.5 *************** *** 1,18 **** package org.neuclear.signers.standalone; - import org.mortbay.http.HttpServer; import org.mortbay.http.HttpContext; - import org.mortbay.jetty.servlet.ServletHttpContext; - import org.mortbay.jetty.servlet.ServletHandler; import org.mortbay.jetty.Server; import org.mortbay.util.InetAddrPort; - import org.mortbay.util.MultiException; - import org.neuclear.commons.crypto.CryptoTools; - import org.neuclear.id.tools.commandline.IdentityCreator; - - import java.io.IOException; - import java.io.File; - - --- 1,8 ---- package org.neuclear.signers.standalone; import org.mortbay.http.HttpContext; import org.mortbay.jetty.Server; + import org.mortbay.jetty.servlet.ServletHandler; import org.mortbay.util.InetAddrPort; *************** *** 22,49 **** */ public class StandaloneSigner { ! public static void main(String args[]){ ! if (args.length>0) { ! IdentityCreator.main(args); ! return; ! } ! File keystore=new File(CryptoTools.DEFAULT_KEYSTORE); ! if (!keystore.exists()) { ! System.out.println("First you need to create an Identity. Use this tool with the following options.\n For more help go to http://neuclear.org/signer/bdg.html"); ! IdentityCreator.main(args); ! } else { ! try { ! Server server = new Server(); ! server.addListener(new InetAddrPort("127.0.0.1",11870)); ! HttpContext context = server.getContext("/"); ! ServletHandler handler= new ServletHandler(); ! handler.addServlet("/Signer","org.neuclear.signers.standalone.StandaloneSigningServlet"); ! context.addHandler(handler); ! server.start(); ! context.start(); ! handler.start(); ! handler.initializeServlets(); ! } catch (Exception e) { ! e.printStackTrace(); //To change body of catch statement use Options | File Templates. ! } } } --- 12,29 ---- */ public class StandaloneSigner { ! public static void main(String args[]) { ! try { ! Server server = new Server(); ! server.addListener(new InetAddrPort("127.0.0.1", 11870)); ! HttpContext context = server.getContext("/"); ! ServletHandler handler = new ServletHandler(); ! handler.addServlet("/Signer", "org.neuclear.signers.standalone.StandaloneSigningServlet"); ! context.addHandler(handler); ! server.start(); ! context.start(); ! handler.start(); ! handler.initializeServlets(); ! } catch (Exception e) { ! e.printStackTrace(); } } |
|
From: <bug...@ve...> - 2004-04-13 22:52:53
|
Message: The following issue has been closed. --------------------------------------------------------------------- View the issue: http://jira.neuclear.org//browse/COM-13 Here is an overview of the issue: --------------------------------------------------------------------- Key: COM-13 Summary: Handle Invalid Passphrase in SwingAgent Type: Bug Status: Closed Priority: Major Resolution: FIXED Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: NeuClear Commons Fix Fors: r_0_7 Versions: r_0_7 Assignee: Pelle Braendgaard Reporter: Pelle Braendgaard Created: Wed, 7 Apr 2004 10:29 AM Updated: Tue, 13 Apr 2004 3:52 PM Description: Re add the support for handling invalid passphrase in SwingAgent. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://jira.neuclear.org//secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
|
From: <bug...@ve...> - 2004-04-13 21:12:51
|
Message: The following issue has been closed. --------------------------------------------------------------------- View the issue: http://jira.neuclear.org//browse/COM-26 Here is an overview of the issue: --------------------------------------------------------------------- Key: COM-26 Summary: Change to DefaultSigner's method of saving Type: Improvement Status: Closed Priority: Major Resolution: FIXED Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: NeuClear Commons Fix Fors: r_0_7 Versions: r_0_7 Assignee: Pelle Braendgaard Reporter: Pelle Braendgaard Created: Tue, 13 Apr 2004 1:43 PM Updated: Tue, 13 Apr 2004 2:11 PM Description: The DefaultSigner should do the following: In case it is a new KeyStore on save: -ask for passphrase pair In case its an existing KeyStore save the passphrase and use it again when saving. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://jira.neuclear.org//secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
|
From: <bug...@ve...> - 2004-04-13 21:12:51
|
Message: The following issue has been closed. --------------------------------------------------------------------- View the issue: http://jira.neuclear.org//browse/COM-25 Here is an overview of the issue: --------------------------------------------------------------------- Key: COM-25 Summary: Remembered passphrase is forgotten if identity is changed Type: Bug Status: Closed Priority: Major Resolution: FIXED Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: NeuClear Commons Fix Fors: r_0_7 Versions: r_0_7 Assignee: Pelle Braendgaard Reporter: Pelle Braendgaard Created: Tue, 13 Apr 2004 1:39 PM Updated: Tue, 13 Apr 2004 2:12 PM Description: If you have set the SwingAgent to remember a passphrase and you select another identity it forgets the passphrase. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://jira.neuclear.org//secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
|
From: <bug...@ve...> - 2004-04-13 20:43:51
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://jira.neuclear.org//browse/COM-26 Here is an overview of the issue: --------------------------------------------------------------------- Key: COM-26 Summary: Change to DefaultSigner's method of saving Type: Improvement Status: Open Priority: Major Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: NeuClear Commons Fix Fors: r_0_7 Versions: r_0_7 Assignee: Pelle Braendgaard Reporter: Pelle Braendgaard Created: Tue, 13 Apr 2004 1:43 PM Updated: Tue, 13 Apr 2004 1:43 PM Description: The DefaultSigner should do the following: In case it is a new KeyStore on save: -ask for passphrase pair In case its an existing KeyStore save the passphrase and use it again when saving. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://jira.neuclear.org//secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
|
From: <bug...@ve...> - 2004-04-13 20:41:48
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://jira.neuclear.org//browse/COM-25 Here is an overview of the issue: --------------------------------------------------------------------- Key: COM-25 Summary: Remembered passphrase is forgotten if identity is changed Type: Bug Status: Open Priority: Major Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: NeuClear Commons Fix Fors: r_0_7 Versions: r_0_7 Assignee: Pelle Braendgaard Reporter: Pelle Braendgaard Created: Tue, 13 Apr 2004 1:39 PM Updated: Tue, 13 Apr 2004 1:39 PM Description: If you have set the SwingAgent to remember a passphrase and you select another identity it forgets the passphrase. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://jira.neuclear.org//secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
|
From: <bug...@ve...> - 2004-04-13 18:29:48
|
Message: The following issue has been closed. --------------------------------------------------------------------- View the issue: http://jira.neuclear.org//browse/COM-21 Here is an overview of the issue: --------------------------------------------------------------------- Key: COM-21 Summary: Add Open Key Store Dialog to InteractiveAgent Type: New Feature Status: Closed Priority: Major Resolution: FIXED Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: NeuClear Commons Fix Fors: r_0_7 Versions: r_0_7 Assignee: Pelle Braendgaard Reporter: Pelle Braendgaard Created: Tue, 13 Apr 2004 9:50 AM Updated: Tue, 13 Apr 2004 11:27 AM Description: The DefaultSigner needs to be able to ask the user which keystore to use. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://jira.neuclear.org//secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27810/src/java/org/neuclear/commons/crypto/passphraseagents Modified Files: ConsoleAgent.java GuiDialogAgent.java InteractiveAgent.java ServletPassPhraseAgent.java Log Message: added open dialog to swing agent and interactive agent Index: GuiDialogAgent.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/GuiDialogAgent.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** GuiDialogAgent.java 13 Apr 2004 17:32:06 -0000 1.10 --- GuiDialogAgent.java 13 Apr 2004 18:14:02 -0000 1.11 *************** *** 33,36 **** --- 33,39 ---- $Id$ $Log$ + Revision 1.11 2004/04/13 18:14:02 pelle + added open dialog to swing agent and interactive agent + Revision 1.10 2004/04/13 17:32:06 pelle Now has save dialog *************** *** 291,294 **** --- 294,301 ---- } + public File getOpenFileName(String title, String def) throws UserCancellationException { + return null; + } + private final TextField passphrase; private final Button ok; Index: ConsoleAgent.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/ConsoleAgent.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ConsoleAgent.java 13 Apr 2004 17:32:06 -0000 1.6 --- ConsoleAgent.java 13 Apr 2004 18:14:02 -0000 1.7 *************** *** 32,35 **** --- 32,38 ---- $Id$ $Log$ + Revision 1.7 2004/04/13 18:14:02 pelle + added open dialog to swing agent and interactive agent + Revision 1.6 2004/04/13 17:32:06 pelle Now has save dialog *************** *** 175,177 **** --- 178,184 ---- } + public File getOpenFileName(String title, String def) throws UserCancellationException { + return null; + } + } Index: InteractiveAgent.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/InteractiveAgent.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** InteractiveAgent.java 13 Apr 2004 17:32:06 -0000 1.6 --- InteractiveAgent.java 13 Apr 2004 18:14:02 -0000 1.7 *************** *** 26,29 **** --- 26,32 ---- $Id$ $Log$ + Revision 1.7 2004/04/13 18:14:02 pelle + added open dialog to swing agent and interactive agent + Revision 1.6 2004/04/13 17:32:06 pelle Now has save dialog *************** *** 80,82 **** --- 83,87 ---- File getSaveToFileName(String title, String def) throws UserCancellationException; + File getOpenFileName(String title, String def) throws UserCancellationException; + } Index: ServletPassPhraseAgent.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/ServletPassPhraseAgent.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ServletPassPhraseAgent.java 13 Apr 2004 17:32:06 -0000 1.7 --- ServletPassPhraseAgent.java 13 Apr 2004 18:14:02 -0000 1.8 *************** *** 80,82 **** --- 80,86 ---- return null; } + + public File getOpenFileName(String title, String def) throws UserCancellationException { + return null; + } } |
|
From: Pelle B. <pe...@us...> - 2004-04-13 18:28:05
|
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/swing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27810/src/java/org/neuclear/commons/crypto/passphraseagents/swing Modified Files: SwingAgent.java Log Message: added open dialog to swing agent and interactive agent Index: SwingAgent.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/swing/SwingAgent.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SwingAgent.java 13 Apr 2004 17:32:05 -0000 1.5 --- SwingAgent.java 13 Apr 2004 18:14:02 -0000 1.6 *************** *** 17,20 **** --- 17,23 ---- $Id$ $Log$ + Revision 1.6 2004/04/13 18:14:02 pelle + added open dialog to swing agent and interactive agent + Revision 1.5 2004/04/13 17:32:05 pelle Now has save dialog *************** *** 54,57 **** --- 57,63 ---- simple = new SimpleDialog(); queue = new RunnableQueue(); + fc = new JFileChooser(); + fc.setFileFilter(new JKSFilter()); + } *************** *** 59,62 **** --- 65,69 ---- private final KeyStoreDialog ksd; private final RunnableQueue queue; + private final JFileChooser fc; public static void main(final String[] args) { *************** *** 119,130 **** public File getSaveToFileName(String title, String def) throws UserCancellationException { File file = new File(def); ! JFileChooser fc = new JFileChooser(file.getParentFile()); ! fc.setFileFilter(new JKSFilter()); fc.setSelectedFile(file); fc.setDialogTitle(title); - // Show open dialog; this method does not return until the dialog is closed - fc.showSaveDialog(ksd.getDialog()); - return fc.getSelectedFile(); } --- 126,145 ---- public File getSaveToFileName(String title, String def) throws UserCancellationException { + prepFileChooser(def, title); + fc.showSaveDialog(ksd.getDialog()); + return fc.getSelectedFile(); + } + + public File getOpenFileName(String title, String def) throws UserCancellationException { + prepFileChooser(def, title); + fc.showOpenDialog(ksd.getDialog()); + return fc.getSelectedFile(); + } + + private void prepFileChooser(String def, String title) { File file = new File(def); ! fc.setCurrentDirectory(file.getParentFile()); fc.setSelectedFile(file); fc.setDialogTitle(title); } |
|
From: Pelle B. <pe...@us...> - 2004-04-13 17:46:10
|
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/swing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18861/src/java/org/neuclear/commons/crypto/passphraseagents/swing Modified Files: KeyStoreDialog.java NewAliasDialog.java RunnableQueue.java SimpleDialog.java SwingAgent.java WaitForInput.java Added Files: FileDialog.java SaveKeyStore.java Log Message: Now has save dialog Remembers passphrases Index: SwingAgent.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/swing/SwingAgent.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SwingAgent.java 12 Apr 2004 23:50:07 -0000 1.4 --- SwingAgent.java 13 Apr 2004 17:32:05 -0000 1.5 *************** *** 11,14 **** --- 11,15 ---- import javax.swing.*; + import java.io.File; import java.security.PublicKey; *************** *** 16,19 **** --- 17,24 ---- $Id$ $Log$ + Revision 1.5 2004/04/13 17:32:05 pelle + Now has save dialog + Remembers passphrases + Revision 1.4 2004/04/12 23:50:07 pelle implemented the queue and improved the DefaultSigner *************** *** 59,71 **** try { try { ! System.out.println(dia.getPassPhrase("test")); final BrowsableSigner signer = new DefaultSigner(dia); ! byte sig[] = signer.sign("testdata".getBytes(), new SetPublicKeyCallBack() { ! public void setPublicKey(PublicKey pub) { ! System.out.println("PublicKey:"); ! System.out.println(pub); ! } ! }); ! System.out.println(Base64.encode(sig)); // System.out.println("Getting passphrase... " + new String(dia.getPassPhrase((BrowsableSigner) signer))); // System.out.println("Getting passphrase... " + new String(dia.getPassPhrase("neu://pelle@test", true))); --- 64,78 ---- try { try { ! // System.out.println(dia.getPassPhrase("test")); final BrowsableSigner signer = new DefaultSigner(dia); ! while (true) { ! byte sig[] = signer.sign("testdata".getBytes(), new SetPublicKeyCallBack() { ! public void setPublicKey(PublicKey pub) { ! System.out.println("PublicKey:"); ! System.out.println(pub); ! } ! }); ! System.out.println(Base64.encode(sig)); ! } // System.out.println("Getting passphrase... " + new String(dia.getPassPhrase((BrowsableSigner) signer))); // System.out.println("Getting passphrase... " + new String(dia.getPassPhrase("neu://pelle@test", true))); *************** *** 111,114 **** --- 118,142 ---- } + public File getSaveToFileName(String title, String def) throws UserCancellationException { + File file = new File(def); + JFileChooser fc = new JFileChooser(file.getParentFile()); + fc.setFileFilter(new JKSFilter()); + fc.setSelectedFile(file); + fc.setDialogTitle(title); + // Show open dialog; this method does not return until the dialog is closed + fc.showSaveDialog(ksd.getDialog()); + return fc.getSelectedFile(); + } + + class JKSFilter extends javax.swing.filechooser.FileFilter { + public boolean accept(File file) { + String filename = file.getName(); + return filename.endsWith(".jks"); + } + + public String getDescription() { + return "*.jks"; + } + } } --- NEW FILE: SaveKeyStore.java --- package org.neuclear.commons.crypto.passphraseagents.swing; import org.neuclear.commons.crypto.passphraseagents.UserCancellationException; import org.neuclear.commons.crypto.signers.BrowsableSigner; /* $Id: SaveKeyStore.java,v 1.1 2004/04/13 17:32:05 pelle Exp $ $Log: SaveKeyStore.java,v $ Revision 1.1 2004/04/13 17:32:05 pelle Now has save dialog Remembers passphrases */ /** * User: pelleb * Date: Apr 13, 2004 * Time: 11:55:54 AM */ public class SaveKeyStore implements Runnable { public SaveKeyStore(BrowsableSigner signer) { this.signer = signer; } /** * When an object implementing interface <code>Runnable</code> is used * to create a thread, starting the thread causes the object's * <code>run</code> method to be called in that separately executing * thread. * <p/> * The general contract of the method <code>run</code> is that it may * take any action whatsoever. * * @see Thread#run() */ public void run() { try { signer.save(); } catch (UserCancellationException e) { e.printStackTrace(); } } public static void save(BrowsableSigner signer) { } private final BrowsableSigner signer; } Index: WaitForInput.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/swing/WaitForInput.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** WaitForInput.java 12 Apr 2004 15:00:29 -0000 1.1 --- WaitForInput.java 13 Apr 2004 17:32:05 -0000 1.2 *************** *** 6,9 **** --- 6,13 ---- $Id$ $Log$ + Revision 1.2 2004/04/13 17:32:05 pelle + Now has save dialog + Remembers passphrases + Revision 1.1 2004/04/12 15:00:29 pelle Now have a slightly better way of handling the waiting for input using the WaitForInput class. *************** *** 20,23 **** --- 24,29 ---- public Object getResult() throws UserCancellationException { + System.out.println(Thread.currentThread()); + synchronized (monitor) { try { Index: RunnableQueue.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/swing/RunnableQueue.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RunnableQueue.java 12 Apr 2004 23:50:07 -0000 1.1 --- RunnableQueue.java 13 Apr 2004 17:32:05 -0000 1.2 *************** *** 1,4 **** --- 1,6 ---- package org.neuclear.commons.crypto.passphraseagents.swing; + import javax.swing.*; + import java.lang.reflect.InvocationTargetException; import java.util.LinkedList; *************** *** 23,26 **** --- 25,32 ---- $Id$ $Log$ + Revision 1.2 2004/04/13 17:32:05 pelle + Now has save dialog + Remembers passphrases + Revision 1.1 2004/04/12 23:50:07 pelle implemented the queue and improved the DefaultSigner *************** *** 42,46 **** System.out.println("Starting Crypto Agent Event Queue"); while (true) { ! read().run(); } --- 48,58 ---- System.out.println("Starting Crypto Agent Event Queue"); while (true) { ! try { ! SwingUtilities.invokeAndWait(read()); ! } catch (InterruptedException e) { ! e.printStackTrace(); ! } catch (InvocationTargetException e) { ! e.printStackTrace(); ! } } *************** *** 63,70 **** public void queue(Runnable run) { if (thread == null) { ! thread = new Thread(this); thread.start(); } synchronized (monitor) { queue.add(run); monitor.notifyAll(); --- 75,83 ---- public void queue(Runnable run) { if (thread == null) { ! thread = new Thread(this, "Crypto GUI Tasks"); thread.start(); } synchronized (monitor) { + System.out.println("added " + run.getClass().toString()); queue.add(run); monitor.notifyAll(); Index: KeyStoreDialog.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/swing/KeyStoreDialog.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** KeyStoreDialog.java 12 Apr 2004 23:50:07 -0000 1.2 --- KeyStoreDialog.java 13 Apr 2004 17:32:05 -0000 1.3 *************** *** 7,14 **** --- 7,17 ---- import com.jgoodies.plaf.Options; import org.neuclear.commons.crypto.signers.BrowsableSigner; + import org.neuclear.commons.crypto.signers.DefaultSigner; import org.neuclear.commons.crypto.signers.InvalidPassphraseException; import org.neuclear.commons.crypto.signers.SetPublicKeyCallBack; import javax.swing.*; + import javax.swing.event.ChangeEvent; + import javax.swing.event.ChangeListener; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; *************** *** 24,31 **** --- 27,40 ---- import java.util.Map; import java.util.Vector; + import java.util.prefs.BackingStoreException; + import java.util.prefs.Preferences; /* $Id$ $Log$ + Revision 1.3 2004/04/13 17:32:05 pelle + Now has save dialog + Remembers passphrases + Revision 1.2 2004/04/12 23:50:07 pelle implemented the queue and improved the DefaultSigner *************** *** 58,66 **** // Likely PlasticXP is not in the class path; ignore. } cache = new HashMap(); sign = new JButton("Sign"); sign.setEnabled(false); cancel = new JButton("Cancel"); ! newId = new JButton("New ..."); list = new JList(); list.setBorder(BorderFactory.createLoweredBevelBorder()); --- 67,78 ---- // Likely PlasticXP is not in the class path; ignore. } + prefs = Preferences.userNodeForPackage(DefaultSigner.class); cache = new HashMap(); sign = new JButton("Sign"); sign.setEnabled(false); cancel = new JButton("Cancel"); ! newId = new JButton("New ID ..."); ! save = new JButton("Save ..."); ! remember = new JCheckBox("remember passphrase in current session", prefs.getBoolean(REMEMBER_PASSPHRASE, false)); list = new JList(); list.setBorder(BorderFactory.createLoweredBevelBorder()); *************** *** 116,119 **** --- 128,132 ---- }; passphrase.addKeyListener(validate); + list.addListSelectionListener(new ListSelectionListener() { /** *************** *** 123,127 **** --- 136,146 ---- */ public void valueChanged(ListSelectionEvent e) { + lastSelected = (String) list.getSelectedValue(); + if (remember.isSelected() && cache.containsKey(lastSelected)) + passphrase.setText((String) cache.get(lastSelected)); + else + passphrase.setText(""); sign.setEnabled(validate()); + } *************** *** 130,138 **** --- 149,178 ---- newId.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent actionEvent) { + SwingUtilities.invokeLater(nad); } }); + save.addActionListener(new ActionListener() { + /** + * Invoked when an action occurs. + */ + public void actionPerformed(ActionEvent e) { + new Thread(new SaveKeyStore(signer)).start(); + } + + }); + remember.addChangeListener(new ChangeListener() { + /** + * Invoked when the target of the listener has changed its state. + * + * @param e a ChangeEvent object + */ + public void stateChanged(ChangeEvent e) { + cache.clear(); + + } + }); // dialog.show(); *************** *** 150,154 **** private Component buildPanel() { FormLayout layout = new FormLayout("right:pref, 3dlu, pref:grow ", ! "pref,3dlu,pref, 3dlu, fill:pref:grow, 3dlu, pref, 7dlu, pref"); PanelBuilder builder = new PanelBuilder(layout); CellConstraints cc = new CellConstraints(); --- 190,194 ---- private Component buildPanel() { FormLayout layout = new FormLayout("right:pref, 3dlu, pref:grow ", ! "pref,3dlu,pref, 3dlu, fill:pref:grow, 3dlu, pref, 3dlu, pref, 7dlu, pref"); PanelBuilder builder = new PanelBuilder(layout); CellConstraints cc = new CellConstraints(); *************** *** 161,172 **** builder.addLabel("Passphrase:", cc.xy(1, 7)); builder.add(passphrase, cc.xy(3, 7)); ButtonBarBuilder bb = new ButtonBarBuilder(); bb.addGridded(newId); bb.addGlue(); bb.addUnrelatedGap(); bb.addGridded(sign); bb.addGridded(cancel); ! builder.add(bb.getPanel(), cc.xyw(1, 9, 3)); return builder.getPanel(); --- 201,214 ---- builder.addLabel("Passphrase:", cc.xy(1, 7)); builder.add(passphrase, cc.xy(3, 7)); + builder.add(remember, cc.xy(3, 9)); ButtonBarBuilder bb = new ButtonBarBuilder(); bb.addGridded(newId); + bb.addGridded(save); bb.addGlue(); bb.addUnrelatedGap(); bb.addGridded(sign); bb.addGridded(cancel); ! builder.add(bb.getPanel(), cc.xyw(1, 11, 3)); return builder.getPanel(); *************** *** 197,201 **** private boolean validate() { ! return (list.getSelectedIndex() > 0 && passphrase.getPassword().length > 0); } --- 239,243 ---- private boolean validate() { ! return (list.getSelectedIndex() >= 0 && passphrase.getPassword().length > 0); } *************** *** 205,211 **** --- 247,256 ---- private BrowsableSigner signer; + private String lastSelected; private final JButton sign; private final JButton cancel; private final JButton newId; + private final JButton save; + private final JCheckBox remember; private final JList list; private final JPasswordField passphrase; *************** *** 214,219 **** --- 259,266 ---- private final Map cache; private final JLabel icon; + private final Preferences prefs; private DialogRunner runner; + class DialogRunner extends WaitForInput { public DialogRunner(BrowsableSigner bs, byte data[], SetPublicKeyCallBack cb) { *************** *** 227,231 **** signer = bs; fillAliasList(); ! passphrase.setText(""); dialog.pack(); dialog.show(); --- 274,285 ---- signer = bs; fillAliasList(); ! list.setSelectedValue(prefs.get(DEFAULT_ALIAS, ""), true); ! if (list.getSelectedIndex() == -1) ! list.setSelectedIndex(0); ! if (remember.isSelected() && cache.containsKey(list.getSelectedValue().toString())) ! passphrase.setText((String) cache.get(list.getSelectedValue())); ! else ! passphrase.setText(""); ! dialog.pack(); dialog.show(); *************** *** 234,237 **** --- 288,301 ---- public void execute() { + if (remember.isSelected()) + cache.put(list.getSelectedValue().toString(), new String(passphrase.getPassword())); + prefs.putBoolean(REMEMBER_PASSPHRASE, remember.isSelected()); + prefs.put(DEFAULT_ALIAS, list.getSelectedValue().toString()); + try { + prefs.flush(); + } catch (BackingStoreException e) { + e.printStackTrace(); + } + dialog.hide(); char phrase[] = passphrase.getPassword(); *************** *** 246,254 **** --- 310,322 ---- } + private final byte data[]; private final SetPublicKeyCallBack cb; private final BrowsableSigner bs; + } + private static final String DEFAULT_ALIAS = "DEFAULT_ALIAS"; + private static final String REMEMBER_PASSPHRASE = "REMEMBER_PASSPHRASE"; } --- NEW FILE: FileDialog.java --- package org.neuclear.commons.crypto.passphraseagents.swing; import com.jgoodies.forms.builder.ButtonBarBuilder; import com.jgoodies.forms.builder.PanelBuilder; import com.jgoodies.forms.layout.CellConstraints; import com.jgoodies.forms.layout.FormLayout; import com.jgoodies.plaf.Options; import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.net.URL; /* $Id: FileDialog.java,v 1.1 2004/04/13 17:32:05 pelle Exp $ $Log: FileDialog.java,v $ Revision 1.1 2004/04/13 17:32:05 pelle Now has save dialog Remembers passphrases Revision 1.2 2004/04/12 15:00:29 pelle Now have a slightly better way of handling the waiting for input using the WaitForInput class. This will later be put into a command queue for execution. Revision 1.1 2004/04/09 22:56:44 pelle SwingAgent now manages key creation as well through the NewAliasDialog. Many small uservalidation features have also been added. Revision 1.1 2004/04/07 17:22:08 pelle Added support for the new improved interactive signing model. A new Agent is also available with SwingAgent. The XMLSig classes have also been updated to support this. */ /** * User: pelleb * Date: Apr 7, 2004 * Time: 9:55:37 AM */ public class FileDialog { public FileDialog() { try { UIManager.setLookAndFeel("com.jgoodies.plaf.plastic.PlasticXPLookAndFeel"); UIManager.put(Options.USE_SYSTEM_FONTS_APP_KEY, Boolean.TRUE); } catch (Exception e) { // Likely PlasticXP is not in the class path; ignore. } ok = new JButton("Open"); ok.setEnabled(false); cancel = new JButton("Cancel"); alias = new JLabel(); passphrase = new JPasswordField(); final URL imageurl = this.getClass().getClassLoader().getResource("org/neuclear/commons/crypto/passphraseagents/neuclear.png"); if (imageurl != null) icon = new JLabel(new ImageIcon(imageurl)); else icon = new JLabel("NeuClear"); dialog = new JDialog(); dialog.setTitle("NeuClear Signing Agent"); dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); dialog.getContentPane().add(buildPanel()); dialog.pack(); cancel.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent actionEvent) { synchronized (passphrase) { passphrase.setText(""); runner.cancel(); } } }); final ActionListener action = new ActionListener() { public void actionPerformed(final ActionEvent actionEvent) { synchronized (passphrase) { if (validate()) { runner.execute(); } } } }; ok.addActionListener(action); passphrase.addActionListener(action); final KeyListener validate = new KeyListener() { public void keyPressed(KeyEvent e) { } public void keyReleased(KeyEvent e) { ok.setEnabled(validate()); } public void keyTyped(KeyEvent e) { } }; passphrase.addKeyListener(validate); } private Component buildPanel() { FormLayout layout = new FormLayout("right:pref, 3dlu, pref:grow ", "pref,3dlu,pref, 3dlu, fill:pref:grow, 3dlu, pref, 7dlu, pref"); PanelBuilder builder = new PanelBuilder(layout); CellConstraints cc = new CellConstraints(); builder.setDefaultDialogBorder(); builder.add(icon, cc.xyw(1, 1, 1, CellConstraints.LEFT, CellConstraints.TOP)); builder.addSeparator("Enter passphrase", cc.xyw(1, 3, 3)); builder.addLabel("open:", cc.xy(1, 5)); builder.add(alias, cc.xy(3, 5)); builder.addLabel("Passphrase:", cc.xy(1, 7)); builder.add(passphrase, cc.xy(3, 7)); ButtonBarBuilder bb = new ButtonBarBuilder(); bb.addGlue(); bb.addUnrelatedGap(); bb.addGridded(ok); bb.addGridded(cancel); builder.add(bb.getPanel(), cc.xyw(1, 9, 3)); return builder.getPanel(); } private boolean validate() { return (passphrase.getPassword().length > 0); } WaitForInput createGetPassphraseTask(final String name, final boolean incorrect) { return new DialogRunner(name, incorrect); } private final JButton ok; private final JButton cancel; private final JLabel alias; private final JPasswordField passphrase; private final JDialog dialog; private final JLabel icon; private DialogRunner runner; class DialogRunner extends WaitForInput { public DialogRunner(final String alias, final boolean incorrect) { this.req = alias; this.incorrect = incorrect; } public void run() { runner = this; alias.setText(req); dialog.pack(); dialog.show(); } public void execute() { dialog.hide(); final char[] phrase = passphrase.getPassword(); // if (remember.getState()) // cache.put(name, phrase); passphrase.setText(""); setResult(phrase); } private final String req; private final boolean incorrect; } } Index: SimpleDialog.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/swing/SimpleDialog.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SimpleDialog.java 12 Apr 2004 15:00:29 -0000 1.2 --- SimpleDialog.java 13 Apr 2004 17:32:05 -0000 1.3 *************** *** 18,21 **** --- 18,25 ---- $Id$ $Log$ + Revision 1.3 2004/04/13 17:32:05 pelle + Now has save dialog + Remembers passphrases + Revision 1.2 2004/04/12 15:00:29 pelle Now have a slightly better way of handling the waiting for input using the WaitForInput class. *************** *** 155,158 **** --- 159,164 ---- dialog.pack(); dialog.show(); + System.out.println(Thread.currentThread()); + } Index: NewAliasDialog.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/swing/NewAliasDialog.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NewAliasDialog.java 12 Apr 2004 15:00:29 -0000 1.3 --- NewAliasDialog.java 13 Apr 2004 17:32:05 -0000 1.4 *************** *** 9,13 **** import javax.swing.*; - import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; --- 9,12 ---- *************** *** 18,21 **** --- 17,24 ---- $Id$ $Log$ + Revision 1.4 2004/04/13 17:32:05 pelle + Now has save dialog + Remembers passphrases + Revision 1.3 2004/04/12 15:00:29 pelle Now have a slightly better way of handling the waiting for input using the WaitForInput class. *************** *** 49,64 **** ok.setEnabled(false); cancel = new JButton("Cancel"); alias = new JTextField(); passphrase1 = new JPasswordField(); passphrase2 = new JPasswordField(); ! dialog = new JDialog(agent.getDialog(), true); dialog.setTitle("NeuClear Signing Agent"); ! dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); ! dialog.getContentPane().add(buildPanel()); ! dialog.pack(); ! cancel.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent actionEvent) { synchronized (alias) { --- 52,72 ---- ok.setEnabled(false); cancel = new JButton("Cancel"); + cancel2 = new JButton("Cancel"); alias = new JTextField(); passphrase1 = new JPasswordField(); passphrase2 = new JPasswordField(); ! progress = new JProgressBar(0, 100); ! progress.setIndeterminate(true); ! progress.setVisible(true); dialog = new JDialog(agent.getDialog(), true); dialog.setTitle("NeuClear Signing Agent"); ! dialog.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); ! dialog.hide(); ! regular = buildPanel(); ! process = buildProcessPanel(); ! //setMainPanel(); ! final ActionListener cl = new ActionListener() { public void actionPerformed(final ActionEvent actionEvent) { synchronized (alias) { *************** *** 70,74 **** } ! }); final KeyListener validate = new KeyListener() { --- 78,84 ---- } ! }; ! cancel.addActionListener(cl); ! cancel2.addActionListener(cl); final KeyListener validate = new KeyListener() { *************** *** 106,109 **** --- 116,133 ---- } + private void setMainPanel() { + dialog.getContentPane().removeAll(); + dialog.getContentPane().add(regular); + dialog.pack(); + dialog.show(); + } + + private void setProcessPanel() { + dialog.getContentPane().removeAll(); + dialog.getContentPane().add(process); + dialog.pack(); + dialog.show(); + } + private boolean validate() { if (alias.getText().length() == 0) *************** *** 120,124 **** } ! private Component buildPanel() { FormLayout layout = new FormLayout("right:pref, 3dlu, 100dlu:grow ", "pref,3dlu,pref, 3dlu, pref, 3dlu, pref, 7dlu, pref"); --- 144,148 ---- } ! private JPanel buildPanel() { FormLayout layout = new FormLayout("right:pref, 3dlu, 100dlu:grow ", "pref,3dlu,pref, 3dlu, pref, 3dlu, pref, 7dlu, pref"); *************** *** 135,139 **** builder.addLabel("(Repeat) Passphrase:", cc.xy(1, 7)); builder.add(passphrase2, cc.xy(3, 7)); ! ButtonBarBuilder bb = new ButtonBarBuilder(); bb.addGlue(); --- 159,163 ---- builder.addLabel("(Repeat) Passphrase:", cc.xy(1, 7)); builder.add(passphrase2, cc.xy(3, 7)); ! // builder.add(progress,cc.xyw(1,9,3)); ButtonBarBuilder bb = new ButtonBarBuilder(); bb.addGlue(); *************** *** 147,150 **** --- 171,195 ---- } + private JPanel buildProcessPanel() { + FormLayout layout = new FormLayout("right:pref, 3dlu, 100dlu:grow ", + "pref,3dlu,pref, 7dlu, pref"); + PanelBuilder builder = new PanelBuilder(layout); + CellConstraints cc = new CellConstraints(); + + builder.setDefaultDialogBorder(); + + builder.addSeparator("Creating Keys", cc.xyw(1, 1, 3)); + builder.add(progress, cc.xyw(1, 3, 3)); + ButtonBarBuilder bb = new ButtonBarBuilder(); + bb.addGlue(); + bb.addUnrelatedGap(); + // bb.addGridded(ok); + bb.addGridded(cancel2); + builder.add(bb.getPanel(), cc.xyw(1, 5, 3)); + + return builder.getPanel(); + + } + /** *************** *** 165,205 **** alias.setEnabled(true); passphrase2.setEnabled(true); ! dialog.pack(); ! dialog.show(); ! } private void createAlias() { ! dialog.setEnabled(false); ! passphrase1.setEnabled(false); ! alias.setEnabled(false); ! passphrase2.setEnabled(false); ! ok.setEnabled(false); ! cancel.setEnabled(true); ! new Thread(new Runnable() { ! ! /** ! * When an object implementing interface <code>Runnable</code> is used ! * to create a thread, starting the thread causes the object's ! * <code>run</code> method to be called in that separately executing ! * thread. ! * <p/> ! * The general contract of the method <code>run</code> is that it may ! * take any action whatsoever. ! * ! * @see Thread#run() ! */ ! public void run() { ! try { ! System.out.println("Generating Key"); ! agent.getSigner().createKeyPair(alias.getText(), passphrase1.getPassword()); ! agent.updateList(alias.getText()); ! dialog.hide(); ! } catch (CryptoException e) { ! e.printStackTrace(); ! } } ! }).start(); } --- 210,246 ---- alias.setEnabled(true); passphrase2.setEnabled(true); ! setMainPanel(); } private void createAlias() { ! setProcessPanel(); ! new Thread(new GenerateKeyTask(), "Generate Key").start(); ! } + private class GenerateKeyTask implements Runnable { + /** + * When an object implementing interface <code>Runnable</code> is used + * to create a thread, starting the thread causes the object's + * <code>run</code> method to be called in that separately executing + * thread. + * <p/> + * The general contract of the method <code>run</code> is that it may + * take any action whatsoever. + * + * @see Thread#run() + */ + public void run() { + try { + System.out.println("Generating Key"); + agent.getSigner().createKeyPair(alias.getText(), passphrase1.getPassword()); + progress.setVisible(false); + agent.updateList(alias.getText()); + dialog.hide(); + } catch (CryptoException e) { + e.printStackTrace(); } ! ! } ! } *************** *** 208,214 **** --- 249,259 ---- private JButton ok; private JButton cancel; + private JButton cancel2; private JTextField alias; private JPasswordField passphrase1; private JPasswordField passphrase2; + private JProgressBar progress; + private JPanel regular; + private JPanel process; } |
|
From: Pelle B. <pe...@us...> - 2004-04-13 17:46:09
|
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/signers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18861/src/java/org/neuclear/commons/crypto/signers Modified Files: DefaultSigner.java JCESigner.java ServletSignerFactory.java Log Message: Now has save dialog Remembers passphrases Index: JCESigner.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/signers/JCESigner.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** JCESigner.java 12 Apr 2004 23:50:08 -0000 1.22 --- JCESigner.java 13 Apr 2004 17:32:07 -0000 1.23 *************** *** 2,5 **** --- 2,9 ---- * $Id$ * $Log$ + * Revision 1.23 2004/04/13 17:32:07 pelle + * Now has save dialog + * Remembers passphrases + * * Revision 1.22 2004/04/12 23:50:08 pelle * implemented the queue and improved the DefaultSigner *************** *** 453,457 **** final KeyPair kp = kpg.generateKeyPair(); ks.setKeyEntry(alias, kp.getPrivate(), passphrase, new Certificate[]{CryptoTools.createCertificate(alias, kp)}); ! if (!Utility.isEmpty(filename)) save(); } catch (KeyStoreException e) { throw new LowLevelException(e); --- 457,461 ---- final KeyPair kp = kpg.generateKeyPair(); ks.setKeyEntry(alias, kp.getPrivate(), passphrase, new Certificate[]{CryptoTools.createCertificate(alias, kp)}); ! // if (!Utility.isEmpty(filename)) save(); } catch (KeyStoreException e) { throw new LowLevelException(e); *************** *** 477,480 **** --- 481,485 ---- File ksfile = new File(filename); ksfile.getParentFile().mkdirs(); + System.out.println(Thread.currentThread()); ks.store(new FileOutputStream(ksfile), agent.getPassPhrase(filename)); } catch (Exception e) { Index: ServletSignerFactory.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/signers/ServletSignerFactory.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ServletSignerFactory.java 12 Apr 2004 15:37:01 -0000 1.8 --- ServletSignerFactory.java 13 Apr 2004 17:32:07 -0000 1.9 *************** *** 52,56 **** final PassPhraseAgent agent = createWrapperAgent(keeppassphrase, coreagent, serviceid); // If keystore is "test" setup the TestCaseSigner otherwise use the JCESigner ! final Signer signer = createSigner(keystore, agent); map.put(hash, signer); return signer; --- 52,56 ---- final PassPhraseAgent agent = createWrapperAgent(keeppassphrase, coreagent, serviceid); // If keystore is "test" setup the TestCaseSigner otherwise use the JCESigner ! final Signer signer = createSigner(keystore, (InteractiveAgent) agent); map.put(hash, signer); return signer; *************** *** 63,67 **** } ! private static final BrowsableSigner createSigner(final String keystore, final PassPhraseAgent agent) throws GeneralSecurityException, NeuClearException, FileNotFoundException { if (!Utility.isEmpty(keystore)) { if (keystore.toLowerCase().equals("test")) --- 63,67 ---- } ! private static final BrowsableSigner createSigner(final String keystore, final InteractiveAgent agent) throws GeneralSecurityException, NeuClearException, FileNotFoundException { if (!Utility.isEmpty(keystore)) { if (keystore.toLowerCase().equals("test")) Index: DefaultSigner.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/signers/DefaultSigner.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DefaultSigner.java 12 Apr 2004 23:50:07 -0000 1.7 --- DefaultSigner.java 13 Apr 2004 17:32:07 -0000 1.8 *************** *** 3,12 **** import org.neuclear.commons.crypto.CryptoException; import org.neuclear.commons.crypto.CryptoTools; ! import org.neuclear.commons.crypto.passphraseagents.PassPhraseAgent; import org.neuclear.commons.crypto.passphraseagents.UserCancellationException; import java.security.KeyStoreException; import java.security.PublicKey; import java.util.Iterator; import java.util.prefs.Preferences; --- 3,15 ---- import org.neuclear.commons.crypto.CryptoException; import org.neuclear.commons.crypto.CryptoTools; ! import org.neuclear.commons.crypto.passphraseagents.InteractiveAgent; import org.neuclear.commons.crypto.passphraseagents.UserCancellationException; + import java.io.File; + import java.io.IOException; import java.security.KeyStoreException; import java.security.PublicKey; import java.util.Iterator; + import java.util.prefs.BackingStoreException; import java.util.prefs.Preferences; *************** *** 31,34 **** --- 34,41 ---- $Id$ $Log$ + Revision 1.8 2004/04/13 17:32:07 pelle + Now has save dialog + Remembers passphrases + Revision 1.7 2004/04/12 23:50:07 pelle implemented the queue and improved the DefaultSigner *************** *** 78,84 **** */ public final class DefaultSigner implements BrowsableSigner { ! public DefaultSigner(final PassPhraseAgent agent) throws UserCancellationException, InvalidPassphraseException { ! Preferences prefs = Preferences.userNodeForPackage(DefaultSigner.class); ! final String filename = prefs.get("KEYSTORE", CryptoTools.DEFAULT_KEYSTORE); signer = new JCESigner(filename, "jks", "SUN", agent); --- 85,100 ---- */ public final class DefaultSigner implements BrowsableSigner { ! public DefaultSigner(final InteractiveAgent agent) throws UserCancellationException, InvalidPassphraseException { ! prefs = Preferences.userNodeForPackage(DefaultSigner.class); ! this.agent = agent; ! filename = prefs.get(KEYSTORE, CryptoTools.DEFAULT_KEYSTORE); ! File file = new File(filename); ! if (file.exists() && file.length() == 0) ! file.delete(); // Delete empty file ! try { ! prefs.flush(); ! } catch (BackingStoreException e) { ! e.printStackTrace(); ! } signer = new JCESigner(filename, "jks", "SUN", agent); *************** *** 110,114 **** public byte[] sign(byte data[], SetPublicKeyCallBack callback) throws UserCancellationException { ! return signer.sign(data, callback); } --- 126,130 ---- public byte[] sign(byte data[], SetPublicKeyCallBack callback) throws UserCancellationException { ! return ((InteractiveAgent) agent).sign(this, data, callback); } *************** *** 122,126 **** public void save() { ! signer.save(); } --- 138,155 ---- public void save() { ! try { ! filename = agent.getSaveToFileName("Save Keys... ", filename).getCanonicalPath(); ! prefs.put(KEYSTORE, filename); ! try { ! prefs.flush(); ! } catch (BackingStoreException e) { ! e.printStackTrace(); ! } ! signer.save(filename); ! } catch (IOException e) { ! e.printStackTrace(); ! } catch (UserCancellationException e) { ! e.printStackTrace(); ! } } *************** *** 129,133 **** --- 158,166 ---- } + private String filename; private final JCESigner signer; + private final InteractiveAgent agent; + private Preferences prefs; + private static final String KEYSTORE = "KEYSTORE"; } |
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18861/src/java/org/neuclear/commons/crypto/passphraseagents Modified Files: ConsoleAgent.java GuiDialogAgent.java InteractiveAgent.java ServletPassPhraseAgent.java Log Message: Now has save dialog Remembers passphrases Index: GuiDialogAgent.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/GuiDialogAgent.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** GuiDialogAgent.java 7 Apr 2004 17:22:10 -0000 1.9 --- GuiDialogAgent.java 13 Apr 2004 17:32:06 -0000 1.10 *************** *** 9,12 **** --- 9,13 ---- import java.awt.event.ItemEvent; import java.awt.event.ItemListener; + import java.io.File; import java.util.HashMap; import java.util.Map; *************** *** 32,35 **** --- 33,40 ---- $Id$ $Log$ + Revision 1.10 2004/04/13 17:32:06 pelle + Now has save dialog + Remembers passphrases + Revision 1.9 2004/04/07 17:22:10 pelle Added support for the new improved interactive signing model. A new Agent is also available with SwingAgent. *************** *** 282,285 **** --- 287,294 ---- } + public File getSaveToFileName(String title, String def) throws UserCancellationException { + return null; + } + private final TextField passphrase; private final Button ok; Index: ConsoleAgent.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/ConsoleAgent.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ConsoleAgent.java 7 Apr 2004 17:22:09 -0000 1.5 --- ConsoleAgent.java 13 Apr 2004 17:32:06 -0000 1.6 *************** *** 6,9 **** --- 6,10 ---- import java.io.BufferedReader; + import java.io.File; import java.io.IOException; import java.io.InputStreamReader; *************** *** 31,34 **** --- 32,39 ---- $Id$ $Log$ + Revision 1.6 2004/04/13 17:32:06 pelle + Now has save dialog + Remembers passphrases + Revision 1.5 2004/04/07 17:22:09 pelle Added support for the new improved interactive signing model. A new Agent is also available with SwingAgent. *************** *** 166,168 **** --- 171,177 ---- } + public File getSaveToFileName(String title, String def) throws UserCancellationException { + return null; + } + } Index: InteractiveAgent.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/InteractiveAgent.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** InteractiveAgent.java 7 Apr 2004 17:22:10 -0000 1.5 --- InteractiveAgent.java 13 Apr 2004 17:32:06 -0000 1.6 *************** *** 4,7 **** --- 4,9 ---- import org.neuclear.commons.crypto.signers.SetPublicKeyCallBack; + import java.io.File; + /* NeuClear Distributed Transaction Clearing Platform *************** *** 24,27 **** --- 26,33 ---- $Id$ $Log$ + Revision 1.6 2004/04/13 17:32:06 pelle + Now has save dialog + Remembers passphrases + Revision 1.5 2004/04/07 17:22:10 pelle Added support for the new improved interactive signing model. A new Agent is also available with SwingAgent. *************** *** 72,75 **** --- 78,82 ---- byte[] sign(final BrowsableSigner signer, byte data[], SetPublicKeyCallBack callback) throws UserCancellationException; + File getSaveToFileName(String title, String def) throws UserCancellationException; } Index: ServletPassPhraseAgent.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/ServletPassPhraseAgent.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ServletPassPhraseAgent.java 7 Apr 2004 17:22:10 -0000 1.6 --- ServletPassPhraseAgent.java 13 Apr 2004 17:32:06 -0000 1.7 *************** *** 5,8 **** --- 5,9 ---- import javax.servlet.http.HttpServletRequest; + import java.io.File; /** *************** *** 75,77 **** --- 76,82 ---- return new byte[0]; } + + public File getSaveToFileName(String title, String def) throws UserCancellationException { + return null; + } } |
|
From: <bug...@ve...> - 2004-04-13 17:44:49
|
Message:
The following issue has been closed.
Resolver: Pelle Braendgaard
Date: Tue, 13 Apr 2004 10:44 AM
Done
---------------------------------------------------------------------
View the issue:
http://jira.neuclear.org//browse/COM-11
Here is an overview of the issue:
---------------------------------------------------------------------
Key: COM-11
Summary: Add remember Passphrase to SwingAgent
Type: New Feature
Status: Closed
Priority: Major
Resolution: FIXED
Original Estimate: Unknown
Time Spent: Unknown
Remaining: Unknown
Project: NeuClear Commons
Fix Fors:
r_0_7
Versions:
r_0_7
Assignee: Pelle Braendgaard
Reporter: Pelle Braendgaard
Created: Wed, 7 Apr 2004 10:26 AM
Updated: Tue, 13 Apr 2004 10:44 AM
Description:
Remember passphrase checkbox and functionality should be implemented similarly to the original GUI Agent.
In addition it should remember the last alias used.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://jira.neuclear.org//secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
|
|
From: <bug...@ve...> - 2004-04-13 17:09:56
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://jira.neuclear.org//browse/COM-24 Here is an overview of the issue: --------------------------------------------------------------------- Key: COM-24 Summary: Create abstract Dialog class for all SwingAgent dialogs Type: Improvement Status: Open Priority: Major Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: NeuClear Commons Assignee: Pelle Braendgaard Reporter: Pelle Braendgaard Created: Tue, 13 Apr 2004 10:08 AM Updated: Tue, 13 Apr 2004 10:08 AM Description: We need an abstract super class to handle most of the house keeping with respect to the dialogs. This should have the following features: - main pane (entry screen) - process pane (Shows Process bar) - help pane (Shows help information) - control pane (Buttons) --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://jira.neuclear.org//secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
|
From: <bug...@ve...> - 2004-04-13 16:53:50
|
Message: The following issue has been closed. --------------------------------------------------------------------- View the issue: http://jira.neuclear.org//browse/COM-20 Here is an overview of the issue: --------------------------------------------------------------------- Key: COM-20 Summary: Add Save Key Store Dialog to InteractiveAgent Type: New Feature Status: Closed Priority: Major Resolution: FIXED Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: NeuClear Commons Fix Fors: r_0_7 Versions: r_0_7 Assignee: Pelle Braendgaard Reporter: Pelle Braendgaard Created: Tue, 13 Apr 2004 9:49 AM Updated: Tue, 13 Apr 2004 9:53 AM Description: The DefaultSigner needs to be able to ask the user about the location of his keystore. Thus we need a save dialog. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://jira.neuclear.org//secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
|
From: <bug...@ve...> - 2004-04-13 16:53:48
|
The following issue has been updated:
Updater: Pelle Braendgaard (mailto:pe...@ve...)
Date: Tue, 13 Apr 2004 9:52 AM
Changes:
summary changed from Add Save Key Store Dialoge to InteractiveAgent to Add Save Key Store Dialog to InteractiveAgent
---------------------------------------------------------------------
For a full history of the issue, see:
http://jira.neuclear.org//browse/COM-20?page=history
---------------------------------------------------------------------
View the issue:
http://jira.neuclear.org//browse/COM-20
Here is an overview of the issue:
---------------------------------------------------------------------
Key: COM-20
Summary: Add Save Key Store Dialog to InteractiveAgent
Type: New Feature
Status: Open
Priority: Major
Original Estimate: Unknown
Time Spent: Unknown
Remaining: Unknown
Project: NeuClear Commons
Fix Fors:
r_0_7
Versions:
r_0_7
Assignee: Pelle Braendgaard
Reporter: Pelle Braendgaard
Created: Tue, 13 Apr 2004 9:49 AM
Updated: Tue, 13 Apr 2004 9:52 AM
Description:
The DefaultSigner needs to be able to ask the user about the location of his keystore.
Thus we need a save dialog.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://jira.neuclear.org//secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
|
|
From: <bug...@ve...> - 2004-04-13 16:52:02
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://jira.neuclear.org//browse/COM-23 Here is an overview of the issue: --------------------------------------------------------------------- Key: COM-23 Summary: Implement Save in CommandLineAgent Type: New Feature Status: Open Priority: Major Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: NeuClear Commons Fix Fors: r_0_7 Versions: r_0_7 Assignee: Pelle Braendgaard Reporter: Pelle Braendgaard Created: Tue, 13 Apr 2004 9:51 AM Updated: Tue, 13 Apr 2004 9:51 AM Description: implement the new Save functionality. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://jira.neuclear.org//secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
|
From: <bug...@ve...> - 2004-04-13 16:52:01
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://jira.neuclear.org//browse/COM-22 Here is an overview of the issue: --------------------------------------------------------------------- Key: COM-22 Summary: Implement Save in SwingAgent Type: New Feature Status: Open Priority: Major Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: NeuClear Commons Fix Fors: r_0_7 Versions: r_0_7 Assignee: Pelle Braendgaard Reporter: Pelle Braendgaard Created: Tue, 13 Apr 2004 9:51 AM Updated: Tue, 13 Apr 2004 9:51 AM Description: implement the new Save functionality. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://jira.neuclear.org//secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
|
From: <bug...@ve...> - 2004-04-13 16:52:00
|
Message: The following issue has been closed. --------------------------------------------------------------------- View the issue: http://jira.neuclear.org//browse/COM-22 Here is an overview of the issue: --------------------------------------------------------------------- Key: COM-22 Summary: Implement Save in SwingAgent Type: New Feature Status: Closed Priority: Major Resolution: FIXED Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: NeuClear Commons Fix Fors: r_0_7 Versions: r_0_7 Assignee: Pelle Braendgaard Reporter: Pelle Braendgaard Created: Tue, 13 Apr 2004 9:51 AM Updated: Tue, 13 Apr 2004 9:51 AM Description: implement the new Save functionality. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://jira.neuclear.org//secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
|
From: <bug...@ve...> - 2004-04-13 16:51:58
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://jira.neuclear.org//browse/COM-21 Here is an overview of the issue: --------------------------------------------------------------------- Key: COM-21 Summary: Add Open Key Store Dialog to InteractiveAgent Type: New Feature Status: Open Priority: Major Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: NeuClear Commons Fix Fors: r_0_7 Versions: r_0_7 Assignee: Pelle Braendgaard Reporter: Pelle Braendgaard Created: Tue, 13 Apr 2004 9:50 AM Updated: Tue, 13 Apr 2004 9:50 AM Description: The DefaultSigner needs to be able to ask the user which keystore to use. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://jira.neuclear.org//secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
|
From: <bug...@ve...> - 2004-04-13 16:49:51
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://jira.neuclear.org//browse/COM-20 Here is an overview of the issue: --------------------------------------------------------------------- Key: COM-20 Summary: Add Save Key Store Dialoge to InteractiveAgent Type: New Feature Status: Open Priority: Major Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: NeuClear Commons Fix Fors: r_0_7 Versions: r_0_7 Assignee: Pelle Braendgaard Reporter: Pelle Braendgaard Created: Tue, 13 Apr 2004 9:49 AM Updated: Tue, 13 Apr 2004 9:49 AM Description: The DefaultSigner needs to be able to ask the user about the location of his keystore. Thus we need a save dialog. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://jira.neuclear.org//secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
|
From: <bug...@ve...> - 2004-04-13 04:45:54
|
Message:
The following issue has been closed.
Resolver: Pelle Braendgaard
Date: Mon, 12 Apr 2004 9:45 PM
It is uncertain if Hush' patent might cover this.
---------------------------------------------------------------------
View the issue:
http://jira.neuclear.org//browse/USER-4
Here is an overview of the issue:
---------------------------------------------------------------------
Key: USER-4
Summary: Create Signing Java Applet for Web based signer
Type: New Feature
Status: Closed
Priority: Major
Resolution: WON'T FIX
Original Estimate: Unknown
Time Spent: Unknown
Remaining: Unknown
Project: NeuClear Signer
Fix Fors:
r_0_9
Versions:
r_0_9
Assignee: Pelle Braendgaard
Reporter: Pelle Braendgaard
Created: Tue, 18 Nov 2003 4:23 PM
Updated: Mon, 12 Apr 2004 9:45 PM
Description:
We need an applet where we send pass an encrypted PrivateKey and data for signing.
The Applet asks user for passphrase
Decrypts private key
Signs data and returns it to SigningServlet
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://jira.neuclear.org//secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
|
|
From: <bug...@ve...> - 2004-04-13 04:45:53
|
Message:
The following issue has been closed.
Resolver: Pelle Braendgaard
Date: Mon, 12 Apr 2004 9:44 PM
Currently wont fix. It's uncertain if Hush's patent would affect this.
---------------------------------------------------------------------
View the issue:
http://jira.neuclear.org//browse/USER-3
Here is an overview of the issue:
---------------------------------------------------------------------
Key: USER-3
Summary: Create Key Generating Java Applet for use by Identity Creating Wizard
Type: New Feature
Status: Closed
Priority: Major
Resolution: WON'T FIX
Original Estimate: Unknown
Time Spent: Unknown
Remaining: Unknown
Project: NeuClear Signer
Fix Fors:
r_0_9
Versions:
r_0_9
Assignee: Pelle Braendgaard
Reporter: Pelle Braendgaard
Created: Tue, 18 Nov 2003 4:25 PM
Updated: Mon, 12 Apr 2004 9:44 PM
Description:
This applet should:
- Create new RSA KeyPair
- Ask user for passphrase
- Encrypted using given passphrase
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://jira.neuclear.org//secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
|
|
From: <bug...@ve...> - 2004-04-13 00:06:52
|
Message: The following issue has been closed. --------------------------------------------------------------------- View the issue: http://jira.neuclear.org//browse/COM-18 Here is an overview of the issue: --------------------------------------------------------------------- Key: COM-18 Summary: Make DefaultSigner an intelligent wrapper for end user signing front ends Type: New Feature Status: Closed Priority: Major Resolution: FIXED Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: NeuClear Commons Fix Fors: r_0_7 Versions: r_0_7 Assignee: Pelle Braendgaard Reporter: Pelle Braendgaard Created: Fri, 9 Apr 2004 1:22 PM Updated: Mon, 12 Apr 2004 5:06 PM Description: DefaultSigner should be able to be instantiated without parameters and automatically sense if a keystore exists or create a new one based on user input. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://jira.neuclear.org//secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
|
From: Pelle B. <pe...@us...> - 2004-04-13 00:04:02
|
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/signers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21842/src/java/org/neuclear/commons/crypto/signers Modified Files: DefaultSigner.java JCESigner.java Log Message: implemented the queue and improved the DefaultSigner Index: JCESigner.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/signers/JCESigner.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** JCESigner.java 9 Apr 2004 22:56:45 -0000 1.21 --- JCESigner.java 12 Apr 2004 23:50:08 -0000 1.22 *************** *** 2,5 **** --- 2,8 ---- * $Id$ * $Log$ + * Revision 1.22 2004/04/12 23:50:08 pelle + * implemented the queue and improved the DefaultSigner + * * Revision 1.21 2004/04/09 22:56:45 pelle * SwingAgent now manages key creation as well through the NewAliasDialog. *************** *** 173,176 **** --- 176,180 ---- import org.neuclear.commons.crypto.CryptoException; import org.neuclear.commons.crypto.CryptoTools; + import org.neuclear.commons.crypto.passphraseagents.AlwaysTheSamePassphraseAgent; import org.neuclear.commons.crypto.passphraseagents.InteractiveAgent; import org.neuclear.commons.crypto.passphraseagents.PassPhraseAgent; *************** *** 273,300 **** } ! /** ! * @param provider ! * @param type ! * @param in ! * @param agent ! * @param name ! * @return ! * @throws InvalidPassphraseException ! * @throws UserCancellationException ! */ ! private static KeyStore loadKeyStore(final String provider, final String type, final InputStream in, final PassPhraseAgent agent, final String name) throws InvalidPassphraseException, UserCancellationException { ! // System.out.println("Loading JCESigner: "+name); ! return loadKeyStore(provider, type, in, agent.getPassPhrase("Keystore password for: " + name)); } ! /** ! * @param provider ! * @param type ! * @param in ! * @param passphrase ! * @return ! * @throws InvalidPassphraseException ! */ ! private static KeyStore loadKeyStore(final String provider, final String type, final InputStream in, final char[] passphrase) throws InvalidPassphraseException { // System.out.println("Loading JCESigner using passphrase: "+new String(passphrase)); try { --- 277,289 ---- } ! private static KeyStore loadKeyStore(final String provider, final String type, final InputStream in, final char[] passphrase) throws InvalidPassphraseException { ! try { ! return loadKeyStore(provider, type, in, new AlwaysTheSamePassphraseAgent(passphrase), "keystore"); ! } catch (UserCancellationException e) { ! throw new LowLevelException(e); ! } } ! private static KeyStore loadKeyStore(final String provider, final String type, final InputStream in, final PassPhraseAgent agent, final String name) throws InvalidPassphraseException, UserCancellationException { // System.out.println("Loading JCESigner using passphrase: "+new String(passphrase)); try { *************** *** 304,308 **** else ki = KeyStore.getInstance(type, provider); ! ki.load(in, passphrase); return ki; } catch (KeyStoreException e) { --- 293,300 ---- else ki = KeyStore.getInstance(type, provider); ! if (in != null) ! ki.load(in, agent.getPassPhrase("Keystore password for: " + name)); ! else ! ki.load(null, null); return ki; } catch (KeyStoreException e) { Index: DefaultSigner.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/signers/DefaultSigner.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DefaultSigner.java 12 Apr 2004 15:37:01 -0000 1.6 --- DefaultSigner.java 12 Apr 2004 23:50:07 -0000 1.7 *************** *** 9,12 **** --- 9,13 ---- import java.security.PublicKey; import java.util.Iterator; + import java.util.prefs.Preferences; /* *************** *** 30,33 **** --- 31,37 ---- $Id$ $Log$ + Revision 1.7 2004/04/12 23:50:07 pelle + implemented the queue and improved the DefaultSigner + Revision 1.6 2004/04/12 15:37:01 pelle Refactored DefaultSigner to delegate to a JCESigner and not inherit. *************** *** 75,79 **** public final class DefaultSigner implements BrowsableSigner { public DefaultSigner(final PassPhraseAgent agent) throws UserCancellationException, InvalidPassphraseException { ! signer = new JCESigner(CryptoTools.DEFAULT_KEYSTORE, "jks", "SUN", agent); } --- 79,85 ---- public final class DefaultSigner implements BrowsableSigner { public DefaultSigner(final PassPhraseAgent agent) throws UserCancellationException, InvalidPassphraseException { ! Preferences prefs = Preferences.userNodeForPackage(DefaultSigner.class); ! final String filename = prefs.get("KEYSTORE", CryptoTools.DEFAULT_KEYSTORE); ! signer = new JCESigner(filename, "jks", "SUN", agent); } |