dkcb, encryptOptions.bulkkey, NULL, NULL);
dkcb, encryptOptions->bulkkey, NULL, NULL);
encrypted_data(struct encryptOptionsStr encryptOptions){    SECStatus rv = SECFailure;    NSSCMSMessage *cmsg = NULL;    NSSCMSContentInfo *cinfo;    NSSCMSEncryptedData *encd;    NSSCMSEncoderContext *ecx = NULL;    PLArenaPool *tmppoolp = NULL;    SECItem derOut = { 0, 0, 0 };    /* arena for output */    tmppoolp = PORT_NewArena(1024);    if (!tmppoolp) {	fprintf(stderr, "%s: out of memory.\n", progName);	return NULL;    }    /*     * create the message object     */    cmsg = NSS_CMSMessage_Create(NULL);    if (cmsg == NULL) {	fprintf(stderr, "ERROR: cannot create CMS message.\n");	goto loser;    }    /*     * build chain of objects: message->encryptedData->data     */    if ((encd = NSS_CMSEncryptedData_Create(cmsg, encryptOptions.bulkalgtag,                                                   encryptOptions.keysize))            == NULL) {	fprintf(stderr, "ERROR: cannot create CMS encryptedData object.\n");	goto loser;    }    cinfo = NSS_CMSMessage_GetContentInfo(cmsg);    if (NSS_CMSContentInfo_SetContent_EncryptedData(cmsg, cinfo, encd)          != SECSuccess) {	fprintf(stderr, "ERROR: cannot attach CMS encryptedData object.\n");	goto loser;    }    cinfo = NSS_CMSEncryptedData_GetContentInfo(encd);    /* we're always passing data in, so the content is NULL */    if (NSS_CMSContentInfo_SetContent_Data(cmsg, cinfo, NULL, PR_FALSE)           != SECSuccess) {	fprintf(stderr, "ERROR: cannot attach CMS data object.\n");	goto loser;    }    ecx = NSS_CMSEncoder_Start(cmsg, NULL, NULL, &derOut, tmppoolp, NULL, NULL,                               dkcb, encryptOptions.bulkkey, NULL, NULL);    if (!ecx) {	fprintf(stderr, "%s: cannot create encoder context.\n", progName);	goto loser;    }    rv = NSS_CMSEncoder_Update(ecx, encryptOptions.input->data,                                     encryptOptions.input->len);    if (rv) {	fprintf(stderr, "%s: failed to add data to encoder.\n", progName);	goto loser;    }    rv = NSS_CMSEncoder_Finish(ecx);    if (rv) {	fprintf(stderr, "%s: failed to encrypt data.\n", progName);	goto loser;    }    fwrite(derOut.data, derOut.len, 1, encryptOptions.outfile);    /*    if (bulkkey)	PK11_FreeSymKey(bulkkey);	*/    if (tmppoolp)	PORT_FreeArena(tmppoolp, PR_FALSE);    return cmsg;loser:    /*    if (bulkkey)	PK11_FreeSymKey(bulkkey);	*/    if (tmppoolp)	PORT_FreeArena(tmppoolp, PR_FALSE);    if (cmsg)	NSS_CMSMessage_Destroy(cmsg);    return NULL;}