jdk/test/sun/security/pkcs11/rsa/TestSignatures.java
changeset 32138 23830562d3d1
parent 30046 cf2c86e1819e
child 35379 1e8e336ef66b
equal deleted inserted replaced
32137:335cf1796fcd 32138:23830562d3d1
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    95     public static void main(String[] args) throws Exception {
    95     public static void main(String[] args) throws Exception {
    96         main(new TestSignatures());
    96         main(new TestSignatures());
    97     }
    97     }
    98 
    98 
    99     public void main(Provider p) throws Exception {
    99     public void main(Provider p) throws Exception {
       
   100 
       
   101         /*
       
   102          * Use Solaris SPARC 11.2 or later to avoid an intermittent failure
       
   103          * when running SunPKCS11-Solaris (8044554)
       
   104          */
       
   105         if (p.getName().equals("SunPKCS11-Solaris") &&
       
   106             System.getProperty("os.name").equals("SunOS") &&
       
   107             System.getProperty("os.arch").equals("sparcv9") &&
       
   108             System.getProperty("os.version").compareTo("5.11") <= 0 &&
       
   109             getDistro().compareTo("11.2") < 0) {
       
   110 
       
   111             System.out.println("SunPKCS11-Solaris provider requires " +
       
   112                 "Solaris SPARC 11.2 or later, skipping");
       
   113             return;
       
   114         }
       
   115 
   100         long start = System.currentTimeMillis();
   116         long start = System.currentTimeMillis();
   101         provider = p;
   117         provider = p;
   102         data = new byte[2048];
   118         data = new byte[2048];
   103         new Random().nextBytes(data);
   119         new Random().nextBytes(data);
   104         KeyStore ks = getKeyStore();
   120         KeyStore ks = getKeyStore();