rv = PQG_ParamGen(primeBits, &params, &vfy);
rv = PQG_ParamGen(j, &params, &vfy);
nsc_parameter_gen(CK_KEY_TYPE key_type, SFTKObject *key){    SFTKAttribute *attribute;    CK_ULONG counter;    unsigned int seedBits = 0;    unsigned int primeBits;    CK_RV crv = CKR_OK;    PQGParams *params = NULL;    PQGVerify *vfy = NULL;    SECStatus rv;    attribute = sftk_FindAttribute(key, CKA_PRIME_BITS);    if (attribute == NULL) {	return CKR_TEMPLATE_INCOMPLETE;    }    primeBits = (unsigned int) *(CK_ULONG *)attribute->attrib.pValue;    sftk_FreeAttribute(attribute);    attribute = sftk_FindAttribute(key, CKA_NETSCAPE_PQG_SEED_BITS);    if (attribute != NULL) {	seedBits = (unsigned int) *(CK_ULONG *)attribute->attrib.pValue;	sftk_FreeAttribute(attribute);    }    sftk_DeleteAttributeType(key,CKA_PRIME_BITS);    sftk_DeleteAttributeType(key,CKA_NETSCAPE_PQG_SEED_BITS);    if (seedBits == 0) {	rv = PQG_ParamGen(primeBits, &params, &vfy);    } else {	rv = PQG_ParamGenSeedLen(primeBits,seedBits/8, &params, &vfy);    }    if (rv != SECSuccess) {	return CKR_DEVICE_ERROR;    }    crv = sftk_AddAttributeType(key,CKA_PRIME,				 params->prime.data, params->prime.len);    if (crv != CKR_OK) goto loser;    crv = sftk_AddAttributeType(key,CKA_SUBPRIME,				 params->subPrime.data, params->subPrime.len);    if (crv != CKR_OK) goto loser;    crv = sftk_AddAttributeType(key,CKA_BASE,				 params->base.data, params->base.len);    if (crv != CKR_OK) goto loser;    counter = vfy->counter;    crv = sftk_AddAttributeType(key,CKA_NETSCAPE_PQG_COUNTER,				 &counter, sizeof(counter));    crv = sftk_AddAttributeType(key,CKA_NETSCAPE_PQG_SEED,				 vfy->seed.data, vfy->seed.len);    if (crv != CKR_OK) goto loser;    crv = sftk_AddAttributeType(key,CKA_NETSCAPE_PQG_H,				 vfy->h.data, vfy->h.len);    if (crv != CKR_OK) goto loser;loser:    if (params) {	PQG_DestroyParams(params);    }    if (vfy) {	PQG_DestroyVerify(vfy);    }    return crv;}