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