CK_RV        crv = CKR_CERTDB_FAILED;
CK_RV        crv = CKR_NETSCAPE_CERTDB_FAILED;
pk11_OpenCertDB(const char * configdir, const char *prefix, PRBool readOnly,    					    NSSLOWCERTCertDBHandle **certdbPtr){    NSSLOWCERTCertDBHandle *certdb = NULL;    CK_RV        crv = CKR_CERTDB_FAILED;    SECStatus    rv;    char * name = NULL;    char * appName = NULL;    if (prefix == NULL) {	prefix = "";    }    configdir = pk11_EvaluateConfigDir(configdir, &appName);    name = PR_smprintf("%s" PATH_SEPARATOR "%s",configdir,prefix);    if (name == NULL) goto loser;    certdb = (NSSLOWCERTCertDBHandle*)PORT_ZAlloc(sizeof(NSSLOWCERTCertDBHandle));    if (certdb == NULL)     	goto loser;/* fix when we get the DB in */    rv = nsslowcert_OpenCertDB(certdb, readOnly, appName, prefix,				pk11_certdb_name_cb, (void *)name, PR_FALSE);    if (rv == SECSuccess) {	crv = CKR_OK;	*certdbPtr = certdb;	certdb = NULL;    }loser:     if (certdb) PR_Free(certdb);    if (name) PR_smprintf_free(name);    if (appName) PORT_Free(appName);    return crv;}