[Webfunds-commits] java/webfunds/sox/test AddCertToContract.java
Ian Grigg
iang@cypherpunks.ai
Thu, 6 Jul 2000 19:12:53 -0400 (AST)
iang 00/07/06 19:12:53
Modified: webfunds/sox/test AddCertToContract.java
Log:
Added back comment, it indicated that the verify needed to be here
(even though the code was junk). These classes are v. old test
classes that are only here for documentary purposes. When rewritten
one day we can remove the lot.
Revision Changes Path
1.5 +13 -3 java/webfunds/sox/test/AddCertToContract.java
Index: AddCertToContract.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/sox/test/AddCertToContract.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- AddCertToContract.java 2000/07/06 16:22:33 1.4
+++ AddCertToContract.java 2000/07/06 23:12:52 1.5
@@ -1,5 +1,5 @@
/*
- * $Id: AddCertToContract.java,v 1.4 2000/07/06 16:22:33 gelderen Exp $
+ * $Id: AddCertToContract.java,v 1.5 2000/07/06 23:12:52 iang Exp $
*
* Copyright (c) Systemics Ltd 1995-1999 on behalf of
* the WebFunds Development Team. All Rights Reserved.
@@ -32,11 +32,21 @@
if(!(par.get("certcert")==null))
{
- certificationcert = Armoury.decodeCert(new String( Utils.getDataFromFile(par.get("certcert") ) ) );
+ certificationcert = Armoury.decodeCert(
+ new String( Utils.getDataFromFile(par.get("certcert") ) ) );
+ /*
+ * now check cert is signed. this is how it was envisaged:
+ *
+ * if (!(Crypto.verifyCertificate(contractcert,
+ * Crypto.getPublicKeyFromCert(certificationcert) )))
+- * throw new KeyException(
+ * "Contractkey is not signed by the certificationkey");
+ */
}
else
{
- if (!(Crypto.verifyCertificate(contractcert, Crypto.getPublicKeyFromCert(contractcert) )))
+ if (!(Crypto.verifyCertificate(contractcert,
+ Crypto.getPublicKeyFromCert(contractcert) )))
throw new KeyException("Contractkey is not signed by itself");
}