equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2003, 2013, 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 |
115 ckpApplication = NULL_PTR; |
115 ckpApplication = NULL_PTR; |
116 ckNotify = NULL_PTR; |
116 ckNotify = NULL_PTR; |
117 #endif /* NO_CALLBACKS */ |
117 #endif /* NO_CALLBACKS */ |
118 |
118 |
119 TRACE0("DEBUG: C_OpenSession"); |
119 TRACE0("DEBUG: C_OpenSession"); |
120 TRACE1(", slotID=%u", ckSlotID); |
120 TRACE1(", slotID=%lu", ckSlotID); |
121 TRACE1(", flags=%x", ckFlags); |
121 TRACE1(", flags=%lu", (unsigned long) ckFlags); |
122 TRACE0(" ... "); |
122 TRACE0(" ... "); |
123 |
123 |
124 rv = (*ckpFunctions->C_OpenSession)(ckSlotID, ckFlags, ckpApplication, ckNotify, &ckSessionHandle); |
124 rv = (*ckpFunctions->C_OpenSession)(ckSlotID, ckFlags, ckpApplication, ckNotify, &ckSessionHandle); |
125 if (ckAssertReturnValueOK(env, rv) != CK_ASSERT_OK) { |
125 if (ckAssertReturnValueOK(env, rv) != CK_ASSERT_OK) { |
126 #ifndef NO_CALLBACKS |
126 #ifndef NO_CALLBACKS |
134 #endif /* NO_CALLBACKS */ |
134 #endif /* NO_CALLBACKS */ |
135 return 0L; |
135 return 0L; |
136 } |
136 } |
137 |
137 |
138 TRACE0("got session"); |
138 TRACE0("got session"); |
139 TRACE1(", SessionHandle=%u", ckSessionHandle); |
139 TRACE1(", SessionHandle=%lu", (unsigned long) ckSessionHandle); |
140 TRACE0(" ... "); |
140 TRACE0(" ... "); |
141 |
141 |
142 jSessionHandle = ckULongToJLong(ckSessionHandle); |
142 jSessionHandle = ckULongToJLong(ckSessionHandle); |
143 |
143 |
144 #ifndef NO_CALLBACKS |
144 #ifndef NO_CALLBACKS |