< prev index next >

test/java/security/SignedObject/Chain.java

Print this page




  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import java.security.Signature;
  25 import java.security.SignedObject;
  26 import java.security.KeyPairGenerator;
  27 import java.security.KeyPair;
  28 import java.security.NoSuchProviderException;
  29 import java.security.PrivateKey;
  30 import java.security.PublicKey;
  31 import java.util.Arrays;
  32 
  33 /*
  34  * @test
  35  * @bug 8050374
  36  * @key intermittent
  37  * @summary Verify a chain of signed objects
  38  */
  39 public class Chain {
  40 
  41     static enum KeyAlg {
  42         RSA("RSA"),
  43         DSA("DSA"),
  44         EC("EC");
  45 
  46         final String name;
  47 
  48         KeyAlg(String alg) {
  49             this.name = alg;
  50         }
  51     }
  52 
  53     static enum Provider {
  54         Default("default"),
  55         SunRsaSign("SunRsaSign"),
  56         Sun("SUN"),




  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import java.security.Signature;
  25 import java.security.SignedObject;
  26 import java.security.KeyPairGenerator;
  27 import java.security.KeyPair;
  28 import java.security.NoSuchProviderException;
  29 import java.security.PrivateKey;
  30 import java.security.PublicKey;
  31 import java.util.Arrays;
  32 
  33 /*
  34  * @test
  35  * @bug 8050374

  36  * @summary Verify a chain of signed objects
  37  */
  38 public class Chain {
  39 
  40     static enum KeyAlg {
  41         RSA("RSA"),
  42         DSA("DSA"),
  43         EC("EC");
  44 
  45         final String name;
  46 
  47         KeyAlg(String alg) {
  48             this.name = alg;
  49         }
  50     }
  51 
  52     static enum Provider {
  53         Default("default"),
  54         SunRsaSign("SunRsaSign"),
  55         Sun("SUN"),


< prev index next >