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: <bug...@ve...> - 2004-04-14 20:48:50
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://jira.neuclear.org//browse/PAY-48 Here is an overview of the issue: --------------------------------------------------------------------- Key: PAY-48 Summary: Create Portfolio Manager Type: New Feature Status: Open Priority: Major Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: NeuClear Payments Components: Audit Controller Fix Fors: 0.3 Versions: 0.3 Assignee: Pelle Braendgaard Reporter: Pelle Braendgaard Created: Wed, 14 Apr 2004 1:48 PM Updated: Wed, 14 Apr 2004 1:48 PM Description: The Portfolio Manager is an end user account management system. It is designed to monitor all the assets of a particular identity. Implementation wise it is a slight variation on the Audit Controller. It simply listens to the transfer related Orders and Receipts and places them in a ledger. --------------------------------------------------------------------- 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-14 20:21:48
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://jira.neuclear.org//browse/COM-27 Here is an overview of the issue: --------------------------------------------------------------------- Key: COM-27 Summary: Loop when JCESigner is loaded with incorrect passphrase Type: Bug Status: Open Priority: Major Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: NeuClear Commons Assignee: Pelle Braendgaard Reporter: Pelle Braendgaard Created: Wed, 14 Apr 2004 1:21 PM Updated: Wed, 14 Apr 2004 1:21 PM Description: --------------------------------------------------------------------- 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-14 18:30:25
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://jira.neuclear.org//browse/USER-9 Here is an overview of the issue: --------------------------------------------------------------------- Key: USER-9 Summary: Create license acceptance screen Type: New Feature Status: Open Priority: Major 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: Wed, 14 Apr 2004 11:29 AM Updated: Wed, 14 Apr 2004 11:29 AM Description: After the popup there should be a license acceptance screen that shows the GPL license to the user and allows them to hit ok or cancel. Once ok has been hit a preference entry should be stored and the license should no longer be displayed. --------------------------------------------------------------------- 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-14 18:27:54
|
Message: The following issue has been closed. --------------------------------------------------------------------- View the issue: http://jira.neuclear.org//browse/USER-8 Here is an overview of the issue: --------------------------------------------------------------------- Key: USER-8 Summary: Change license of Personal Signer from LGPL to GPL Type: Improvement Status: Closed Priority: Major Resolution: FIXED 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: Wed, 14 Apr 2004 11:23 AM Updated: Wed, 14 Apr 2004 11:27 AM Description: The Personal Signer is an application that can be customised, however no one should really be doing anything funny with it. (Think Gatorware) To avoid that we should GPL the Personal Signer application. I cant think of any good reasons why this should affect any businessess using NeuClear as all the serverside stuff and Libraries are still LGPL. --------------------------------------------------------------------- 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-14 18:24:54
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://jira.neuclear.org//browse/USER-8 Here is an overview of the issue: --------------------------------------------------------------------- Key: USER-8 Summary: Change license of Personal Signer from LGPL to GPL Type: Improvement Status: Open Priority: Major 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: Wed, 14 Apr 2004 11:23 AM Updated: Wed, 14 Apr 2004 11:23 AM Description: The Personal Signer is an application that can be customised, however no one should really be doing anything funny with it. (Think Gatorware) To avoid that we should GPL the Personal Signer application. I cant think of any good reasons why this should affect any businessess using NeuClear as all the serverside stuff and Libraries are still LGPL. --------------------------------------------------------------------- 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-14 15:31:51
|
Message:
The following issue has been closed.
Resolver: Pelle Braendgaard
Date: Wed, 14 Apr 2004 8:30 AM
This has been done and is available here:
http://old.neuclear.org/signer/jnlp/
---------------------------------------------------------------------
View the issue:
http://jira.neuclear.org//browse/USER-7
Here is an overview of the issue:
---------------------------------------------------------------------
Key: USER-7
Summary: Create Java Web Start installation
Type: Improvement
Status: Closed
Priority: Major
Resolution: FIXED
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, 13 Apr 2004 5:33 PM
Updated: Wed, 14 Apr 2004 8:30 AM
Description:
We need a Java Web Start installation method.
---------------------------------------------------------------------
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-14 15:30:52
|
Update of /cvsroot/neuclear/neuclear-id In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27376 Modified Files: project.properties Log Message: Added splash screen and java web start support (try "maven jnlp") Index: project.properties =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/project.properties,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** project.properties 23 Mar 2004 22:03:17 -0000 1.33 --- project.properties 14 Apr 2004 15:30:41 -0000 1.34 *************** *** 2,6 **** # P R O J E C T P R O P E R T I E S # ------------------------------------------------------------------- ! #maven.test.skip=true maven.compile.debug = on maven.compile.optimize = on --- 2,6 ---- # P R O J E C T P R O P E R T I E S # ------------------------------------------------------------------- ! maven.test.skip=true maven.compile.debug = on maven.compile.optimize = on |
|
From: Pelle B. <pe...@us...> - 2004-04-14 15:30:51
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/signers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27376/src/java/org/neuclear/id/signers Modified Files: DemoSigningServlet.java Log Message: Added splash screen and java web start support (try "maven jnlp") Index: DemoSigningServlet.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/signers/DemoSigningServlet.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DemoSigningServlet.java 2 Mar 2004 18:59:10 -0000 1.1 --- DemoSigningServlet.java 14 Apr 2004 15:30:41 -0000 1.2 *************** *** 2,5 **** --- 2,8 ---- * $Id$ * $Log$ + * Revision 1.2 2004/04/14 15:30:41 pelle + * Added splash screen and java web start support (try "maven jnlp") + * * Revision 1.1 2004/03/02 18:59:10 pelle * Further cleanups in neuclear-id. Moved everything under id. *************** *** 194,207 **** import org.neuclear.commons.NeuClearException; import org.neuclear.commons.Utility; ! import org.neuclear.commons.crypto.passphraseagents.PassPhraseAgent; import org.neuclear.commons.crypto.passphraseagents.ServletPassPhraseAgent; ! import org.neuclear.commons.crypto.signers.Signer; import org.neuclear.commons.crypto.signers.TestCaseSigner; - import org.neuclear.commons.crypto.Base64; - import org.neuclear.xml.XMLException; import org.neuclear.id.SignatureRequest; import javax.servlet.ServletConfig; - import javax.servlet.SingleThreadModel; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; --- 197,208 ---- import org.neuclear.commons.NeuClearException; import org.neuclear.commons.Utility; ! import org.neuclear.commons.crypto.Base64; import org.neuclear.commons.crypto.passphraseagents.ServletPassPhraseAgent; ! import org.neuclear.commons.crypto.signers.BrowsableSigner; import org.neuclear.commons.crypto.signers.TestCaseSigner; import org.neuclear.id.SignatureRequest; + import org.neuclear.xml.XMLException; import javax.servlet.ServletConfig; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; *************** *** 212,219 **** public final class DemoSigningServlet extends SigningServlet { ! public DemoSigningServlet(){ ! agent=new ServletPassPhraseAgent(); } ! protected Signer createSigner(ServletConfig config) throws GeneralSecurityException, NeuClearException { agent.set("neuclear"); final TestCaseSigner signerd = new TestCaseSigner(agent); --- 213,221 ---- public final class DemoSigningServlet extends SigningServlet { ! public DemoSigningServlet() { ! agent = new ServletPassPhraseAgent(); } ! ! protected BrowsableSigner createSigner(ServletConfig config) throws GeneralSecurityException, NeuClearException { agent.set("neuclear"); final TestCaseSigner signerd = new TestCaseSigner(agent); *************** *** 227,233 **** --- 229,237 ---- agent.clear(); } + protected boolean isReadyToSign(HttpServletRequest request) { return !Utility.isEmpty(request.getParameter("sign")); } + protected void printSecondStageForm(HttpServletRequest request, final PrintWriter out, SignatureRequest sigreq, final String endpoint) { out.println("<table><tr><td ><h4>Do you wish to sign this?</h4></td></tr>"); *************** *** 243,246 **** } ! private final ServletPassPhraseAgent agent; } --- 247,250 ---- } ! private final ServletPassPhraseAgent agent; } |
|
From: Pelle B. <pe...@us...> - 2004-04-14 15:30:20
|
Update of /cvsroot/neuclear/neuclear-xmlsig In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27306 Modified Files: project.properties Log Message: Added splash screen and java web start support (try "maven jnlp") Index: project.properties =================================================================== RCS file: /cvsroot/neuclear/neuclear-xmlsig/project.properties,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** project.properties 23 Mar 2004 20:51:01 -0000 1.7 --- project.properties 14 Apr 2004 15:30:10 -0000 1.8 *************** *** 20,22 **** #maven.ui.property.file = ui.properties maven.repo.remote = http://www.ibiblio.org/maven/,http://dist.codehaus.org/,http://old.neuclear.org/maven/ ! #maven.test.skip=true --- 20,22 ---- #maven.ui.property.file = ui.properties maven.repo.remote = http://www.ibiblio.org/maven/,http://dist.codehaus.org/,http://old.neuclear.org/maven/ ! maven.test.skip=true |
|
From: Pelle B. <pe...@us...> - 2004-04-14 15:30:13
|
Update of /cvsroot/neuclear/neuclear-signer/src/java/org/neuclear/signers/standalone In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27163/src/java/org/neuclear/signers/standalone Modified Files: StandaloneSigner.java StandaloneSigningServlet.java Added Files: QuickStart.java SplashWindow.java Log Message: Added splash screen and java web start support (try "maven jnlp") --- NEW FILE: SplashWindow.java --- package org.neuclear.signers.standalone; /* * @(#)SplashWindow.java 1.3 2003-06-01 * * Copyright (c) 1999-2003 Werner Randelshofer * Staldenmattweg 2, Immensee, CH-6405, Switzerland * All rights reserved. * * This material is provided "as is", with absolutely no warranty expressed * or implied. Any use is at your own risk. * * Permission to use or copy this software is hereby granted without fee, * provided this copyright notice is retained on all copies. */ import java.awt.*; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; /** * Splash Window to show an image during startup of an application.<p> * <p/> * Usage: * <pre> * // open the splash window * Frame splashOwner = SplashWindow.splash(anImage); * <p/> * // start the application * // ... * <p/> * // dispose the splash window by disposing the frame that owns the window. * splashOwner.dispose(); * </pre> * <p/> * <p>To use the splash window as an about dialog write this: * <pre> * new SplashWindow( * this, * getToolkit().createImage(getClass().getResource("splash.png")) * ).show(); * </pre> * <p/> * The splash window disposes itself when the user clicks on it. * * @author Werner Randelshofer, Staldenmattweg 2, Immensee, CH-6405, Switzerland. * @version 1.3 2003-06-01 Revised. */ public class SplashWindow extends Window { private Image splashImage; /** * This attribute indicates whether the method * paint(Graphics) has been called at least once since the * construction of this window.<br> * This attribute is used to notify method splash(Image) * that the window has been drawn at least once * by the AWT event dispatcher thread.<br> * This attribute acts like a latch. Once set to true, * it will never be changed back to false again. * * @see #paint * @see #splash */ private boolean paintCalled = false; /** * Constructs a splash window and centers it on the * screen. The user can click on the window to dispose it. * * @param owner The frame owning the splash window. * @param splashImage The splashImage to be displayed. */ public SplashWindow(Frame owner, Image splashImage) { super(owner); this.splashImage = splashImage; // Load the image MediaTracker mt = new MediaTracker(this); mt.addImage(splashImage, 0); try { mt.waitForID(0); } catch (InterruptedException ie) { } // Center the window on the screen. int imgWidth = splashImage.getWidth(this); int imgHeight = splashImage.getHeight(this); setSize(imgWidth, imgHeight); Dimension screenDim = Toolkit.getDefaultToolkit().getScreenSize(); setLocation((screenDim.width - imgWidth) / 2, (screenDim.height - imgHeight) / 2); // Users shall be able to close the splash window by // clicking on its display area. This mouse listener // listens for mouse clicks and disposes the splash window. MouseAdapter disposeOnClick = new MouseAdapter() { public void mouseClicked(MouseEvent evt) { // Note: To avoid that method splash hangs, we // must set paintCalled to true and call notifyAll. // This is necessary because the mouse click may // occur before the contents of the window // has been painted. synchronized (SplashWindow.this) { SplashWindow.this.paintCalled = true; SplashWindow.this.notifyAll(); } dispose(); } }; addMouseListener(disposeOnClick); } /** * Updates the display area of the window. */ public void update(Graphics g) { // Note: Since the paint method is going to draw an // image that covers the complete area of the component we // do not fill the component with its background color // here. This avoids flickering. g.setColor(getForeground()); paint(g); } /** * Paints the image on the window. */ public void paint(Graphics g) { g.drawImage(splashImage, 0, 0, this); // Notify method splash that the window // has been painted. // Note: To improve performance we do not enter // the synchronized block unless we have to. if (!paintCalled) { paintCalled = true; synchronized (this) { notifyAll(); } } } /** * Constructs and displays a SplashWindow.<p> * This method is useful for startup splashs. * Dispose the return frame to get rid of the splash window.<p> * * @param splashImage The image to be displayed. * @return Returns the frame that owns the SplashWindow. */ public static Frame splash(Image splashImage) { Frame f = new Frame(); SplashWindow w = new SplashWindow(f, splashImage); // Show the window. w.toFront(); w.show(); // Note: To make sure the user gets a chance to see the // splash window we wait until its paint method has been // called at least by the AWT event dispatcher thread. if (!EventQueue.isDispatchThread()) { synchronized (w) { while (!w.paintCalled) { try { w.wait(); } catch (InterruptedException e) { } } } } return f; } } --- NEW FILE: QuickStart.java --- package org.neuclear.signers.standalone; import java.awt.*; /** * Starts a Jetty servlet Engine at port 11870, only listening on localhost. * with a SigningServlet at http://127.0.0.1:11870/Signer */ public class QuickStart { public static void main(String args[]) { Frame splash = SplashWindow.splash(Toolkit.getDefaultToolkit().createImage(QuickStart.class.getClassLoader().getResource("neuclearsplash.png"))); try { Class.forName("org.neuclear.signers.standalone.StandaloneSigner") .getMethod("main", new Class[]{String[].class}) .invoke(null, new Object[]{args}); } catch (Throwable e) { e.printStackTrace(); System.err.flush(); System.exit(10); } try { Thread.sleep(4000); } catch (InterruptedException e) { e.printStackTrace(); } splash.dispose(); } } Index: StandaloneSigningServlet.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-signer/src/java/org/neuclear/signers/standalone/StandaloneSigningServlet.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** StandaloneSigningServlet.java 9 Apr 2004 18:40:35 -0000 1.7 --- StandaloneSigningServlet.java 14 Apr 2004 15:30:02 -0000 1.8 *************** *** 4,10 **** import org.neuclear.commons.crypto.passphraseagents.UserCancellationException; import org.neuclear.commons.crypto.passphraseagents.swing.SwingAgent; import org.neuclear.commons.crypto.signers.DefaultSigner; import org.neuclear.commons.crypto.signers.InvalidPassphraseException; - import org.neuclear.commons.crypto.signers.Signer; import org.neuclear.commons.servlets.ServletTools; import org.neuclear.id.signers.SigningServlet; --- 4,10 ---- import org.neuclear.commons.crypto.passphraseagents.UserCancellationException; import org.neuclear.commons.crypto.passphraseagents.swing.SwingAgent; + 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.servlets.ServletTools; import org.neuclear.id.signers.SigningServlet; *************** *** 29,33 **** } ! protected Signer createSigner(ServletConfig config) throws UserCancellationException { try { return new DefaultSigner(agent); --- 29,33 ---- } ! protected BrowsableSigner createSigner(ServletConfig config) throws UserCancellationException { try { return new DefaultSigner(agent); Index: StandaloneSigner.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-signer/src/java/org/neuclear/signers/standalone/StandaloneSigner.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** StandaloneSigner.java 14 Apr 2004 00:10:30 -0000 1.5 --- StandaloneSigner.java 14 Apr 2004 15:30:02 -0000 1.6 *************** *** 1,8 **** --- 1,17 ---- package org.neuclear.signers.standalone; + import com.jgoodies.plaf.Options; import org.mortbay.http.HttpContext; import org.mortbay.jetty.Server; import org.mortbay.jetty.servlet.ServletHandler; import org.mortbay.util.InetAddrPort; + import org.neuclear.commons.crypto.CryptoTools; + import org.neuclear.commons.crypto.passphraseagents.PassPhraseAgent; + + import javax.swing.*; + import java.awt.*; + import java.awt.event.ActionEvent; + import java.awt.event.ActionListener; + import java.net.URL; *************** *** 13,17 **** --- 22,29 ---- public class StandaloneSigner { public static void main(String args[]) { + // Frame splash=SplashWindow.splash(Toolkit.getDefaultToolkit().createImage(StandaloneSigner.class.getClassLoader().getResource("neuclearsplash.png"))); + try { + CryptoTools.ensureProvider(); Server server = new Server(); server.addListener(new InetAddrPort("127.0.0.1", 11870)); *************** *** 24,30 **** --- 36,91 ---- handler.start(); handler.initializeServlets(); + + JFrame frame = createFrame(); + + Thread.sleep(2000); + // splash.dispose(); } catch (Exception e) { e.printStackTrace(); } } + + public static JFrame createFrame() { + 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. + } + JFrame frame = new JFrame("NeuClear Signing Agent"); + frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); + JButton quit = new JButton("Shut down"); + + quit.addActionListener(new ActionListener() { + /** + * Invoked when an action occurs. + */ + public void actionPerformed(ActionEvent e) { + System.exit(0); + + } + + }); + Container content = frame.getContentPane(); + content.setLayout(new BorderLayout()); + final URL imageurl = PassPhraseAgent.class.getClassLoader().getResource("org/neuclear/commons/crypto/passphraseagents/neuclear.png"); + JLabel label = new JLabel("NeuClear Personal Signer"); + ; + if (imageurl != null) { + final ImageIcon icon = new ImageIcon(imageurl); + frame.setIconImage(icon.getImage()); + label.setIcon(icon); + } + + label.setForeground(Color.WHITE); + label.setFont(new Font("Arial", Font.BOLD, 14)); + content.add(label, BorderLayout.NORTH); + content.add(quit, BorderLayout.SOUTH); + content.setBackground(Color.BLUE); + frame.pack(); + frame.show(); + + return frame; + + } } |
|
From: Pelle B. <pe...@us...> - 2004-04-14 15:30:12
|
Update of /cvsroot/neuclear/neuclear-signer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27163 Modified Files: project.properties project.xml Log Message: Added splash screen and java web start support (try "maven jnlp") Index: project.properties =================================================================== RCS file: /cvsroot/neuclear/neuclear-signer/project.properties,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** project.properties 15 Dec 2003 14:38:18 -0000 1.2 --- project.properties 14 Apr 2004 15:30:03 -0000 1.3 *************** *** 14,17 **** maven.repo.central.directory = /home/sites/neuclear.org/public_html/maven ! maven.javaapp.mainclass = org.neuclear.signers.standalone.StandaloneSigner maven.javaapp.jar.exclude= --- 14,28 ---- maven.repo.central.directory = /home/sites/neuclear.org/public_html/maven ! maven.jar.mainclass = org.neuclear.signers.standalone.QuickStart ! maven.javaapp.mainclass = org.neuclear.signers.standalone.QuickStart ! #maven.javaapp.mainclass = org.neuclear.signers.standalone.StandaloneSigner maven.javaapp.jar.exclude= + + maven.jnlp.title=NeuClear Personal Signer + maven.jnlp.vendor=Antilles Software Ventures SA + maven.jnlp.homepage=http://neuclear.org + maven.jnlp.icon=http://old.neuclear.org/images/neuclear100x100.png + maven.jnlp.icon.splash=http://old.neuclear.org/images/neuclearsplash.png + maven.jnlp.permission=all + maven.jnlp.http.codebase=http://old.neuclear.org/signer/jnlp/ + maven.jnlp.mainclass = org.neuclear.signers.standalone.QuickStart Index: project.xml =================================================================== RCS file: /cvsroot/neuclear/neuclear-signer/project.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** project.xml 14 Apr 2004 00:10:30 -0000 1.10 --- project.xml 14 Apr 2004 15:30:03 -0000 1.11 *************** *** 17,21 **** </description> ! <url>http://neuclear.org/signer/</url> <repository> <connection> --- 17,21 ---- </description> ! <url>http://old.neuclear.org/signer/</url> <repository> <connection> *************** *** 27,33 **** </repository> ! <siteAddress>neuclear.org</siteAddress> <siteDirectory>/home/sites/neuclear.org/public_html/signer/</siteDirectory> ! <issueTrackingUrl>http://jira.neuclear.org:9090/</issueTrackingUrl> <mailingLists> <mailingList> --- 27,33 ---- </repository> ! <siteAddress>old.neuclear.org</siteAddress> <siteDirectory>/home/sites/neuclear.org/public_html/signer/</siteDirectory> ! <issueTrackingUrl>http://jira.neuclear.org/</issueTrackingUrl> <mailingLists> <mailingList> *************** *** 66,69 **** --- 66,70 ---- <version>0.13-SNAPSHOT</version> <properties> + <jnlp.jar>true</jnlp.jar> <war.bundle>true</war.bundle> </properties> *************** *** 74,77 **** --- 75,79 ---- <version>0.9-SNAPSHOT</version> <properties> + <jnlp.jar>true</jnlp.jar> <war.bundle>true</war.bundle> </properties> *************** *** 82,85 **** --- 84,88 ---- <version>0.7-SNAPSHOT</version> <properties> + <jnlp.jar>true</jnlp.jar> <war.bundle>true</war.bundle> </properties> *************** *** 90,93 **** --- 93,99 ---- <version>4.2.14</version> <jar>org.mortbay.jetty-4.2.14.jar</jar> + <properties> + <jnlp.jar>true</jnlp.jar> + </properties> </dependency> <dependency> *************** *** 96,99 **** --- 102,106 ---- <jar>dom4j-1.4.jar</jar> <properties> + <jnlp.jar>true</jnlp.jar> <war.bundle>true</war.bundle> </properties> *************** *** 105,108 **** --- 112,116 ---- <jar>bcprov-jdk14-120.jar</jar> <properties> + <jnlp.jar>true</jnlp.jar> <war.bundle>false</war.bundle> </properties> *************** *** 112,132 **** <name>servletapi</name> <version>2.3</version> - </dependency> - <dependency> - <id>waterken-adt</id> - <version>2.0-beta13</version> <properties> ! <war.bundle>true</war.bundle> </properties> </dependency> ! <dependency> ! <id>jline</id> ! <version>0.8.1</version> ! </dependency> ! <dependency> ! <id>commons-cli</id> ! <name>commons-cli</name> ! <version>1.0</version> ! </dependency> <dependency> <groupId>jgoodies</groupId> --- 120,147 ---- <name>servletapi</name> <version>2.3</version> <properties> ! <jnlp.jar>true</jnlp.jar> </properties> </dependency> ! <!-- <dependency> ! <id>waterken-adt</id> ! <version>2.0-beta13</version> ! <properties> ! <war.bundle>true</war.bundle> ! </properties> ! </dependency>--> ! <!-- ! <dependency> ! <id>jline</id> ! <version>0.8.1</version> ! </dependency> ! --> ! <!-- ! <dependency> ! <id>commons-cli</id> ! <name>commons-cli</name> ! <version>1.0</version> ! </dependency> ! --> <dependency> <groupId>jgoodies</groupId> *************** *** 136,139 **** --- 151,155 ---- <properties> <war.bundle>true</war.bundle> + <jnlp.jar>true</jnlp.jar> </properties> </dependency> *************** *** 144,147 **** --- 160,164 ---- <version>1.2.0</version> <properties> + <jnlp.jar>true</jnlp.jar> <war.bundle>true</war.bundle> </properties> *************** *** 152,155 **** --- 169,173 ---- <version>1.2.0</version> <properties> + <jnlp.jar>true</jnlp.jar> <war.bundle>true</war.bundle> </properties> |
|
From: Pelle B. <pe...@us...> - 2004-04-14 15:30:11
|
Update of /cvsroot/neuclear/neuclear-signer/src/java In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27163/src/java Added Files: neuclearsplash.png Log Message: Added splash screen and java web start support (try "maven jnlp") --- NEW FILE: neuclearsplash.png --- (This appears to be a binary file; contents omitted.) |
|
From: <bug...@ve...> - 2004-04-14 06:21:49
|
Message:
The following issue has been closed.
Resolver: Pelle Braendgaard
Date: Tue, 13 Apr 2004 11:20 PM
Added a simple small frame that allows the user to shut it down.
---------------------------------------------------------------------
View the issue:
http://jira.neuclear.org//browse/USER-6
Here is an overview of the issue:
---------------------------------------------------------------------
Key: USER-6
Summary: Add quittable program frame
Type: Improvement
Status: Closed
Priority: Major
Resolution: FIXED
Original Estimate: Unknown
Time Spent: Unknown
Remaining: Unknown
Project: NeuClear Signer
Fix Fors:
r_0_9
Assignee: Pelle Braendgaard
Reporter: Pelle Braendgaard
Created: Tue, 13 Apr 2004 5:32 PM
Updated: Tue, 13 Apr 2004 11:20 PM
Description:
We should have a frame which pops up when the signer is running. It could possibly containing key management tools.
For know it's most important to simply have a simple way of shutting it down.
---------------------------------------------------------------------
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-14 06:21:49
|
Message:
The following issue has been closed.
Resolver: Pelle Braendgaard
Date: Tue, 13 Apr 2004 11:21 PM
Added the SplashScreen
---------------------------------------------------------------------
View the issue:
http://jira.neuclear.org//browse/USER-5
Here is an overview of the issue:
---------------------------------------------------------------------
Key: USER-5
Summary: Add Splash Screen
Type: Improvement
Status: Closed
Priority: Major
Resolution: FIXED
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, 13 Apr 2004 5:30 PM
Updated: Tue, 13 Apr 2004 11:21 PM
Description:
There is no real visual feedback that the signer is loading, we need a quick tiny splash screen.
---------------------------------------------------------------------
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-14 00:33:57
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://jira.neuclear.org//browse/USER-7 Here is an overview of the issue: --------------------------------------------------------------------- Key: USER-7 Summary: Create Java Web Start installation Type: Improvement Status: Open Priority: Major 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, 13 Apr 2004 5:33 PM Updated: Tue, 13 Apr 2004 5:33 PM Description: We need a Java Web Start installation method. --------------------------------------------------------------------- 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-14 00:33:56
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://jira.neuclear.org//browse/USER-6 Here is an overview of the issue: --------------------------------------------------------------------- Key: USER-6 Summary: Add quittable program frame Type: Improvement Status: Open Priority: Major Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: NeuClear Signer Assignee: Pelle Braendgaard Reporter: Pelle Braendgaard Created: Tue, 13 Apr 2004 5:32 PM Updated: Tue, 13 Apr 2004 5:32 PM Description: We should have a frame which pops up when the signer is running. It could possibly containing key management tools. For know it's most important to simply have a simple way of shutting it down. --------------------------------------------------------------------- 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-14 00:31:48
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://jira.neuclear.org//browse/USER-5 Here is an overview of the issue: --------------------------------------------------------------------- Key: USER-5 Summary: Add Splash Screen Type: Improvement Status: Open Priority: Major 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, 13 Apr 2004 5:30 PM Updated: Tue, 13 Apr 2004 5:30 PM Description: There is no real visual feedback that the signer is loading, we need a quick tiny splash screen. --------------------------------------------------------------------- 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-14 00:28:48
|
Message:
The following issue has been closed.
Resolver: Pelle Braendgaard
Date: Tue, 13 Apr 2004 5:28 PM
There is no need for this due to the new architecture.
---------------------------------------------------------------------
View the issue:
http://jira.neuclear.org//browse/USER-2
Here is an overview of the issue:
---------------------------------------------------------------------
Key: USER-2
Summary: New Identity Generating Wizard (Web Based)
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:19 PM
Updated: Tue, 13 Apr 2004 5:28 PM
Description:
A web based wizard for generating Key and Identity. This gets signed by the SigningServers master key and stored in the repository.
---------------------------------------------------------------------
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-14 00:11:51
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/signers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4651/src/java/org/neuclear/id/signers Modified Files: SigningServlet.java Log Message: Added a MessageLabel for handling errors, validation and info Save works well now. It's pretty much there I think. Index: SigningServlet.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/signers/SigningServlet.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SigningServlet.java 12 Apr 2004 15:28:08 -0000 1.5 --- SigningServlet.java 14 Apr 2004 00:11:34 -0000 1.6 *************** *** 2,5 **** --- 2,10 ---- * $Id$ * $Log$ + * Revision 1.6 2004/04/14 00:11:34 pelle + * Added a MessageLabel for handling errors, validation and info + * Save works well now. + * It's pretty much there I think. + * * Revision 1.5 2004/04/12 15:28:08 pelle * Added Hibernate and Prevalent tests for Currency Controllers *************** *** 278,284 **** import org.neuclear.commons.Utility; import org.neuclear.commons.crypto.passphraseagents.UserCancellationException; import org.neuclear.commons.crypto.signers.NonExistingSignerException; import org.neuclear.commons.crypto.signers.ServletSignerFactory; - import org.neuclear.commons.crypto.signers.Signer; import org.neuclear.commons.servlets.ServletTools; import org.neuclear.id.InvalidNamedObjectException; --- 283,289 ---- import org.neuclear.commons.Utility; import org.neuclear.commons.crypto.passphraseagents.UserCancellationException; + import org.neuclear.commons.crypto.signers.BrowsableSigner; import org.neuclear.commons.crypto.signers.NonExistingSignerException; import org.neuclear.commons.crypto.signers.ServletSignerFactory; import org.neuclear.commons.servlets.ServletTools; import org.neuclear.id.InvalidNamedObjectException; *************** *** 322,330 **** } ! protected Signer createSigner(ServletConfig config) throws GeneralSecurityException, NeuClearException, IOException { ! return ServletSignerFactory.getInstance().createSigner(config); } ! protected final Signer getSigner() { return signer; } --- 327,335 ---- } ! protected BrowsableSigner createSigner(ServletConfig config) throws GeneralSecurityException, NeuClearException, IOException { ! return (BrowsableSigner) ServletSignerFactory.getInstance().createSigner(config); } ! protected final BrowsableSigner getSigner() { return signer; } *************** *** 377,381 **** out.flush(); try { ! isSigned = sign(named, "test", out); } catch (InvalidNamedObjectException e) { --- 382,386 ---- out.flush(); try { ! isSigned = sign(named, out); } catch (InvalidNamedObjectException e) { *************** *** 419,426 **** } ! private boolean sign(final Builder named, String username, final PrintWriter out) throws NeuClearException, XMLException { boolean isSigned; ! context.log("SIGN: Signing with " + username); ! final SignedNamedObject signed = named.convert(username, signer); isSigned = true; out.println("<li>Signed</li>"); --- 424,431 ---- } ! private boolean sign(final Builder named, final PrintWriter out) throws NeuClearException, XMLException { boolean isSigned; ! context.log("SIGN: Signing with "); ! final SignedNamedObject signed = named.convert(signer); isSigned = true; out.println("<li>Signed</li>"); *************** *** 456,460 **** protected javax.servlet.ServletContext context; ! private Signer signer; private String title; static private Pattern xmlescape = Pattern.compile("(\\<)"); --- 461,465 ---- protected javax.servlet.ServletContext context; ! private BrowsableSigner signer; private String title; static private Pattern xmlescape = Pattern.compile("(\\<)"); |
|
From: Pelle B. <pe...@us...> - 2004-04-14 00:11:33
|
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/swing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4424/src/java/org/neuclear/commons/crypto/passphraseagents/swing Modified Files: KeyStoreDialog.java NewAliasDialog.java SaveKeyStore.java SimpleDialog.java SwingAgent.java WaitForInput.java Added Files: MessageLabel.java NewPassphraseDialog.java Log Message: Added a MessageLabel for handling errors, validation and info Save works well now. It's pretty much there I think. Index: SwingAgent.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/swing/SwingAgent.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SwingAgent.java 13 Apr 2004 18:14:02 -0000 1.6 --- SwingAgent.java 14 Apr 2004 00:10:52 -0000 1.7 *************** *** 17,20 **** --- 17,25 ---- $Id$ $Log$ + Revision 1.7 2004/04/14 00:10:52 pelle + Added a MessageLabel for handling errors, validation and info + Save works well now. + It's pretty much there I think. + Revision 1.6 2004/04/13 18:14:02 pelle added open dialog to swing agent and interactive agent *************** *** 56,59 **** --- 61,65 ---- ksd = new KeyStoreDialog(); simple = new SimpleDialog(); + np = new NewPassphraseDialog(); queue = new RunnableQueue(); fc = new JFileChooser(); *************** *** 63,66 **** --- 69,73 ---- private final SimpleDialog simple; + private final NewPassphraseDialog np; private final KeyStoreDialog ksd; private final RunnableQueue queue; *************** *** 127,131 **** public File getSaveToFileName(String title, String def) throws UserCancellationException { prepFileChooser(def, title); ! fc.showSaveDialog(ksd.getDialog()); return fc.getSelectedFile(); } --- 134,140 ---- public File getSaveToFileName(String title, String def) throws UserCancellationException { prepFileChooser(def, title); ! int result = fc.showSaveDialog(ksd.getFrame()); ! if (result == JFileChooser.CANCEL_OPTION) ! throw new UserCancellationException(title); return fc.getSelectedFile(); } *************** *** 133,140 **** 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); --- 142,157 ---- public File getOpenFileName(String title, String def) throws UserCancellationException { prepFileChooser(def, title); ! int result = fc.showOpenDialog(ksd.getFrame()); ! if (result == JFileChooser.CANCEL_OPTION) ! throw new UserCancellationException(title); return fc.getSelectedFile(); } + public char[] getNewPassPhrase(String name) throws UserCancellationException { + WaitForInput waiter = np.createGetNewPassphraseTask(name); + queue.queue(waiter); + return (char[]) waiter.getResult(); + } + private void prepFileChooser(String def, String title) { File file = new File(def); Index: SaveKeyStore.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/swing/SaveKeyStore.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SaveKeyStore.java 13 Apr 2004 17:32:05 -0000 1.1 --- SaveKeyStore.java 14 Apr 2004 00:10:52 -0000 1.2 *************** *** 1,10 **** --- 1,19 ---- package org.neuclear.commons.crypto.passphraseagents.swing; + import org.neuclear.commons.LowLevelException; import org.neuclear.commons.crypto.passphraseagents.UserCancellationException; import org.neuclear.commons.crypto.signers.BrowsableSigner; + import org.neuclear.commons.crypto.signers.DefaultSigner; + + import java.io.IOException; /* $Id$ $Log$ + Revision 1.2 2004/04/14 00:10:52 pelle + Added a MessageLabel for handling errors, validation and info + Save works well now. + It's pretty much there I think. + Revision 1.1 2004/04/13 17:32:05 pelle Now has save dialog *************** *** 19,24 **** */ public class SaveKeyStore implements Runnable { ! public SaveKeyStore(BrowsableSigner signer) { this.signer = signer; } --- 28,35 ---- */ public class SaveKeyStore implements Runnable { ! public SaveKeyStore(BrowsableSigner signer, MessageLabel message, boolean force) { this.signer = signer; + this.message = message; + this.force = force; } *************** *** 36,51 **** public void run() { try { ! signer.save(); } catch (UserCancellationException e) { ! e.printStackTrace(); } } ! public static void save(BrowsableSigner signer) { } private final BrowsableSigner signer; ! } --- 47,77 ---- public void run() { try { ! if (signer instanceof DefaultSigner) ! ((DefaultSigner) signer).save(force); ! else ! signer.save(); ! message.info("KeyStore saved"); } catch (UserCancellationException e) { ! message.info("Save Cancelled"); ! } catch (IOException e) { ! message.error("Problem Saving KeyStore: " + e.getLocalizedMessage()); ! } catch (LowLevelException e) { ! message.error("Problem Saving KeyStore: " + e.getCause().getLocalizedMessage()); ! } catch (Exception e) { ! message.error("Problem Saving KeyStore: " + e.getLocalizedMessage()); } } ! public static void save(BrowsableSigner signer, MessageLabel message) { ! new Thread(new SaveKeyStore(signer, message, false)).start(); ! } + public static void saveAs(BrowsableSigner signer, MessageLabel message) { + new Thread(new SaveKeyStore(signer, message, true)).start(); } private final BrowsableSigner signer; ! private final MessageLabel message; ! private final boolean force; } Index: WaitForInput.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/swing/WaitForInput.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WaitForInput.java 13 Apr 2004 17:32:05 -0000 1.2 --- WaitForInput.java 14 Apr 2004 00:10:52 -0000 1.3 *************** *** 6,9 **** --- 6,14 ---- $Id$ $Log$ + Revision 1.3 2004/04/14 00:10:52 pelle + Added a MessageLabel for handling errors, validation and info + Save works well now. + It's pretty much there I think. + Revision 1.2 2004/04/13 17:32:05 pelle Now has save dialog *************** *** 52,55 **** --- 57,62 ---- } + abstract void execute(); + private Object result; private boolean cancelled = false; --- NEW FILE: MessageLabel.java --- package org.neuclear.commons.crypto.passphraseagents.swing; import javax.swing.*; import java.awt.*; /* NeuClear Distributed Transaction Clearing Platform (C) 2003 Pelle Braendgaard This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA $Id: MessageLabel.java,v 1.1 2004/04/14 00:10:51 pelle Exp $ $Log: MessageLabel.java,v $ Revision 1.1 2004/04/14 00:10:51 pelle Added a MessageLabel for handling errors, validation and info Save works well now. It's pretty much there I think. */ /** * User: pelleb * Date: Apr 13, 2004 * Time: 9:34:50 PM */ public class MessageLabel extends JLabel { public MessageLabel() { orig = getBackground(); setText(" "); setOpaque(false); } public void info(String message) { setOpaque(true); setBackground(INFO); setText(message); } public void invalid(String message) { setOpaque(true); setBackground(INVALID); setText(message); } public void invalidPassphrase() { invalid("Incorrect Passphrase. Please try again..."); } public void error(String message) { setOpaque(true); setBackground(ERROR); setText(message); } public void error(Exception e) { if (e.getCause() == null) error(e.getLocalizedMessage()); else error(e.getCause().getLocalizedMessage()); } public void clear() { setBackground(orig); setText(" "); setOpaque(false); } private final Color orig; public static final Color INFO = new Color(200, 200, 200); public static final Color ERROR = Color.RED; public static final Color INVALID = Color.PINK; } Index: KeyStoreDialog.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/swing/KeyStoreDialog.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** KeyStoreDialog.java 13 Apr 2004 17:32:05 -0000 1.3 --- KeyStoreDialog.java 14 Apr 2004 00:10:51 -0000 1.4 *************** *** 33,36 **** --- 33,41 ---- $Id$ $Log$ + Revision 1.4 2004/04/14 00:10:51 pelle + Added a MessageLabel for handling errors, validation and info + Save works well now. + It's pretty much there I think. + Revision 1.3 2004/04/13 17:32:05 pelle Now has save dialog *************** *** 73,76 **** --- 78,82 ---- cancel = new JButton("Cancel"); newId = new JButton("New ID ..."); + message = new MessageLabel(); save = new JButton("Save ..."); remember = new JCheckBox("remember passphrase in current session", prefs.getBoolean(REMEMBER_PASSPHRASE, false)); *************** *** 78,92 **** list.setBorder(BorderFactory.createLoweredBevelBorder()); 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(); nad = new NewAliasDialog(this); cancel.addActionListener(new ActionListener() { --- 84,101 ---- list.setBorder(BorderFactory.createLoweredBevelBorder()); passphrase = new JPasswordField(); + frame = new JFrame(); + final URL imageurl = this.getClass().getClassLoader().getResource("org/neuclear/commons/crypto/passphraseagents/neuclear.png"); ! if (imageurl != null) { ! final ImageIcon icon = new ImageIcon(imageurl); ! frame.setIconImage(icon.getImage()); ! this.icon = new JLabel(icon); ! } else icon = new JLabel("NeuClear"); ! frame.setTitle("NeuClear Signing Agent"); ! frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); ! frame.getContentPane().add(buildPanel()); ! frame.pack(); nad = new NewAliasDialog(this); cancel.addActionListener(new ActionListener() { *************** *** 94,98 **** synchronized (passphrase) { passphrase.setText(""); ! dialog.hide(); runner.cancel(); } --- 103,107 ---- synchronized (passphrase) { passphrase.setText(""); ! frame.hide(); runner.cancel(); } *************** *** 136,139 **** --- 145,150 ---- */ public void valueChanged(ListSelectionEvent e) { + if (list.getModel().getSize() == 0) + return; lastSelected = (String) list.getSelectedValue(); if (remember.isSelected() && cache.containsKey(lastSelected)) *************** *** 159,163 **** */ public void actionPerformed(ActionEvent e) { ! new Thread(new SaveKeyStore(signer)).start(); } --- 170,174 ---- */ public void actionPerformed(ActionEvent e) { ! SaveKeyStore.saveAs(signer, message); } *************** *** 184,188 **** fillAliasList(); list.setSelectedValue(alias, true); ! dialog.pack(); } } --- 195,202 ---- fillAliasList(); list.setSelectedValue(alias, true); ! message.info(alias + " added"); ! frame.pack(); ! SaveKeyStore.save(signer, message); ! } } *************** *** 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(); --- 204,208 ---- private Component buildPanel() { FormLayout layout = new FormLayout("right:pref, 3dlu, pref:grow ", ! "pref,3dlu,pref, 3dlu, fill:pref:grow, 3dlu, pref, 3dlu, pref,3dlu, pref, 7dlu, pref"); PanelBuilder builder = new PanelBuilder(layout); CellConstraints cc = new CellConstraints(); *************** *** 197,205 **** builder.add(icon, cc.xyw(1, 5, 1, CellConstraints.LEFT, CellConstraints.TOP)); builder.addSeparator("Identities", cc.xyw(1, 3, 3)); builder.add(list, cc.xyw(3, 5, 1)); ! 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(); --- 211,221 ---- builder.add(icon, cc.xyw(1, 5, 1, CellConstraints.LEFT, CellConstraints.TOP)); + icon.setLabelFor(list); builder.addSeparator("Identities", cc.xyw(1, 3, 3)); builder.add(list, cc.xyw(3, 5, 1)); ! builder.addLabel("Passphrase:", cc.xy(1, 7)).setLabelFor(passphrase); builder.add(passphrase, cc.xy(3, 7)); builder.add(remember, cc.xy(3, 9)); + builder.add(message, cc.xyw(1, 11, 3)); ButtonBarBuilder bb = new ButtonBarBuilder(); *************** *** 210,214 **** bb.addGridded(sign); bb.addGridded(cancel); ! builder.add(bb.getPanel(), cc.xyw(1, 11, 3)); return builder.getPanel(); --- 226,230 ---- bb.addGridded(sign); bb.addGridded(cancel); ! builder.add(bb.getPanel(), cc.xyw(1, 13, 3)); return builder.getPanel(); *************** *** 234,239 **** } ! JDialog getDialog() { ! return dialog; } --- 250,255 ---- } ! JFrame getFrame() { ! return frame; } *************** *** 252,259 **** private final JButton newId; private final JButton save; private final JCheckBox remember; private final JList list; private final JPasswordField passphrase; ! private final JDialog dialog; private final NewAliasDialog nad; private final Map cache; --- 268,276 ---- private final JButton newId; private final JButton save; + private final MessageLabel message; private final JCheckBox remember; private final JList list; private final JPasswordField passphrase; ! private final JFrame frame; private final NewAliasDialog nad; private final Map cache; *************** *** 268,271 **** --- 285,289 ---- this.cb = cb; this.bs = bs; + this.invalid = false; } *************** *** 274,287 **** 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(); sign.setEnabled(false); } --- 292,313 ---- signer = bs; fillAliasList(); ! if (list.getModel().getSize() > 0) { ! list.setSelectedValue(prefs.get(DEFAULT_ALIAS, ""), true); ! if (list.getSelectedIndex() == -1) ! list.setSelectedIndex(0); ! if (remember.isSelected() && (list.getSelectedIndex() != -1) ! && cache.containsKey(list.getSelectedValue())) ! passphrase.setText((String) cache.get(list.getSelectedValue())); ! else ! passphrase.setText(""); ! } else passphrase.setText(""); ! if (invalid) ! message.invalidPassphrase(); ! else ! message.clear(); ! passphrase.requestFocus(); ! frame.pack(); ! frame.show(); sign.setEnabled(false); } *************** *** 298,309 **** } - dialog.hide(); char phrase[] = passphrase.getPassword(); passphrase.setText(""); try { ! //Todo handle when an alias hasnt been selected ! setResult(signer.sign(list.getSelectedValue().toString(), phrase, data, cb)); } catch (InvalidPassphraseException e) { run(); } --- 324,339 ---- } char phrase[] = passphrase.getPassword(); passphrase.setText(""); try { ! final byte[] sig = signer.sign(list.getSelectedValue().toString(), phrase, data, cb); ! invalid = false; ! frame.hide(); ! setResult(sig); } catch (InvalidPassphraseException e) { + invalid = true; run(); + } catch (Exception e) { + message.error(e); } *************** *** 314,317 **** --- 344,348 ---- private final SetPublicKeyCallBack cb; private final BrowsableSigner bs; + private boolean invalid = false; } --- NEW FILE: NewPassphraseDialog.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: NewPassphraseDialog.java,v 1.1 2004/04/14 00:10:51 pelle Exp $ $Log: NewPassphraseDialog.java,v $ Revision 1.1 2004/04/14 00:10:51 pelle Added a MessageLabel for handling errors, validation and info Save works well now. It's pretty much there I think. 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. 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 NewPassphraseDialog { public NewPassphraseDialog() { 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("Save"); ok.setEnabled(false); cancel = new JButton("Cancel"); alias = new JLabel(); passphrase = new JPasswordField(); passphrase2 = 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"); message = new MessageLabel(); 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); passphrase2.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); passphrase2.addKeyListener(validate); } private Component buildPanel() { FormLayout layout = new FormLayout("right:pref, 3dlu, pref:grow ", "pref,3dlu,pref, 3dlu, fill:pref:grow, 3dlu, pref,3dlu, pref,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 new passphrase", cc.xyw(1, 3, 3)); builder.addLabel("name:", cc.xy(1, 5)).setLabelFor(alias); builder.add(alias, cc.xy(3, 5)); builder.addLabel("Passphrase:", cc.xy(1, 7)).setLabelFor(passphrase); builder.add(passphrase, cc.xy(3, 7)); builder.addLabel("Repeat Passphrase:", cc.xy(1, 9)).setLabelFor(passphrase2); builder.add(passphrase2, cc.xy(3, 9)); builder.add(message, cc.xyw(1, 11, 3)); ButtonBarBuilder bb = new ButtonBarBuilder(); bb.addGlue(); bb.addUnrelatedGap(); bb.addGridded(ok); bb.addGridded(cancel); builder.add(bb.getPanel(), cc.xyw(1, 13, 3)); return builder.getPanel(); } private boolean validate() { char[] p1 = passphrase.getPassword(); char[] p2 = passphrase2.getPassword(); if (p1 == null || p2 == null || p1.length == 0 || p2.length == 0) { message.invalid("Please enter your new matching passphrases"); return false; } if (p1.length != p2.length) { message.invalid("Both passphrases must be the same"); return false; } message.clear(); return true;//new String(p1).equals(new String(p2)); } public WaitForInput createGetNewPassphraseTask(String name) { return new NewPassPhraseRunner(name); } private final JButton ok; private final JButton cancel; private final JLabel alias; private final JPasswordField passphrase; private final JPasswordField passphrase2; private final JDialog dialog; private final JLabel icon; private final MessageLabel message; private WaitForInput runner; class NewPassPhraseRunner extends WaitForInput { public NewPassPhraseRunner(final String alias) { this.req = alias; } public void run() { runner = this; ok.setEnabled(false); alias.setText(req); dialog.pack(); dialog.show(); System.out.println(Thread.currentThread()); } public void execute() { dialog.hide(); final char[] phrase = passphrase.getPassword(); passphrase.setText(""); setResult(phrase); } private final String req; } } Index: SimpleDialog.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/swing/SimpleDialog.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SimpleDialog.java 13 Apr 2004 17:32:05 -0000 1.3 --- SimpleDialog.java 14 Apr 2004 00:10:52 -0000 1.4 *************** *** 18,21 **** --- 18,26 ---- $Id$ $Log$ + Revision 1.4 2004/04/14 00:10:52 pelle + Added a MessageLabel for handling errors, validation and info + Save works well now. + It's pretty much there I think. + Revision 1.3 2004/04/13 17:32:05 pelle Now has save dialog *************** *** 54,57 **** --- 59,63 ---- alias = new JLabel(); passphrase = new JPasswordField(); + message = new MessageLabel(); final URL imageurl = this.getClass().getClassLoader().getResource("org/neuclear/commons/crypto/passphraseagents/neuclear.png"); if (imageurl != null) *************** *** 108,112 **** 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(); --- 114,118 ---- 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(); *************** *** 116,123 **** 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(); --- 122,131 ---- 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)).setLabelFor(alias); builder.add(alias, cc.xy(3, 5)); ! builder.addLabel("Passphrase:", cc.xy(1, 7)).setLabelFor(passphrase); builder.add(passphrase, cc.xy(3, 7)); + builder.add(message, cc.xyw(1, 9, 3)); + ButtonBarBuilder bb = new ButtonBarBuilder(); *************** *** 126,130 **** bb.addGridded(ok); bb.addGridded(cancel); ! builder.add(bb.getPanel(), cc.xyw(1, 9, 3)); return builder.getPanel(); --- 134,138 ---- bb.addGridded(ok); bb.addGridded(cancel); ! builder.add(bb.getPanel(), cc.xyw(1, 11, 3)); return builder.getPanel(); *************** *** 140,143 **** --- 148,152 ---- } + private final JButton ok; private final JButton cancel; *************** *** 146,150 **** private final JDialog dialog; private final JLabel icon; ! private DialogRunner runner; class DialogRunner extends WaitForInput { --- 155,160 ---- private final JDialog dialog; private final JLabel icon; ! private final MessageLabel message; ! private WaitForInput runner; class DialogRunner extends WaitForInput { *************** *** 157,160 **** --- 167,172 ---- runner = this; alias.setText(req); + if (incorrect) + message.invalid("You entered an invalid passphrase. Try again..."); dialog.pack(); dialog.show(); Index: NewAliasDialog.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/swing/NewAliasDialog.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** NewAliasDialog.java 13 Apr 2004 17:32:05 -0000 1.4 --- NewAliasDialog.java 14 Apr 2004 00:10:51 -0000 1.5 *************** *** 17,20 **** --- 17,25 ---- $Id$ $Log$ + Revision 1.5 2004/04/14 00:10:51 pelle + Added a MessageLabel for handling errors, validation and info + Save works well now. + It's pretty much there I think. + Revision 1.4 2004/04/13 17:32:05 pelle Now has save dialog *************** *** 57,64 **** 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); --- 62,71 ---- passphrase1 = new JPasswordField(); passphrase2 = new JPasswordField(); + message = new MessageLabel(); + progress = new JProgressBar(0, 100); progress.setIndeterminate(true); progress.setVisible(true); ! dialog = new JDialog(agent.getFrame(), true); dialog.setTitle("NeuClear Signing Agent"); dialog.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); *************** *** 131,144 **** private boolean validate() { ! if (alias.getText().length() == 0) return false; char[] p1 = passphrase1.getPassword(); char[] p2 = passphrase2.getPassword(); ! if (p1 == null || p2 == null) ! return false; ! if (p1.length != p2.length) return false; ! if (p1.length == 0) return false; return true;//new String(p1).equals(new String(p2)); } --- 138,156 ---- private boolean validate() { ! if (alias.getText().length() == 0) { ! message.invalid("Please enter your new Identity Name"); return false; + } char[] p1 = passphrase1.getPassword(); char[] p2 = passphrase2.getPassword(); ! if (p1 == null || p2 == null || p1.length == 0 || p2.length == 0) { ! message.invalid("Please enter your new matching passphrases"); return false; ! } ! if (p1.length != p2.length) { ! message.invalid("Both passphrases must be the same"); return false; + } + message.clear(); return true;//new String(p1).equals(new String(p2)); } *************** *** 146,150 **** private JPanel buildPanel() { FormLayout layout = new FormLayout("right:pref, 3dlu, 100dlu:grow ", ! "pref,3dlu,pref, 3dlu, pref, 3dlu, pref, 7dlu, pref"); PanelBuilder builder = new PanelBuilder(layout); CellConstraints cc = new CellConstraints(); --- 158,162 ---- private JPanel buildPanel() { FormLayout layout = new FormLayout("right:pref, 3dlu, 100dlu:grow ", ! "pref,3dlu,pref, 3dlu, pref, 3dlu, pref,3dlu, pref, 7dlu, pref"); PanelBuilder builder = new PanelBuilder(layout); CellConstraints cc = new CellConstraints(); *************** *** 153,163 **** builder.addSeparator("Create alias", cc.xyw(1, 1, 3)); ! builder.addLabel("Alias:", cc.xy(1, 3)); builder.add(alias, cc.xy(3, 3)); ! builder.addLabel("Passphrase:", cc.xy(1, 5)); builder.add(passphrase1, cc.xy(3, 5)); ! 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(); --- 165,176 ---- builder.addSeparator("Create alias", cc.xyw(1, 1, 3)); ! builder.addLabel("Alias:", cc.xy(1, 3)).setLabelFor(alias); builder.add(alias, cc.xy(3, 3)); ! builder.addLabel("Passphrase:", cc.xy(1, 5)).setLabelFor(passphrase1); builder.add(passphrase1, cc.xy(3, 5)); ! builder.addLabel("(Repeat) Passphrase:", cc.xy(1, 7)).setLabelFor(passphrase2); builder.add(passphrase2, cc.xy(3, 7)); ! builder.add(message, cc.xyw(1, 9, 3)); ! ButtonBarBuilder bb = new ButtonBarBuilder(); bb.addGlue(); *************** *** 165,169 **** bb.addGridded(ok); bb.addGridded(cancel); ! builder.add(bb.getPanel(), cc.xyw(1, 9, 3)); return builder.getPanel(); --- 178,182 ---- bb.addGridded(ok); bb.addGridded(cancel); ! builder.add(bb.getPanel(), cc.xyw(1, 11, 3)); return builder.getPanel(); *************** *** 208,211 **** --- 221,228 ---- cancel.setEnabled(true); passphrase1.setEnabled(true); + alias.setText(""); + alias.setEnabled(true); + passphrase1.setText(""); + passphrase2.setText(""); alias.setEnabled(true); passphrase2.setEnabled(true); *************** *** 256,259 **** --- 273,277 ---- private JPanel regular; private JPanel process; + private MessageLabel message; } |
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4424/src/java/org/neuclear/commons/crypto/passphraseagents Modified Files: ConsoleAgent.java GuiDialogAgent.java InteractiveAgent.java ServletPassPhraseAgent.java Log Message: Added a MessageLabel for handling errors, validation and info Save works well now. It's pretty much there I think. Index: GuiDialogAgent.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/GuiDialogAgent.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** GuiDialogAgent.java 13 Apr 2004 18:14:02 -0000 1.11 --- GuiDialogAgent.java 14 Apr 2004 00:10:52 -0000 1.12 *************** *** 33,36 **** --- 33,41 ---- $Id$ $Log$ + Revision 1.12 2004/04/14 00:10:52 pelle + Added a MessageLabel for handling errors, validation and info + Save works well now. + It's pretty much there I think. + Revision 1.11 2004/04/13 18:14:02 pelle added open dialog to swing agent and interactive agent *************** *** 298,301 **** --- 303,310 ---- } + public char[] getNewPassPhrase(String name) throws UserCancellationException { + return new char[0]; + } + 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.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ConsoleAgent.java 13 Apr 2004 18:14:02 -0000 1.7 --- ConsoleAgent.java 14 Apr 2004 00:10:52 -0000 1.8 *************** *** 32,35 **** --- 32,40 ---- $Id$ $Log$ + Revision 1.8 2004/04/14 00:10:52 pelle + Added a MessageLabel for handling errors, validation and info + Save works well now. + It's pretty much there I think. + Revision 1.7 2004/04/13 18:14:02 pelle added open dialog to swing agent and interactive agent *************** *** 182,184 **** --- 187,193 ---- } + public char[] getNewPassPhrase(String name) throws UserCancellationException { + return new char[0]; + } + } Index: InteractiveAgent.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/InteractiveAgent.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** InteractiveAgent.java 13 Apr 2004 18:14:02 -0000 1.7 --- InteractiveAgent.java 14 Apr 2004 00:10:52 -0000 1.8 *************** *** 26,29 **** --- 26,34 ---- $Id$ $Log$ + Revision 1.8 2004/04/14 00:10:52 pelle + Added a MessageLabel for handling errors, validation and info + Save works well now. + It's pretty much there I think. + Revision 1.7 2004/04/13 18:14:02 pelle added open dialog to swing agent and interactive agent *************** *** 85,87 **** --- 90,94 ---- File getOpenFileName(String title, String def) throws UserCancellationException; + char[] getNewPassPhrase(String name) throws UserCancellationException; + } Index: ServletPassPhraseAgent.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/passphraseagents/ServletPassPhraseAgent.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ServletPassPhraseAgent.java 13 Apr 2004 18:14:02 -0000 1.8 --- ServletPassPhraseAgent.java 14 Apr 2004 00:10:52 -0000 1.9 *************** *** 84,86 **** --- 84,90 ---- return null; } + + public char[] getNewPassPhrase(String name) throws UserCancellationException { + return new char[0]; + } } |
|
From: Pelle B. <pe...@us...> - 2004-04-14 00:11:32
|
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4424/src/java/org/neuclear/commons/crypto Modified Files: CryptoTools.java Log Message: Added a MessageLabel for handling errors, validation and info Save works well now. It's pretty much there I think. Index: CryptoTools.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/CryptoTools.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** CryptoTools.java 9 Apr 2004 20:02:54 -0000 1.20 --- CryptoTools.java 14 Apr 2004 00:10:52 -0000 1.21 *************** *** 2,5 **** --- 2,10 ---- * $Id$ * $Log$ + * Revision 1.21 2004/04/14 00:10:52 pelle + * Added a MessageLabel for handling errors, validation and info + * Save works well now. + * It's pretty much there I think. + * * Revision 1.20 2004/04/09 20:02:54 pelle * Added PrivateKey wrapping and unwrapping to CryptoTools with the methods: *************** *** 935,939 **** private static SecureRandom randSource; ! public final static String DEFAULT_KEYSTORE = System.getProperty("user.home") + "/.neuclear/keystore.jks"; public static final int RAND_BIT_LENGTH = 128; private static final long YPLUS20 = 20 * 365 * 24 * 60 * 60; --- 940,944 ---- private static SecureRandom randSource; ! public final static String DEFAULT_KEYSTORE = System.getProperty("user.home") + "/.neuclear/identities.jks"; public static final int RAND_BIT_LENGTH = 128; private static final long YPLUS20 = 20 * 365 * 24 * 60 * 60; |
|
From: Pelle B. <pe...@us...> - 2004-04-14 00:11:32
|
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/signers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4424/src/java/org/neuclear/commons/crypto/signers Modified Files: DefaultSigner.java JCESigner.java ServletSignerFactory.java Log Message: Added a MessageLabel for handling errors, validation and info Save works well now. It's pretty much there I think. Index: JCESigner.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/signers/JCESigner.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** JCESigner.java 13 Apr 2004 17:32:07 -0000 1.23 --- JCESigner.java 14 Apr 2004 00:10:52 -0000 1.24 *************** *** 2,5 **** --- 2,10 ---- * $Id$ * $Log$ + * Revision 1.24 2004/04/14 00:10:52 pelle + * Added a MessageLabel for handling errors, validation and info + * Save works well now. + * It's pretty much there I think. + * * Revision 1.23 2004/04/13 17:32:07 pelle * Now has save dialog *************** *** 446,450 **** throw new LowLevelException(e); } catch (KeyStoreException e) { - // Could try to reload it here but I wont for now throw new LowLevelException(e); } catch (CryptoException e) { --- 451,454 ---- *************** *** 467,471 **** } ! public void save() { try { save(filename); --- 471,475 ---- } ! public void save() throws UserCancellationException { try { save(filename); *************** *** 475,479 **** } ! public synchronized final void save(String filename) throws FileNotFoundException { if (Utility.isEmpty(filename)) throw new FileNotFoundException("no keystore filename"); --- 479,487 ---- } ! public synchronized final void save(String filename) throws FileNotFoundException, UserCancellationException { ! save(filename, agent.getPassPhrase(filename)); ! } ! ! public synchronized final void save(String filename, char passphrase[]) throws FileNotFoundException { if (Utility.isEmpty(filename)) throw new FileNotFoundException("no keystore filename"); *************** *** 482,486 **** ksfile.getParentFile().mkdirs(); System.out.println(Thread.currentThread()); ! ks.store(new FileOutputStream(ksfile), agent.getPassPhrase(filename)); } catch (Exception e) { throw new LowLevelException(e); --- 490,494 ---- ksfile.getParentFile().mkdirs(); System.out.println(Thread.currentThread()); ! ks.store(new FileOutputStream(ksfile), passphrase); } catch (Exception e) { throw new LowLevelException(e); *************** *** 509,513 **** private final KeyCache cache; private final PassPhraseAgent agent; - private final KeyPairGenerator kpg; private String filename; --- 517,520 ---- Index: DefaultSigner.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/signers/DefaultSigner.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** DefaultSigner.java 13 Apr 2004 17:32:07 -0000 1.8 --- DefaultSigner.java 14 Apr 2004 00:10:52 -0000 1.9 *************** *** 1,4 **** --- 1,5 ---- package org.neuclear.commons.crypto.signers; + import org.neuclear.commons.LowLevelException; import org.neuclear.commons.crypto.CryptoException; import org.neuclear.commons.crypto.CryptoTools; *************** *** 6,11 **** import org.neuclear.commons.crypto.passphraseagents.UserCancellationException; ! import java.io.File; ! import java.io.IOException; import java.security.KeyStoreException; import java.security.PublicKey; --- 7,11 ---- import org.neuclear.commons.crypto.passphraseagents.UserCancellationException; ! import java.io.*; import java.security.KeyStoreException; import java.security.PublicKey; *************** *** 34,37 **** --- 34,42 ---- $Id$ $Log$ + Revision 1.9 2004/04/14 00:10:52 pelle + Added a MessageLabel for handling errors, validation and info + Save works well now. + It's pretty much there I think. + Revision 1.8 2004/04/13 17:32:07 pelle Now has save dialog *************** *** 92,95 **** --- 97,109 ---- if (file.exists() && file.length() == 0) file.delete(); // Delete empty file + InputStream is = null; + if (file.exists()) { + passphrase = agent.getPassPhrase(filename); + try { + is = new FileInputStream(file); + } catch (FileNotFoundException e) { + throw new LowLevelException(e); + } + } try { prefs.flush(); *************** *** 97,102 **** e.printStackTrace(); } ! signer = new JCESigner(filename, "jks", "SUN", agent); } --- 111,128 ---- e.printStackTrace(); } ! if (passphrase != null) ! signer = loadSigner(is, agent); ! else ! signer = new JCESigner(filename, is, "jks", "SUN", agent); ! ! ! } + private JCESigner loadSigner(InputStream is, final InteractiveAgent agent) throws InvalidPassphraseException { + try { + return new JCESigner(filename, is, "jks", "SUN", agent, passphrase); + } catch (InvalidPassphraseException e) { + return loadSigner(is, agent); + } } *************** *** 139,142 **** --- 165,178 ---- public void save() { try { + save(false); + } catch (IOException e) { + throw new LowLevelException(e); + } catch (UserCancellationException e) { + throw new LowLevelException(e); + } + } + + public void save(final boolean force) throws IOException, UserCancellationException { + if (force || filename == null) { filename = agent.getSaveToFileName("Save Keys... ", filename).getCanonicalPath(); prefs.put(KEYSTORE, filename); *************** *** 146,155 **** e.printStackTrace(); } - signer.save(filename); - } catch (IOException e) { - e.printStackTrace(); - } catch (UserCancellationException e) { - e.printStackTrace(); } } --- 182,190 ---- e.printStackTrace(); } } + if (force || passphrase == null || passphrase.length == 0) + passphrase = agent.getNewPassPhrase(filename); + System.out.println("Saving " + filename); + signer.save(filename, passphrase); } *************** *** 163,166 **** --- 198,202 ---- private Preferences prefs; private static final String KEYSTORE = "KEYSTORE"; + private char passphrase[] = null; } |
|
From: Pelle B. <pe...@us...> - 2004-04-14 00:11:03
|
Update of /cvsroot/neuclear/neuclear-commons In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4424 Modified Files: project.properties Log Message: Added a MessageLabel for handling errors, validation and info Save works well now. It's pretty much there I think. Index: project.properties =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/project.properties,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** project.properties 12 Apr 2004 23:50:08 -0000 1.18 --- project.properties 14 Apr 2004 00:10:53 -0000 1.19 *************** *** 2,6 **** # P R O J E C T P R O P E R T I E S # ------------------------------------------------------------------- ! #maven.test.skip=true maven.compile.debug = on --- 2,6 ---- # P R O J E C T P R O P E R T I E S # ------------------------------------------------------------------- ! maven.test.skip=true maven.compile.debug = on *************** *** 22,24 **** #maven.ui.property.file = ui.properties maven.repo.remote = http://www.ibiblio.org/maven/,http://dist.codehaus.org/,http://old.neuclear.org/maven/ ! maven.uberjar.main = org.neuclear.commons.crypto.passphraseagents.ConsoleAgent --- 22,26 ---- #maven.ui.property.file = ui.properties maven.repo.remote = http://www.ibiblio.org/maven/,http://dist.codehaus.org/,http://old.neuclear.org/maven/ ! #maven.uberjar.main = org.neuclear.commons.crypto.passphraseagents.ConsoleAgent ! ! maven.javaapp.mainclass = org.neuclear.commons.crypto.passphraseagents.swing.SwingAgent |
|
From: Pelle B. <pe...@us...> - 2004-04-14 00:10:40
|
Update of /cvsroot/neuclear/neuclear-signer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4377 Modified Files: project.xml Log Message: Added a MessageLabel for handling errors, validation and info Save works well now. It's pretty much there I think. Index: project.xml =================================================================== RCS file: /cvsroot/neuclear/neuclear-signer/project.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** project.xml 9 Apr 2004 18:40:35 -0000 1.9 --- project.xml 14 Apr 2004 00:10:30 -0000 1.10 *************** *** 64,68 **** <id>neuclear-xmlsig</id> <name>neuclear-xmlsig</name> ! <version>0.12</version> <properties> <war.bundle>true</war.bundle> --- 64,68 ---- <id>neuclear-xmlsig</id> <name>neuclear-xmlsig</name> ! <version>0.13-SNAPSHOT</version> <properties> <war.bundle>true</war.bundle> *************** *** 80,84 **** <id>neuclear-commons</id> <name>neuclear-commons</name> ! <version>0.6.1-SNAPSHOT</version> <properties> <war.bundle>true</war.bundle> --- 80,84 ---- <id>neuclear-commons</id> <name>neuclear-commons</name> ! <version>0.7-SNAPSHOT</version> <properties> <war.bundle>true</war.bundle> *************** *** 129,132 **** --- 129,159 ---- <version>1.0</version> </dependency> + <dependency> + <groupId>jgoodies</groupId> + <artifactId>forms</artifactId> + + <version>1.0.4</version> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <dependency> + <groupId>jgoodies</groupId> + <artifactId>looks</artifactId> + + <version>1.2.0</version> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <dependency> + <groupId>jgoodies</groupId> + <artifactId>plastic</artifactId> + <version>1.2.0</version> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + </dependencies> <build> |