summaryrefslogtreecommitdiffstats
path: root/pki/base/java-tools/src/com/netscape/cmstools/ExtJoiner.java
diff options
context:
space:
mode:
Diffstat (limited to 'pki/base/java-tools/src/com/netscape/cmstools/ExtJoiner.java')
-rw-r--r--pki/base/java-tools/src/com/netscape/cmstools/ExtJoiner.java27
1 files changed, 13 insertions, 14 deletions
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/ExtJoiner.java b/pki/base/java-tools/src/com/netscape/cmstools/ExtJoiner.java
index f7f90a52..241eb5cd 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/ExtJoiner.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/ExtJoiner.java
@@ -17,31 +17,29 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.cmstools;
-
import java.io.FileInputStream;
import java.io.IOException;
import netscape.security.util.DerOutputStream;
import netscape.security.util.DerValue;
-
/**
- * This program joins a sequence of extensions together
- * so that the final output can be used in configuration
- * wizard for specifing extra extensions in default
+ * This program joins a sequence of extensions together so that the final output
+ * can be used in configuration wizard for specifing extra extensions in default
* certificates (i.e. CA certificate, SSL certificate).
- *
+ *
* Usage:
+ *
* <pre>
* ExtJoiner \
* &lt;ext_file0&gt; &lt;ext_file1&gt; ... &lt;ext_fileN&gt;
- *
+ *
* where,
* &lt;ext_file&gt; is a file that has the base64
* encoded DER encoding of an X509 Extension
*
* ExtensionSequence ::= SEQUENCE OF Extension;
- *
+ *
* 0 30 142: SEQUENCE {
* 3 30 69: SEQUENCE {
* 5 06 3: OBJECT IDENTIFIER issuerAltName (2 5 29 18)
@@ -61,7 +59,7 @@ import netscape.security.util.DerValue;
* : }
* : }
* </pre>
- *
+ *
* @version $Revision$, $Date$
*/
public class ExtJoiner {
@@ -69,7 +67,8 @@ public class ExtJoiner {
public static void main(String args[]) {
try {
if (args.length == 0) {
- System.out.println("Usage: ExtJoiner <ext_file0> <ext_file1> ... <ext_fileN>");
+ System.out
+ .println("Usage: ExtJoiner <ext_file0> <ext_file1> ... <ext_fileN>");
System.exit(0);
}
DerValue exts[] = new DerValue[args.length];
@@ -82,14 +81,14 @@ public class ExtJoiner {
DerOutputStream out = new DerOutputStream();
out.putSequence(exts);
- System.out.println(com.netscape.osutil.OSUtil.BtoA(out.toByteArray()));
+ System.out.println(com.netscape.osutil.OSUtil.BtoA(out
+ .toByteArray()));
} catch (IOException e) {
System.out.println(e.toString());
}
}
- public static byte[] getFileData(String fileName)
- throws IOException {
+ public static byte[] getFileData(String fileName) throws IOException {
FileInputStream fis = new FileInputStream(fileName);
byte data[] = new byte[fis.available()];
@@ -98,6 +97,6 @@ public class ExtJoiner {
} finally {
fis.close();
}
- return com.netscape.osutil.OSUtil.AtoB(new String(data));
+ return com.netscape.osutil.OSUtil.AtoB(new String(data));
}
}