Back to index

courier  0.68.2
Functions | Variables
export.c File Reference
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include "gpg.h"
#include "gpglib.h"
#include "unicode/unicode.h"
#include "numlib/numlib.h"

Go to the source code of this file.

Functions

int libmail_gpg_exportkey (const char *gpgdir, int secret, const char *fingerprint, int(*out_func)(const char *, size_t, void *), int(*err_func)(const char *, size_t, void *), void *voidarg)

Variables

int libmail_gpg_stdin
int libmail_gpg_stdout
int libmail_gpg_stderr
pid_t libmail_gpg_pid

Function Documentation

int libmail_gpg_exportkey ( const char *  gpgdir,
int  secret,
const char *  fingerprint,
int(*)(const char *, size_t, void *)  out_func,
int(*)(const char *, size_t, void *)  err_func,
void *  voidarg 
)

Definition at line 31 of file export.c.

{
       char *argvec[6];
       int rc;

       argvec[0]="gpg";
       argvec[1]="--armor";
       argvec[2]="--no-tty";
       argvec[3]= secret ? "--export-secret-keys":"--export";
       argvec[4]=(char *)fingerprint;
       argvec[5]=0;

       if (libmail_gpg_fork(&libmail_gpg_stdin, &libmail_gpg_stdout,
                          &libmail_gpg_stderr, gpgdir, argvec) < 0)
              rc= -1;
       else
       {
              int rc2;

              close(libmail_gpg_stdin);
              libmail_gpg_stdin=-1;

              rc=libmail_gpg_read(out_func, err_func, NULL, 0, voidarg);
              rc2=libmail_gpg_cleanup();
              if (rc2)
                     rc=rc2;
       }
       return (rc);
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 34 of file libgpg.c.

Definition at line 33 of file libgpg.c.

Definition at line 32 of file libgpg.c.

Definition at line 32 of file libgpg.c.