jdk/src/jdk.crypto.pkcs11/share/native/libj2pkcs11/p11_general.c
changeset 39142 bf48a9f13cf2
parent 33653 c1ee09fe3274
--- a/jdk/src/jdk.crypto.pkcs11/share/native/libj2pkcs11/p11_general.c	Wed Jun 22 11:31:07 2016 -0700
+++ b/jdk/src/jdk.crypto.pkcs11/share/native/libj2pkcs11/p11_general.c	Wed Jun 22 15:58:08 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
  */
 
 /* Copyright  (c) 2002 Graz University of Technology. All rights reserved.
@@ -73,6 +73,8 @@
 
 JavaVM* jvm = NULL;
 
+jboolean debug = 0;
+
 JNIEXPORT jint JNICALL DEF_JNI_OnLoad(JavaVM *vm, void *reserved) {
     jvm = vm;
     return JNI_VERSION_1_4;
@@ -92,7 +94,7 @@
  */
 JNIEXPORT void JNICALL
 Java_sun_security_pkcs11_wrapper_PKCS11_initializeLibrary
-(JNIEnv *env, jclass thisClass)
+(JNIEnv *env, jclass thisClass, jboolean enableDebug)
 {
 #ifndef NO_CALLBACKS
     if (notifyListLock == NULL) {
@@ -101,6 +103,7 @@
 #endif
 
     prefetchFields(env, thisClass);
+    debug = enableDebug;
 }
 
 jclass fetchClass(JNIEnv *env, const char *name) {