[Webfunds-commits] java/webfunds/ricardian TestBug.java
Ian Grigg
iang@cypherpunks.ai
Sun, 27 Aug 2000 13:42:10 -0400 (AST)
iang 00/08/27 13:42:10
Added: webfunds/ricardian TestBug.java
Log:
for finding the dodgy key bug ... remove when found!
Revision Changes Path
1.1 java/webfunds/ricardian/TestBug.java
Index: TestBug.java
===================================================================
package webfunds.ricardian;
import java.io.*;
import java.security.cert.*;
import webfunds.openpgp.provider.CryptixOpenPGP;
public class TestBug
{
public static void main(String[] arg)
throws Exception
{
if (arg.length != 2)
{
System.err.println("Test Usage: TestBug filename tag");
System.exit(1);
}
File fil = new File(arg[0]);
String tag = arg[1];
FileInputStream fis = new FileInputStream(fil);
byte[] data = new byte[fis.available()];
fis.read(data);
String armoured = new String(data);
java.security.Security.addProvider(new CryptixOpenPGP());
Contract.getOpenPGPCertFromString(armoured, "Test Key", 0, tag);
System.exit(0);
}
}