--- a/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java Tue Jan 26 09:25:53 2016 +0000
+++ b/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java Tue Jan 26 13:32:07 2016 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,16 +28,19 @@
* @author Valerie Peng
* @library ..
* @key randomness
+ * @run main/othervm TestSymmCiphers
+ * @run main/othervm TestSymmCiphers sm
*/
-import java.io.*;
-import java.nio.*;
-import java.util.*;
-import java.security.*;
-import java.security.spec.AlgorithmParameterSpec;
-
-import javax.crypto.*;
-import javax.crypto.spec.IvParameterSpec;
+import java.io.ByteArrayOutputStream;
+import java.nio.ByteBuffer;
+import java.security.AlgorithmParameters;
+import java.security.NoSuchAlgorithmException;
+import java.security.Provider;
+import java.util.Random;
+import javax.crypto.Cipher;
+import javax.crypto.KeyGenerator;
+import javax.crypto.SecretKey;
public class TestSymmCiphers extends PKCS11Test {
@@ -81,6 +84,7 @@
};
private static StringBuffer debugBuf = new StringBuffer();
+ @Override
public void main(Provider p) throws Exception {
// NSS reports CKR_DEVICE_ERROR when the data passed to
// its EncryptUpdate/DecryptUpdate is not multiple of blocks
@@ -272,6 +276,6 @@
}
public static void main(String[] args) throws Exception {
- main(new TestSymmCiphers());
+ main(new TestSymmCiphers(), args);
}
}