ReadCertificates.java revision 1674
3206N/A * Copyright 2006-2007 Sun Microsystems, Inc. All Rights Reserved. 3084N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3084N/A * This code is free software; you can redistribute it and/or modify it 3084N/A * under the terms of the GNU General Public License version 2 only, as 3084N/A * published by the Free Software Foundation. 3084N/A * This code is distributed in the hope that it will be useful, but WITHOUT 3084N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3084N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3084N/A * version 2 for more details (a copy is included in the LICENSE file that 3084N/A * You should have received a copy of the GNU General Public License version 3084N/A * 2 along with this work; if not, write to the Free Software Foundation, 3084N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3084N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 3084N/A * CA 95054 USA or visit www.sun.com if you need additional information or 3084N/A * @summary Make sure that we can parse certificates using various named curves 3084N/A * and verify their signatures // clear certificate cache in from a previous run with a different // provider (undocumented hack for the Sun provider) // First try the provider under test (if it does not support the // necessary algorithm then try any registered provider). ". Trying another provider...");
// try some random invalid signatures to make sure we get the correct for (
int i =
0; i <
20; i++) {
throw new Exception(
"Verified invalid signature");