|
From: <pe...@us...> - 2003-11-20 23:41:39
|
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/test
In directory sc8-pr-cvs1:/tmp/cvs-serv31139/src/java/org/neuclear/commons/test
Modified Files:
JunitTools.java
Log Message:
Getting all the tests to work in id
Removing usage of BC in CryptoTools as it was causing issues.
First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
writing SQL. (Yipee)
Index: JunitTools.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/test/JunitTools.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** JunitTools.java 11 Nov 2003 21:17:48 -0000 1.1
--- JunitTools.java 20 Nov 2003 23:41:36 -0000 1.2
***************
*** 1,14 ****
package org.neuclear.commons.test;
- import org.neuclear.commons.Utility;
- import org.neuclear.commons.crypto.CryptoTools;
import org.neuclear.commons.crypto.CryptoException;
- import java.security.*;
- import java.security.cert.CertificateException;
- import java.io.FileInputStream;
import java.io.File;
! import java.io.FileNotFoundException;
import java.io.IOException;
/**
--- 1,15 ----
package org.neuclear.commons.test;
import org.neuclear.commons.crypto.CryptoException;
+ import org.neuclear.commons.crypto.CryptoTools;
import java.io.File;
! import java.io.FileInputStream;
import java.io.IOException;
+ import java.security.KeyPair;
+ import java.security.KeyStore;
+ import java.security.KeyStoreException;
+ import java.security.NoSuchAlgorithmException;
+ import java.security.cert.CertificateException;
/**
***************
*** 19,22 ****
--- 20,29 ----
* $Id$
* $Log$
+ * Revision 1.2 2003/11/20 23:41:36 pelle
+ * Getting all the tests to work in id
+ * Removing usage of BC in CryptoTools as it was causing issues.
+ * First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
+ * writing SQL. (Yipee)
+ *
* Revision 1.1 2003/11/11 21:17:48 pelle
* Further vital reshuffling.
***************
*** 24,43 ****
* org.neuclear.signers.* as well as org.neuclear.passphraseagents have been moved under org.neuclear.commons.crypto as well.
* Did a bit of work on the Canonicalizer and changed a few other minor bits.
! *
* Revision 1.1 2003/02/21 22:48:18 pelle
* New Test Infrastructure
* Added test keys in src/testdata/keys
* Modified tools to handle these keys
- *
*/
public final class JunitTools {
private static void loadKeys() throws CryptoException {
try {
! // TODO I think the keys are corrupt
! KeyStore ks=KeyStore.getInstance(KeyStore.getDefaultType());
char[] password = "neuclear".toCharArray();
! ks.load(new FileInputStream(new File("src/testdata/keys/testkeys.jks")),password);
! rsakey=CryptoTools.getKeyPair(ks,"rsakey",password);
! dsakey=CryptoTools.getKeyPair(ks,"dsakey",password);
} catch (KeyStoreException e) {
--- 31,49 ----
* org.neuclear.signers.* as well as org.neuclear.passphraseagents have been moved under org.neuclear.commons.crypto as well.
* Did a bit of work on the Canonicalizer and changed a few other minor bits.
! * <p/>
* Revision 1.1 2003/02/21 22:48:18 pelle
* New Test Infrastructure
* Added test keys in src/testdata/keys
* Modified tools to handle these keys
*/
public final class JunitTools {
private static void loadKeys() throws CryptoException {
try {
!
! KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
char[] password = "neuclear".toCharArray();
! ks.load(new FileInputStream(new File("src/testdata/keys/testkeys.jks")), password);
! rsakey = CryptoTools.getKeyPair(ks, "rsakey", password);
! dsakey = CryptoTools.getKeyPair(ks, "dsakey", password);
} catch (KeyStoreException e) {
***************
*** 55,59 ****
public static KeyPair getTestRSAKey() throws CryptoException {
! if (rsakey==null)
loadKeys();
return rsakey;
--- 61,65 ----
public static KeyPair getTestRSAKey() throws CryptoException {
! if (rsakey == null)
loadKeys();
return rsakey;
***************
*** 61,65 ****
public static KeyPair getTestDSAKey() throws CryptoException {
! if (dsakey==null)
loadKeys();
return dsakey;
--- 67,71 ----
public static KeyPair getTestDSAKey() throws CryptoException {
! if (dsakey == null)
loadKeys();
return dsakey;
|