{ CKA_CLASS,   g_ck_class_pubkey.data, g_ck_class_pubkey.size }, { CKA_ID,      NULL,                   0                      }, { CKA_SUBJECT, NULL,                   0                      }
{ CKA_CLASS,   NULL, 0 }, { CKA_ID,      NULL, 0 }, { CKA_SUBJECT, NULL, 0 }
NSSCertificate_GetPublicKey(  NSSCertificate *c){    PRStatus nssrv;    CK_ATTRIBUTE pubktemplate[] = {	{ CKA_CLASS,   g_ck_class_pubkey.data, g_ck_class_pubkey.size },	{ CKA_ID,      NULL,                   0                      },	{ CKA_SUBJECT, NULL,                   0                      }    };    CK_ULONG count = sizeof(pubktemplate) / sizeof(pubktemplate[0]);    if (c->id.size > 0) {	/* CKA_ID */	NSS_CK_ITEM_TO_ATTRIBUTE(&c->id, &pubktemplate[1]);    } else {	/* failure, yes? */	return (NSSPublicKey *)NULL;    }    if (c->subject.size > 0) {	/* CKA_SUBJECT */	NSS_CK_ITEM_TO_ATTRIBUTE(&c->subject, &pubktemplate[2]);    } else {	/* failure, yes? */	return (NSSPublicKey *)NULL;    }    /* Try the cert's token first */#if 0    if (c->token) {	nssrv = nssToken_FindObjectByTemplate(c->token, pubktemplate, count);    }#endif    /* Try all other key tokens */    return (NSSPublicKey *)NULL;}