< prev index next >

test/jdk/java/security/KeyStore/PKCS12/Utils.java

Print this page
rev 51638 : [mq]: 8210112


  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 import java.io.FileInputStream;
  27 import java.io.FileOutputStream;
  28 import java.io.IOException;
  29 import java.security.KeyStore;
  30 import java.security.KeyStoreException;
  31 import java.security.NoSuchAlgorithmException;
  32 import java.security.cert.CertificateException;
  33 import java.util.Arrays;
  34 import java.util.List;
  35 import jdk.testlibrary.ProcessTools;
  36 import jdk.testlibrary.OutputAnalyzer;
  37 import jdk.testlibrary.JDKToolFinder;
  38 import static java.lang.System.out;
  39 import java.util.ArrayList;
  40 
  41 /**
  42  * Helper class for creating keystore and executing keytool commands
  43  */
  44 public class Utils {
  45     public enum KeyStoreType {
  46         jks, pkcs12;
  47     }
  48     public static final String DEFAULT_DNAME
  49             = "CN=TestKey, T=FuncTestCertKey, O=Oracle, OU=JDKSQE, C=US";
  50     public static final String DEFAULT_PASSWD = "passwd";
  51     public static final String RSA = "rsa";
  52     public static final String JAVA_HOME = System.getProperty("java.home");
  53     public static final String KEYTOOL = "keytool";
  54     private static final int SUCCESS_EXIT_CODE = 0;
  55 
  56     public static OutputAnalyzer executeKeytoolCommand(String[] command) {




  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 import java.io.FileInputStream;
  27 import java.io.FileOutputStream;
  28 import java.io.IOException;
  29 import java.security.KeyStore;
  30 import java.security.KeyStoreException;
  31 import java.security.NoSuchAlgorithmException;
  32 import java.security.cert.CertificateException;
  33 import java.util.Arrays;
  34 import java.util.List;
  35 import jdk.test.lib.process.ProcessTools;
  36 import jdk.test.lib.process.OutputAnalyzer;
  37 import jdk.testlibrary.JDKToolFinder;
  38 import static java.lang.System.out;
  39 import java.util.ArrayList;
  40 
  41 /**
  42  * Helper class for creating keystore and executing keytool commands
  43  */
  44 public class Utils {
  45     public enum KeyStoreType {
  46         jks, pkcs12;
  47     }
  48     public static final String DEFAULT_DNAME
  49             = "CN=TestKey, T=FuncTestCertKey, O=Oracle, OU=JDKSQE, C=US";
  50     public static final String DEFAULT_PASSWD = "passwd";
  51     public static final String RSA = "rsa";
  52     public static final String JAVA_HOME = System.getProperty("java.home");
  53     public static final String KEYTOOL = "keytool";
  54     private static final int SUCCESS_EXIT_CODE = 0;
  55 
  56     public static OutputAnalyzer executeKeytoolCommand(String[] command) {


< prev index next >