CK_RV           crv;
SECStatus       status;
pk11_ImportSymKeyWithTempl(PK11SlotInfo *slot, CK_MECHANISM_TYPE type,                  PK11Origin origin, CK_ATTRIBUTE *keyTemplate, 		  unsigned int templateCount, SECItem *key, void *wincx){    PK11SymKey *    symKey;    CK_RV           crv;    symKey = PK11_CreateSymKey(slot,type,wincx);    if (symKey == NULL) {	return NULL;    }    symKey->size = key->len;    if (SECITEM_CopyItem(NULL,&symKey->data,key) != SECSuccess) {	PK11_FreeSymKey(symKey);	return NULL;    }    symKey->origin = origin;    /* import the keys */    crv = PK11_CreateNewObject(slot, symKey->session, keyTemplate,		 	templateCount, PR_FALSE, &symKey->objectID);    if ( crv != CKR_OK) {	PK11_FreeSymKey(symKey);	PORT_SetError( PK11_MapError(crv));	return NULL;    }    return symKey;}