5434N/A * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 5434N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5434N/A * This code is free software; you can redistribute it and/or modify it 5434N/A * under the terms of the GNU General Public License version 2 only, as 5434N/A * published by the Free Software Foundation. 5434N/A * This code is distributed in the hope that it will be useful, but WITHOUT 5434N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 5434N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 5434N/A * version 2 for more details (a copy is included in the LICENSE file that 5434N/A * You should have received a copy of the GNU General Public License version 5434N/A * 2 along with this work; if not, write to the Free Software Foundation, 5434N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 5434N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 5434N/A * or visit www.oracle.com if you need additional information or have any 5437N/A * @bug 7195931 7197071 7198146 5434N/A * @summary UnsatisfiedLinkError on PKCS11.C_GetOperationState while 5434N/A * When the Java specification version is incremented, all of the providers 5434N/A * must be recompiled with the proper implementation version to match. 5434N/A * @param args the command line arguments 5437N/A * Iterate over the files of interest: JCE framework and providers 5437N/A * Current list of JCE providers, all of which currently live in 5437N/A * the extensions directory. Add if more are created. 5437N/A // Helper method to format the URL properly. 5437N/A * Test the root cause, which is that there were no manifest values 5437N/A * for many of the providers, and for those that had them, there was 5437N/A * no test to make sure that the impl version was appropriate for 5437N/A * If the file doesn't exist (e.g. mscapi on solaris), 5437N/A * skip it. If there are other problems, fail out. 5437N/A "Implementation-Version not found in Manifest");
5437N/A "Implementation-Version does not match " +
5437N/A * Workaround for unfortunately generified forName() API 5437N/A * Check the symptom, an UnsatisfiedLinkError in MessageDigests. 5434N/A * We have to do some gyrations here, since the code to exercise 5437N/A * this is in the P11 MessageDigests, and most of those mechanisms 5437N/A * In 7u, we don't have a 64 PKCS11 windows build yet, so we 5437N/A * have to do some dynamic checking to determine if there is 5437N/A * a PKCS11 library available to test against. Otherwise, the 5437N/A * windows 64 bit will throw a compilation error before the 5437N/A // These kinds of failure are ok. We're testing the 5434N/A // UnsatisfiedLinkError here.