[Webfunds-commits] java/webfunds/client/contracts/wizard KeyContract.java KeyPanel.java KeyServer.java KeyTop.java

Jeroen C. van Gelderen gelderen@cypherpunks.ai
Sat, 26 Aug 2000 14:56:15 -0400 (AST)


gelderen    00/08/26 14:56:14

  Modified:    webfunds/client/contracts/wizard KeyContract.java
                        KeyPanel.java KeyServer.java KeyTop.java
  Log:
  Replace loadAndCheckKey(x, y) with loadAndCheck[Private|Public]Key(x).

Revision  Changes    Path
1.6       +4 -5      java/webfunds/client/contracts/wizard/KeyContract.java

Index: KeyContract.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/contracts/wizard/KeyContract.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- KeyContract.java	2000/08/21 18:11:49	1.5
+++ KeyContract.java	2000/08/26 18:56:14	1.6
@@ -1,5 +1,5 @@
 /*
- * $Id: KeyContract.java,v 1.5 2000/08/21 18:11:49 iang Exp $
+ * $Id: KeyContract.java,v 1.6 2000/08/26 18:56:14 gelderen Exp $
  *
  * Copyright (c) Systemics Inc 2000 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -23,7 +23,7 @@
  * Panel that asks for the contract key
  *
  * @author Edwin Woudt <edwin@webfunds.org>
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
  */
 
 public class KeyContract extends KeyPanel 
@@ -268,8 +268,7 @@
 
     public boolean next() {
 
-        
-        String key = loadAndCheckKey(txtFile.getText(), false);
+        String key = loadAndCheckPublicKey(txtFile.getText());
 
         if (key != null) {
             data.setPublicContractKey(key);
@@ -278,7 +277,7 @@
         }
 
         
-        String key2 = loadAndCheckKey(txtFile2.getText(), true);
+        String key2 = loadAndCheckPrivateKey(txtFile2.getText());
 
         if (key2 != null) {
             data.setSecretContractKey(key2);



1.5       +15 -4     java/webfunds/client/contracts/wizard/KeyPanel.java

Index: KeyPanel.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/contracts/wizard/KeyPanel.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- KeyPanel.java	2000/08/21 17:05:03	1.4
+++ KeyPanel.java	2000/08/26 18:56:14	1.5
@@ -1,5 +1,5 @@
 /*
- * $Id: KeyPanel.java,v 1.4 2000/08/21 17:05:03 edwin Exp $
+ * $Id: KeyPanel.java,v 1.5 2000/08/26 18:56:14 gelderen Exp $
  *
  * Copyright (c) Systemics Inc 2000 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -29,12 +29,23 @@
  * Abstract superclass for all panels in a wizard.
  *
  * @author Edwin Woudt <edwin@webfunds.org>
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
  */
 
 public abstract class KeyPanel extends WizardPanel {
-  
-    protected String loadAndCheckKey(String filename, boolean secret) {
+
+
+    protected String loadAndCheckPublicKey(String filename) {
+        return loadAndCheckKey(filename, false);
+    }
+
+
+    protected String loadAndCheckPrivateKey(String filename) {
+        return loadAndCheckKey(filename, true);
+    }
+
+
+    private String loadAndCheckKey(String filename, boolean secret) {
         
         if (!filename.equals("")) {
             



1.6       +3 -3      java/webfunds/client/contracts/wizard/KeyServer.java

Index: KeyServer.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/contracts/wizard/KeyServer.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- KeyServer.java	2000/08/21 18:11:49	1.5
+++ KeyServer.java	2000/08/26 18:56:14	1.6
@@ -1,5 +1,5 @@
 /*
- * $Id: KeyServer.java,v 1.5 2000/08/21 18:11:49 iang Exp $
+ * $Id: KeyServer.java,v 1.6 2000/08/26 18:56:14 gelderen Exp $
  *
  * Copyright (c) Systemics Inc 2000 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -23,7 +23,7 @@
  * Panel that asks for the server certification key
  *
  * @author Edwin Woudt <edwin@webfunds.org>
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
  */
 
 public class KeyServer extends KeyPanel 
@@ -154,7 +154,7 @@
 
     public boolean next() {
         
-        String key = loadAndCheckKey(txtFile.getText(), false);
+        String key = loadAndCheckPublicKey(txtFile.getText());
 
         if (key != null) {
             data.setServerKey(key);



1.6       +3 -3      java/webfunds/client/contracts/wizard/KeyTop.java

Index: KeyTop.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/contracts/wizard/KeyTop.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- KeyTop.java	2000/08/21 18:11:49	1.5
+++ KeyTop.java	2000/08/26 18:56:14	1.6
@@ -1,5 +1,5 @@
 /*
- * $Id: KeyTop.java,v 1.5 2000/08/21 18:11:49 iang Exp $
+ * $Id: KeyTop.java,v 1.6 2000/08/26 18:56:14 gelderen Exp $
  *
  * Copyright (c) Systemics Inc 2000 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -20,7 +20,7 @@
  * Panel that asks for the toplevel certification key
  *
  * @author Edwin Woudt <edwin@webfunds.org>
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
  */
 
 public class KeyTop extends KeyPanel 
@@ -198,7 +198,7 @@
 
     public boolean next() {
         
-        String key = loadAndCheckKey(txtFile.getText(), false);
+        String key = loadAndCheckPublicKey(txtFile.getText());
 
         if (key != null) {
             data.setTopLevelKey(key);