src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_general.c
changeset 58281 49836127542b
parent 55410 c3b354fdbaa4
child 58679 9c3209ff7550
equal deleted inserted replaced
58280:ef8c8cf9256a 58281:49836127542b
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
     3  */
     3  */
     4 
     4 
     5 /* Copyright  (c) 2002 Graz University of Technology. All rights reserved.
     5 /* Copyright  (c) 2002 Graz University of Technology. All rights reserved.
     6  *
     6  *
     7  * Redistribution and use in  source and binary forms, with or without
     7  * Redistribution and use in  source and binary forms, with or without
    96 JNIEXPORT jlong JNICALL
    96 JNIEXPORT jlong JNICALL
    97 Java_sun_security_pkcs11_wrapper_PKCS11_freeMechanism
    97 Java_sun_security_pkcs11_wrapper_PKCS11_freeMechanism
    98 (JNIEnv *env, jclass thisClass, jlong ckpMechanism) {
    98 (JNIEnv *env, jclass thisClass, jlong ckpMechanism) {
    99     if (ckpMechanism != 0L) {
    99     if (ckpMechanism != 0L) {
   100         freeCKMechanismPtr(jlong_to_ptr(ckpMechanism));
   100         freeCKMechanismPtr(jlong_to_ptr(ckpMechanism));
   101         TRACE1("DEBUG PKCS11_freeMechanism: free pMech = %x\n", ckpMechanism);
   101         TRACE1("DEBUG PKCS11_freeMechanism: free pMech = %lld\n", (long long int) ckpMechanism);
   102     }
   102     }
   103     return 0L;
   103     return 0L;
   104 }
   104 }
   105 
   105 
   106 /*
   106 /*
   230 
   230 
   231     rv = (*ckpFunctions->C_Initialize)(ckpInitArgs);
   231     rv = (*ckpFunctions->C_Initialize)(ckpInitArgs);
   232 
   232 
   233     free(ckpInitArgs);
   233     free(ckpInitArgs);
   234 
   234 
   235     if (ckAssertReturnValueOK(env, rv) != CK_ASSERT_OK) { return; }
   235     if (ckAssertReturnValueOK(env, rv) != CK_ASSERT_OK) {
       
   236       TRACE1("DEBUG: C_Initialize had a bad return value %lu \n", (unsigned long) rv);
       
   237       return;
       
   238     }
   236 
   239 
   237     TRACE0("FINISHED\n");
   240     TRACE0("FINISHED\n");
   238 }
   241 }
   239 #endif
   242 #endif
   240 
   243