if (key_id->len != SHA1_LENGTH) { return; }
pk11_searchKeys(PK11Slot *slot, SECItem *key_id, PRBool isLoggedIn,	unsigned long classFlags, PK11SearchResults *search,	CK_ATTRIBUTE *pTemplate, CK_ULONG ulCount){    NSSLOWKEYDBHandle *keyHandle = NULL;    NSSLOWKEYPrivateKey *privKey;    pk11KeyData keyData;    keyHandle = slot->keyDB;    if (keyHandle == NULL) {	return;    }    if (key_id->data) {	privKey = nsslowkey_FindKeyByPublicKey(keyHandle, key_id, slot->password);	if (privKey) {	    if ((classFlags & NSC_KEY) && isSecretKey(privKey)) {    	        pk11_addHandle(search,			pk11_mkHandle(slot,key_id,PK11_TOKEN_TYPE_KEY));	    }	    if ((classFlags & NSC_PRIVATE) && !isSecretKey(privKey)) {    	        pk11_addHandle(search,			pk11_mkHandle(slot,key_id,PK11_TOKEN_TYPE_PRIV));	    }	    if ((classFlags & NSC_PUBLIC) && !isSecretKey(privKey)) {    	        pk11_addHandle(search,			pk11_mkHandle(slot,key_id,PK11_TOKEN_TYPE_PUB));	    }    	    nsslowkey_DestroyPrivateKey(privKey);	}	/* don't do the traversal if we have an up to date db */	if (keyHandle->version != 3) {	    return;	}    }    keyData.slot = slot;    keyData.searchHandles = search;    keyData.id = key_id;    keyData.template = pTemplate;    keyData.templ_count = ulCount;    keyData.isLoggedIn = isLoggedIn;    keyData.classFlags = classFlags;    keyData.strict = NSC_STRICT;    nsslowkey_TraverseKeys(keyHandle, pk11_key_collect, &keyData);}