privKey =  PK11_MakePrivKey(slot, nullKey, PR_TRUE, keyHandle, wincx); loser:
if (keyHandle != CK_INVALID_HANDLE) { privKey =  PK11_MakePrivKey(slot, nullKey, PR_TRUE, keyHandle, wincx); }
PK11_FindKeyByAnyCert(CERTCertificate *cert, void *wincx){    CK_OBJECT_HANDLE certHandle;    CK_OBJECT_HANDLE keyHandle;    PK11SlotInfo *slot = NULL;    SECKEYPrivateKey *privKey = NULL;    SECStatus rv;    certHandle = PK11_FindObjectForCert(cert, wincx, &slot);    if (certHandle == CK_INVALID_HANDLE) {	 return NULL;    }    keyHandle = PK11_MatchItem(slot,certHandle,CKO_PRIVATE_KEY);    if ((keyHandle == CK_INVALID_HANDLE) && 			(PORT_GetError() == SSL_ERROR_NO_CERTIFICATE) && 			pk11_LoginStillRequired(slot,wincx)) {	/* authenticate and try again */	rv = PK11_Authenticate(slot, PR_TRUE, wincx);	if (rv != SECSuccess) {	    goto loser;	}	keyHandle = PK11_MatchItem(slot,certHandle,CKO_PRIVATE_KEY);	if (keyHandle == CK_INVALID_HANDLE) { 	    goto loser;	}    }    privKey =  PK11_MakePrivKey(slot, nullKey, PR_TRUE, keyHandle, wincx);loser:    if (slot) {	PK11_FreeSlot(slot);    }    return privKey;}