990{
  991  char *certfile = NULL;
  992  struct Buffer *buf = NULL;
 
  993 
  994  FILE *fp_out = NULL;
  996  if (!fp_err)
  997  {
  999    goto done;
 1000  }
 1001 
 1003  if (!fp_out)
 1004  {
 1006    goto done;
 1007  }
 1008 
 1011  if (c_smime_ask_cert_label)
 1012  {
 1016    {
 1017      goto done;
 1018    }
 1019  }
 1020 
 1023  if (certfile)
 1024  {
 1026 
 1027    const struct Expando *c_smime_import_cert_command =
 
 1029    FILE *fp_smime_in = NULL;
 1030    pid_t pid = 
smime_invoke(&fp_smime_in, NULL, NULL, -1, fileno(fp_out),
 
 1031                             fileno(fp_err), certfile, NULL, NULL, NULL, NULL,
 1032                             NULL, NULL, c_smime_import_cert_command);
 1033    if (pid == -1)
 1034    {
 1035      mutt_message(
_(
"Error: unable to create OpenSSL subprocess"));
 
 1036      goto done;
 1037    }
 1039    fputc('\n', fp_smime_in);
 1041 
 1043 
 1046  }
 1047 
 1048  fflush(fp_out);
 1049  rewind(fp_out);
 1050  fflush(fp_err);
 1051  rewind(fp_err);
 1052 
 1055 
 1056done:
 1060}
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
const struct Expando * cs_subset_expando(const struct ConfigSubset *sub, const char *name)
Get an Expando config item by name.
void mutt_endwin(void)
Shutdown curses.
int mutt_file_copy_stream(FILE *fp_in, FILE *fp_out)
Copy the contents of one file into another.
void mutt_file_unlink(const char *s)
Delete a file, carefully.
#define mutt_file_fclose(FP)
int mw_get_field(const char *prompt, struct Buffer *buf, CompletionFlags complete, enum HistoryClass hclass, const struct CompleteOps *comp_api, void *cdata)
Ask the user for a string -.
#define mutt_message(...)
@ HC_OTHER
Miscellaneous strings.
int filter_wait(pid_t pid)
Wait for the exit of a process and return its status.
#define MUTT_COMP_NO_FLAGS
No flags are set.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
static char * smime_extract_certificate(const char *infile)
Extract an SMIME certificate from a file.
static pid_t smime_invoke(FILE **fp_smime_in, FILE **fp_smime_out, FILE **fp_smime_err, int fp_smime_infd, int fp_smime_outfd, int fp_smime_errfd, const char *fname, const char *sig_fname, const char *cryptalg, const char *digestalg, const char *key, const char *certificates, const char *intermediates, const struct Expando *exp)
Run an SMIME command.
String manipulation buffer.
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.
#define mutt_file_mkstemp()