[Webfunds-commits] java/webfunds/client/contracts CreateCertPanel.java
Jeroen C. van Gelderen
gelderen@cypherpunks.ai
Thu, 6 Jul 2000 13:15:41 -0400 (AST)
gelderen 00/07/06 13:15:41
Modified: webfunds/client/contracts CreateCertPanel.java
Log:
Lobotomize as I don't have time for complete removal.
Revision Changes Path
1.5 +2 -63 java/webfunds/client/contracts/CreateCertPanel.java
Index: CreateCertPanel.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/contracts/CreateCertPanel.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- CreateCertPanel.java 1999/11/27 15:58:41 1.4
+++ CreateCertPanel.java 2000/07/06 17:15:40 1.5
@@ -1,5 +1,5 @@
/*
- * $Id: CreateCertPanel.java,v 1.4 1999/11/27 15:58:41 iang Exp $
+ * $Id: CreateCertPanel.java,v 1.5 2000/07/06 17:15:40 gelderen Exp $
*
* Copyright (c) Systemics Ltd 1995-1999 on behalf of
* the WebFunds Development Team. All Rights Reserved.
@@ -109,68 +109,7 @@
public CertPackage save(CertPackage signer)
{
- String fn = ReadCertPanel.cleanFileName(filename.getText());
- String cn = certname.getText();
- if (fn == null || "".equals(cn))
- return null;
-
- CertPackage cp = null;
-
- //
- // Need file handles for the cert and for the key.
- //
- File certfile = new File(fn + ".cert");
- File skfile = new File(fn + ".sk");
- if (skfile.exists())
- return null;
- if (certfile.exists())
- return null;
-
- //
- // Create the certificate and secrey key.
- //
- try
- {
- if (signer == null)
- {
- cp = Crypto.getCertPackage(keylen, cn,
- org_unit.getText(), org.getText(), country.getText());
- }
- else
- {
- cp = Crypto.getCertPackage(keylen, cn,
- org_unit.getText(), org.getText(), country.getText(),
- signer.getCert(), signer.getPrivateKey());
- }
- }
- catch (Exception ex)
- {
- ex.printStackTrace(System.err);
- return null;
- }
- X509Cert cert = cp.getCert();
- PrivateKey sk = cp.getPrivateKey();
-
- //
- // Save them to some standard files.
- //
- try
- {
- FileOutputStream certfos = new FileOutputStream(certfile);
- FileOutputStream skfos = new FileOutputStream(skfile);
- certfos.write(Armoury.encodeCert(cert).getBytes());
- skfos.write(Armoury.encodePrivateKey(sk).getBytes());
- certfos.getFD().sync();
- skfos.getFD().sync();
- certfos.close();
- skfos.close();
- }
- catch (Exception ex)
- {
- ex.printStackTrace(System.err);
- return null;
- }
- return cp;
+ throw new RuntimeException("Lobotomized");
}