Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(759)

Side by Side Diff: nss/lib/pk11wrap/pk11util.c

Issue 1017413002: Uprev NSS to 3.18 RTM (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/nss.git@nspr_uprev
Patch Set: Rebased Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « nss/lib/pk11wrap/pk11pub.h ('k') | nss/lib/pki/pki3hack.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* This Source Code Form is subject to the terms of the Mozilla Public 1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 /* 4 /*
5 * Initialize the PCKS 11 subsystem 5 * Initialize the PCKS 11 subsystem
6 */ 6 */
7 #include "seccomon.h" 7 #include "seccomon.h"
8 #include "secmod.h" 8 #include "secmod.h"
9 #include "nssilock.h" 9 #include "nssilock.h"
10 #include "secmodi.h" 10 #include "secmodi.h"
(...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1178 1178
1179 /* 1179 /*
1180 * This function "wakes up" WaitForAnyTokenEvent. It's a pretty drastic 1180 * This function "wakes up" WaitForAnyTokenEvent. It's a pretty drastic
1181 * function, possibly bringing down the pkcs #11 module in question. This 1181 * function, possibly bringing down the pkcs #11 module in question. This
1182 * should be OK because 1) it does reinitialize, and 2) it should only be 1182 * should be OK because 1) it does reinitialize, and 2) it should only be
1183 * called when we are on our way to tear the whole system down anyway. 1183 * called when we are on our way to tear the whole system down anyway.
1184 */ 1184 */
1185 SECStatus 1185 SECStatus
1186 SECMOD_CancelWait(SECMODModule *mod) 1186 SECMOD_CancelWait(SECMODModule *mod)
1187 { 1187 {
1188 unsigned long controlMask = mod->evControlMask; 1188 unsigned long controlMask;
1189 SECStatus rv = SECSuccess; 1189 SECStatus rv = SECSuccess;
1190 CK_RV crv; 1190 CK_RV crv;
1191 1191
1192 PZ_Lock(mod->refLock); 1192 PZ_Lock(mod->refLock);
1193 mod->evControlMask |= SECMOD_END_WAIT; 1193 mod->evControlMask |= SECMOD_END_WAIT;
1194 controlMask = mod->evControlMask; 1194 controlMask = mod->evControlMask;
1195 if (controlMask & SECMOD_WAIT_PKCS11_EVENT) { 1195 if (controlMask & SECMOD_WAIT_PKCS11_EVENT) {
1196 if (!pk11_getFinalizeModulesOption()) { 1196 if (!pk11_getFinalizeModulesOption()) {
1197 /* can't get here unless pk11_getFinalizeModulesOption is set */ 1197 /* can't get here unless pk11_getFinalizeModulesOption is set */
1198 PORT_Assert(0); 1198 PORT_Assert(0);
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
1576 * on multiple failures, we are only returning the lastError. The caller 1576 * on multiple failures, we are only returning the lastError. The caller
1577 * can determine which slots are bad by calling PK11_IsDisabled(). 1577 * can determine which slots are bad by calling PK11_IsDisabled().
1578 */ 1578 */
1579 if (rrv != SECSuccess) { 1579 if (rrv != SECSuccess) {
1580 /* restore the last error code */ 1580 /* restore the last error code */
1581 PORT_SetError(lastError); 1581 PORT_SetError(lastError);
1582 } 1582 }
1583 1583
1584 return rrv; 1584 return rrv;
1585 } 1585 }
OLDNEW
« no previous file with comments | « nss/lib/pk11wrap/pk11pub.h ('k') | nss/lib/pki/pki3hack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698