hd->flags = 0x01;
op_sign_encrypt (void *rset, void *locusr, const char *inbuf, char **outbuf){    gpgme_ctx_t ctx;    gpgme_key_t *keys = (gpgme_key_t*)rset;    gpgme_data_t in=NULL, out=NULL;    gpgme_error_t err;    struct decrypt_key_s *hd;    op_init ();    *outbuf = NULL;    err = gpgme_new (&ctx);    if (err)	return err;    hd = (struct decrypt_key_s *)xcalloc (1, sizeof *hd);    err = gpgme_data_new_from_mem (&in, inbuf, strlen (inbuf), 1);    if (err)	goto leave;    err = gpgme_data_new (&out);    if (err)	goto leave;    gpgme_set_passphrase_cb (ctx, passphrase_callback_box, hd);    gpgme_set_armor (ctx, 1);    gpgme_signers_add (ctx, (gpgme_key_t)locusr);    err = gpgme_op_encrypt_sign (ctx, keys, GPGME_ENCRYPT_ALWAYS_TRUST, in, out);    if (!err) {	size_t n =0 ;	*outbuf = gpgme_data_release_and_get_mem (out, &n);	(*outbuf)[n] = 0;	out = NULL;    }leave:    free_decrypt_key (hd);    gpgme_release (ctx);    gpgme_data_release (out);    gpgme_data_release (in);    return err;}