[Webfunds-commits] lib cryptix-openpgp.jar

Edwin Woudt edwin@cypherpunks.ai
Mon, 28 Aug 2000 09:36:00 -0400 (AST)


edwin       00/08/28 09:36:00

  Modified:    webfunds/client/contracts/wizard FinishSig.java
               webfunds/ricardian Contract.java
               .        cryptix-openpgp.jar
  Log:
  PGPMessage does not throw IOException's anymore (as it should).

Revision  Changes    Path
1.11      +12 -11    java/webfunds/client/contracts/wizard/FinishSig.java

Index: FinishSig.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/contracts/wizard/FinishSig.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- FinishSig.java	2000/08/28 13:02:32	1.10
+++ FinishSig.java	2000/08/28 13:35:58	1.11
@@ -1,5 +1,5 @@
 /*
- * $Id: FinishSig.java,v 1.10 2000/08/28 13:02:32 edwin Exp $
+ * $Id: FinishSig.java,v 1.11 2000/08/28 13:35:58 edwin Exp $
  *
  * Copyright (c) Systemics Inc 2000 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -37,7 +37,7 @@
  * Panel that does the actual signing.
  *
  * @author Edwin Woudt <edwin@webfunds.org>
- * @version $Revision: 1.10 $
+ * @version $Revision: 1.11 $
  */
 
 public class FinishSig extends SignContractWizardPanel
@@ -368,19 +368,20 @@
         String unsignedName = txtFileUnsigned.getText();
         tryWriting(unsignedName, "unsigned contract", all);
 
-        try {
-            // prepare and sign contract
-            String signedContract = PGPMessage.clearSign(all, skey);
+        // prepare and sign contract
+        String signedContract = PGPMessage.clearSign(all, skey);
 
-            // Convert line endings to local format and convert the result into
-            // bytes.
-            PGPArmoury.fixLineEndings(signedContract,
+        // Convert line endings to local format and convert the result into
+        // bytes.
+        PGPArmoury.fixLineEndings(signedContract,
                                           System.getProperty("line.separator"));
+
+        try {
+
             signedBytes = signedContract.getBytes("ISO8859-1");
 
-        } catch (IOException ioe) {
-            throw new InternalError("IOException in "+
-                                    "ByteArray[In|Out]putStream");
+        } catch (UnsupportedEncodingException uee) {
+            throw new InternalError("Unsupported encoding: ISO8859-1");
         }
 
 



1.39      +1 -5      java/webfunds/ricardian/Contract.java

Index: Contract.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/ricardian/Contract.java,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- Contract.java	2000/08/27 21:52:54	1.38
+++ Contract.java	2000/08/28 13:35:59	1.39
@@ -1,4 +1,4 @@
-/* $Id: Contract.java,v 1.38 2000/08/27 21:52:54 iang Exp $
+/* $Id: Contract.java,v 1.39 2000/08/28 13:35:59 edwin Exp $
  *
  * Copyright (c) Systemics Ltd 1995-1999 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -1022,10 +1022,6 @@
         boolean contractSigned;
         try {
             contractSigned = PGPMessage.verifyClearSign(s, contractKey);
-        } catch (IOException ioe) {
-            throw new ContractException(ContractException.SIG_BAD,
-                      "dud code, throws IOEx: " + ioe);
-            // return false;
         } catch (PGPException pe) {
             throw new ContractException(ContractException.SIG_BAD,
                       "Format error in signature - "+pe);