cert = install_cert(db, slot, derCert, nickname);
cert = install_cert(db, derCert, nickname);
GenerateSelfSignedObjectSigningCert(char *nickname, CERTCertDBHandle *db,	char *subject, unsigned long serial, int keysize, char *token){	CERTCertificate *cert, *temp_cert;	SECItem *derCert;	CERTCertificateRequest *req;	PK11SlotInfo *slot = NULL;	SECKEYPrivateKey *privk = NULL;	SECKEYPublicKey *pubk = NULL;    if( token ) {        slot = PK11_FindSlotByName(token);    } else {	    slot = PK11_GetInternalKeySlot();    }        	if (slot == NULL) {		PR_fprintf(errorFD, "Can't find PKCS11 slot %s\n",                token ? token : "");		errorCount++;		exit (ERRX);	}	if( GenerateKeyPair(slot, &pubk, &privk, keysize) != SECSuccess) {		FatalError("Error generating keypair.");	}	req = make_cert_request (subject, pubk);	temp_cert = make_cert (req, serial, &req->subject);	if(set_cert_type(temp_cert,		NS_CERT_TYPE_OBJECT_SIGNING | NS_CERT_TYPE_OBJECT_SIGNING_CA)		!= SECSuccess) {		FatalError("Unable to set cert type");	}	derCert = sign_cert (temp_cert, privk);	cert = install_cert(db, slot, derCert, nickname);	if(ChangeTrustAttributes(db, cert, ",,uC") != SECSuccess) {		FatalError("Unable to change trust on generated certificate");	}	/* !!! Free memory ? !!! */	PK11_FreeSlot(slot);	return cert;}