constructor = (*env)->GetMethodID( env, certClass, PLAIN_CONSTRUCTOR, CERT_CONSTRUCTOR_SIG); if(constructor == NULL) { ASSERT_OUTOFMEM(env); goto finish; }   Cert = (*env)->NewObject(env, certClass, constructor, byteArray); if(Cert==NULL) { goto finish; }  finish: if(Cert==NULL) { CERT_DestroyCertificate(*cert); } *cert = NULL; return Cert;
return JSS_PK11_wrapCertAndSlot(env, cert, &slot);
JSS_PK11_wrapCert(JNIEnv *env, CERTCertificate **cert){	jclass certClass;	jmethodID constructor;	jbyteArray byteArray;	jobject Cert=NULL;	PR_ASSERT(env!=NULL && cert!=NULL && *cert!=NULL);	byteArray = JSS_ptrToByteArray(env, *cert);	certClass = (*env)->FindClass(env, INTERNAL_TOKEN_CERT_CLASS_NAME);	if(certClass == NULL) {		ASSERT_OUTOFMEM(env);		goto finish;	}	constructor = (*env)->GetMethodID(							env,							certClass,							PLAIN_CONSTRUCTOR,							CERT_CONSTRUCTOR_SIG);	if(constructor == NULL) {		ASSERT_OUTOFMEM(env);		goto finish;	}	/* Call the constructor */	Cert = (*env)->NewObject(env, certClass, constructor, byteArray);	if(Cert==NULL) {		goto finish;	}finish:	if(Cert==NULL) {		CERT_DestroyCertificate(*cert);	}	*cert = NULL;	return Cert;}