8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 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 /* 25 * @test 26 * @bug 7143872 27 * @summary Improve certificate extension processing 28 */ 29 import java.io.ByteArrayInputStream; 30 import java.math.BigInteger; 31 import java.security.KeyPairGenerator; 32 import java.security.cert.CertificateFactory; 33 import java.security.cert.X509CRLEntry; 34 import java.util.Date; 35 import sun.security.util.DerInputStream; 36 import sun.security.util.DerValue; 37 import sun.security.x509.*; 38 39 public class OrderAndDup { 40 public static void main(String[] args) throws Exception { 41 42 // Generate 20 serial numbers with dup and a special order 43 int count = 20; 44 BigInteger[] serials = new BigInteger[count]; 45 for (int i=0; i<count; i++) { 46 serials[i] = BigInteger.valueOf(i*7%10); 47 } | 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 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 /* 25 * @test 26 * @bug 7143872 27 * @summary Improve certificate extension processing 28 * @modules java.base/sun.security.util 29 * java.base/sun.security.x509 30 */ 31 import java.io.ByteArrayInputStream; 32 import java.math.BigInteger; 33 import java.security.KeyPairGenerator; 34 import java.security.cert.CertificateFactory; 35 import java.security.cert.X509CRLEntry; 36 import java.util.Date; 37 import sun.security.util.DerInputStream; 38 import sun.security.util.DerValue; 39 import sun.security.x509.*; 40 41 public class OrderAndDup { 42 public static void main(String[] args) throws Exception { 43 44 // Generate 20 serial numbers with dup and a special order 45 int count = 20; 46 BigInteger[] serials = new BigInteger[count]; 47 for (int i=0; i<count; i++) { 48 serials[i] = BigInteger.valueOf(i*7%10); 49 } |