Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F34503978
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
25 KB
Subscribers
None
View Options
diff --git a/ChangeLog b/ChangeLog
index e69de29b..f11e6dac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -0,0 +1,4 @@
+2001-01-18 Werner Koch <wk@gnupg.org>
+
+ * autogen.sh: Added option --build-w32.
+
diff --git a/autogen.sh b/autogen.sh
index 11b27612..a386bb0c 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,132 +1,151 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
# It is only needed for the CVS version.
PGM=GPGME
-DIE=no
+lib_config_files=""
+autoconf_vers=2.13
+automake_vers=1.4
+aclocal_vers=1.4
+libtool_vers=1.3
-#
-# Use --build-w32 to prepare the cross compiling build for Windoze
-#
+DIE=no
if test "$1" = "--build-w32"; then
shift
target=i386--mingw32
+ if [ ! -f ./config.guess ]; then
+ echo "./config.guess not found" >&2
+ exit 1
+ fi
host=`./config.guess`
- CC="${target}-gcc"
- CPP="${target}-gcc -E"
- RANLIB="${target}-ranlib"
-
- cc_version=`$CC --version`
- if ! echo "$cc_version" | egrep '[0-9]+wk[0-9]+' ; then
- echo "gcc version $cc_version is not supported" >&2
- echo "see doc/README.W32 for instructions" >&2
+ if ! mingw32 --version >/dev/null; then
+ echo "We need at least version 0.3 of MingW32/CPD" >&2
exit 1
fi
-
+
if [ -f config.h ]; then
if grep HAVE_DOSISH_SYSTEM config.h | grep undef >/dev/null; then
echo "Pease run a 'make distclean' first" >&2
exit 1
fi
fi
- export CC CPP RANLIB
- ./configure --host=${host} --target=${target} $*
+ crossbindir=`mingw32 --install-dir`/bin
+ CC=`mingw32 --get-path gcc`
+ CPP=`mingw32 --get-path cpp`
+ AR=`mingw32 --get-path ar`
+ RANLIB=`mingw32 --get-path ranlib`
+ export CC CPP AR RANLIB
+
+ disable_foo_tests=""
+ if [ -n "$lib_config_files" ]; then
+ for i in $lib_config_files; do
+ j=`echo $i | tr '[a-z-]' '[A-Z_]'`
+ eval "$j=${crossbindir}/$i"
+ export $j
+ disable_foo_tests="$disable_foo_tests --disable-`echo $i| \
+ sed 's,-config$,,'`-test"
+ if [ ! -f "${crossbindir}/$i" ]; then
+ echo "$i not installed for MingW32" >&2
+ DIE=yes
+ fi
+ done
+ fi
+ [ $DIE = yes ] && exit 1
+
+ ./configure --host=${host} --target=${target} \
+ ${disable_foo_tests} $*
exit $?
fi
-autoconf_vers=2.13
-automake_vers=1.4
-aclocal_vers=1.4
-libtool_vers=1.3
if (autoconf --version) < /dev/null > /dev/null 2>&1 ; then
if (autoconf --version | awk 'NR==1 { if( $3 >= '$autoconf_vers') \
exit 1; exit 0; }');
then
echo "**Error**: "\`autoconf\'" is too old."
echo ' (version ' $autoconf_vers ' or newer is required)'
DIE="yes"
fi
else
echo
echo "**Error**: You must have "\`autoconf\'" installed to compile $PGM."
echo ' (version ' $autoconf_vers ' or newer is required)'
DIE="yes"
fi
if (automake --version) < /dev/null > /dev/null 2>&1 ; then
if (automake --version | awk 'NR==1 { if( $4 >= '$automake_vers') \
exit 1; exit 0; }');
then
echo "**Error**: "\`automake\'" is too old."
echo ' (version ' $automake_vers ' or newer is required)'
DIE="yes"
fi
if (aclocal --version) < /dev/null > /dev/null 2>&1; then
if (aclocal --version | awk 'NR==1 { if( $4 >= '$aclocal_vers' ) \
exit 1; exit 0; }' );
then
echo "**Error**: "\`aclocal\'" is too old."
echo ' (version ' $aclocal_vers ' or newer is required)'
DIE="yes"
fi
else
echo
echo "**Error**: Missing "\`aclocal\'". The version of "\`automake\'
echo " installed doesn't appear recent enough."
DIE="yes"
fi
else
echo
echo "**Error**: You must have "\`automake\'" installed to compile $PGM."
echo ' (version ' $automake_vers ' or newer is required)'
DIE="yes"
fi
if (libtool --version) < /dev/null > /dev/null 2>&1 ; then
if (libtool --version | awk 'NR==1 { if( $4 >= '$libtool_vers') \
exit 1; exit 0; }');
then
echo "**Error**: "\`libtool\'" is too old."
echo ' (version ' $libtool_vers ' or newer is required)'
DIE="yes"
fi
else
echo
echo "**Error**: You must have "\`libtool\'" installed to compile $PGM."
echo ' (version ' $libtool_vers ' or newer is required)'
DIE="yes"
fi
if test "$DIE" = "yes"; then
exit 1
fi
echo "Running libtoolize... Ignore non-fatal messages."
echo "no" | libtoolize
echo "Running aclocal..."
aclocal
echo "Running autoheader..."
autoheader
echo "Running automake --gnu ..."
automake --gnu;
echo "Running autoconf..."
autoconf
if test "$*" = ""; then
conf_options="--enable-maintainer-mode"
else
conf_options=$*
fi
echo "Running ./configure $conf_options"
./configure $conf_options
diff --git a/build-w32 b/build-w32
deleted file mode 100755
index bb72045c..00000000
--- a/build-w32
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-target=i386--mingw32
-host=`./config.guess`
-
-CC="${target}-gcc"
-CPP="${target}-gcc -E"
-RANLIB="${target}-ranlib"
-
-export CC CPP RANLIB
-./configure --host=${host} --target=${target} $*
diff --git a/configure.in b/configure.in
index 839ca82d..79239a7a 100644
--- a/configure.in
+++ b/configure.in
@@ -1,170 +1,170 @@
# configure.in for GPGME
#
dnl (Process this file with autoconf to produce a configure script.)
AC_REVISION($Revision$)dnl
AC_INIT(gpgme/gpgme.h)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
#############################################
# Version numbers (Remember to change them just before a release)
# 1. No interfaces changed, only implementations (good): Increment REVISION.
# 2. Interfaces added, none removed (good): Increment CURRENT, increment
# AGE, set REVISION to 0.
# 3. Interfaces removed (BAD, breaks upward compatibility): Increment
# CURRENT, set AGE and REVISION to 0.
-AM_INIT_AUTOMAKE(gpgme,0.1.4)
+AM_INIT_AUTOMAKE(gpgme,0.1.4a)
LIBGPGME_LT_CURRENT=2
LIBGPGME_LT_AGE=2
LIBGPGME_LT_REVISION=0
##############################################
AC_SUBST(LIBGPGME_LT_CURRENT)
AC_SUBST(LIBGPGME_LT_AGE)
AC_SUBST(LIBGPGME_LT_REVISION)
AM_MAINTAINER_MODE
dnl
dnl Checks for programs
dnl
AC_ARG_PROGRAM
dnl Don't default to build static libs
AM_DISABLE_STATIC
AM_PROG_LIBTOOL
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
fi
GPG=
component_system=None
case "${target}" in
*-*-mingw32* | i?86-emx-os2 | i?86-*-os2*emx | i?86-*-msdosdjgpp* )
# special stuff for Windoze NT
# OS/2 with the EMX environment
# DOS with the DJGPP environment
AC_DEFINE(HAVE_DRIVE_LETTERS)
AC_DEFINE(HAVE_DOSISH_SYSTEM)
GPG='c:\\gnupg\\gpg.exe'
#component_system='COM+'
;;
*)
;;
esac
dnl
dnl Checks for libraries
dnl
dnl
dnl Checks for header files
dnl
dnl
dnl Checks for typedefs and structures
dnl
GNUPG_CHECK_TYPEDEF(byte, HAVE_BYTE_TYPEDEF)
GNUPG_CHECK_TYPEDEF(ushort, HAVE_USHORT_TYPEDEF)
GNUPG_CHECK_TYPEDEF(ulong, HAVE_ULONG_TYPEDEF)
GNUPG_CHECK_TYPEDEF(u16, HAVE_U16_TYPEDEF)
GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF)
# We should not use them in this software;
# However jnlib/types.h needs them - so we take the easy way.
AC_CHECK_SIZEOF(unsigned short, 2)
AC_CHECK_SIZEOF(unsigned int, 4)
AC_CHECK_SIZEOF(unsigned long, 4)
if test "$ac_cv_sizeof_unsigned_short" = "0" \
|| test "$ac_cv_sizeof_unsigned_int" = "0" \
|| test "$ac_cv_sizeof_unsigned_long" = "0"; then
AC_MSG_WARN([Hmmm, something is wrong with the sizes - using defaults]);
fi
dnl
dnl Checks for compiler features
dnl
dnl
dnl Checks for library functions
dnl
dnl These are needed by libjnlib
AC_CHECK_FUNCS(memicmp stpcpy strlwr strtoul memmove stricmp)
dnl
dnl Checks for system services
dnl
if test -z "$GPG"; then
AC_PATH_PROG(GPG, gpg)
if test -z "$GPG"; then
AC_MSG_ERROR([[
***
*** GnuPG not found. Please install GnuPG first.
*** See http://www.gnupg.org/download.html
***
]])
fi
fi
AC_DEFINE_UNQUOTED(GPG_PATH, "$GPG")
dnl
dnl FIXME: check whether Bonobo is installed
dnl
dnl
dnl Create config files
dnl
dnl
AM_CONDITIONAL(BUILD_COMPLUS, test "$component_system" = "COM+")
AM_CONDITIONAL(BUILD_BONOBO, test "$component_system" = "Bonobo")
dnl Make the version number in gpgme/gpgme.h the same as the one here.
dnl (this is easier than to have a *.in file just for one substitution)
GNUPG_FIX_HDR_VERSION(gpgme/gpgme.h, GPGME_VERSION)
dnl Substitution used for gpgme-config
GPGME_LIBS="-L${libdir} -lgpgme"
GPGME_CFLAGS=""
AC_SUBST(GPGME_LIBS)
AC_SUBST(GPGME_CFLAGS)
AC_OUTPUT_COMMANDS([
chmod +x gpgme/gpgme-config
])
AC_OUTPUT([
Makefile
jnlib/Makefile
gpgme/Makefile
gpgme/gpgme-config
tests/Makefile
bonobo/Makefile
complus/Makefile
])
echo "
GPGME v${VERSION} has been configured as follows:
GPG path: $GPG
Component: $component_system
"
diff --git a/gpgme/gpgme.c b/gpgme/gpgme.c
index 10bdd8ae..aea18fa5 100644
--- a/gpgme/gpgme.c
+++ b/gpgme/gpgme.c
@@ -1,243 +1,243 @@
/* gpgme.c - GnuPG Made Easy
* Copyright (C) 2000 Werner Koch (dd9jn)
*
* This file is part of GPGME.
*
* GPGME is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* GPGME is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "util.h"
#include "context.h"
#include "ops.h"
#define my_isdigit(a) ( (a) >='0' && (a) <= '9' )
#define my_isxdigit(a) ( my_isdigit((a)) \
|| ((a) >= 'A' && (a) <= 'F') \
|| ((a) >= 'f' && (a) <= 'f') )
/**
* gpgme_new:
* @r_ctx: Returns the new context
*
* Create a new context to be used with most of the other GPGME
* functions. Use gpgme_release_contect() to release all resources
*
* Return value: An error code
**/
GpgmeError
gpgme_new (GpgmeCtx *r_ctx)
{
GpgmeCtx c;
c = xtrycalloc ( 1, sizeof *c );
if (!c)
return mk_error (Out_Of_Core);
c->verbosity = 1;
c->use_armor = 1; /* fixme: reset this to 0 */
*r_ctx = c;
return 0;
}
/**
* gpgme_release:
* @c: Context to be released.
*
* Release all resources associated with the given context.
**/
void
gpgme_release ( GpgmeCtx c )
{
if (!c)
return;
_gpgme_gpg_release ( c->gpg );
_gpgme_release_result ( c );
gpgme_key_release ( c->tmp_key );
gpgme_data_release ( c->help_data_1 );
gpgme_data_release ( c->notation );
/* fixme: release the key_queue */
xfree (c);
}
void
_gpgme_release_result ( GpgmeCtx c )
{
switch (c->result_type) {
case RESULT_TYPE_NONE:
break;
case RESULT_TYPE_VERIFY:
_gpgme_release_verify_result ( c->result.verify );
break;
case RESULT_TYPE_DECRYPT:
_gpgme_release_decrypt_result ( c->result.decrypt );
break;
case RESULT_TYPE_SIGN:
_gpgme_release_sign_result ( c->result.sign );
break;
}
c->result.verify = NULL;
c->result_type = RESULT_TYPE_NONE;
}
/**
* gpgme_cancel:
* @c: the context
*
* Cancel the current operation. It is not guaranteed that it will work for
* all kinds of operations. It is especially useful in a passphrase callback
* to stop the system from asking another time for the passphrase.
**/
void
gpgme_cancel (GpgmeCtx c)
{
c->cancel = 1;
}
/**
* gpgme_get_notation:
* @c: the context
*
* If there is notation data available from the last signature check, this
* function may be used to return this notation data as a string. The string
* is an XML represantaton of that data embedded in a %<notation> container.
*
* Return value: An XML string or NULL if no notation data is available.
**/
char *
gpgme_get_notation ( GpgmeCtx c )
{
if ( !c->notation )
return NULL;
return _gpgme_data_get_as_string ( c->notation );
}
/**
* gpgme_set_armor:
* @c: the contect
* @yes: boolean value to set or clear that flag
*
* Enable or disable the use of an ascii armor for all output.
**/
void
gpgme_set_armor ( GpgmeCtx c, int yes )
{
if ( !c )
return; /* oops */
c->use_armor = yes;
}
/**
* gpgme_set_textmode:
* @c: the context
* @yes: boolean flag whether textmode should be enabled
*
* Enable or disable the use of the special textmode. Textmode is for example
* used for MIME (RFC2015) signatures
**/
void
gpgme_set_textmode ( GpgmeCtx c, int yes )
{
if ( !c )
return; /* oops */
c->use_textmode = yes;
}
/**
* gpgme_set_keylist_mode:
* @c: the context
* @mode: listing mode
*
* This function changes the default behaviour of the keylisting functions.
* Defines values for @mode are: %0 = normal, %1 = fast listing without
* information about key validity.
**/
void
gpgme_set_keylist_mode ( GpgmeCtx c, int mode )
{
- if (c)
+ if (!c)
return;
c->keylist_mode = mode;
}
/**
* gpgme_set_passphrase_cb:
* @c: the context
* @cb: A callback function
* @cb_value: The value passed to the callback function
*
* This function sets a callback function to be used to pass a passphrase
* to gpg. The preferred way to handle this is by using the gpg-agent, but
* because that beast is not ready for real use, you can use this passphrase
* thing.
*
* The callback function is defined as:
* <literal>
* typedef const char *(*GpgmePassphraseCb)(void*cb_value,
* const char *desc,
* void *r_hd);
* </literal>
* and called whenever gpgme needs a passphrase. DESC will have a nice
* text, to be used to prompt for the passphrase and R_HD is just a parameter
* to be used by the callback it self. Becuase the callback returns a const
* string, the callback might want to know when it can release resources
* assocated with that returned string; gpgme helps here by calling this
* passphrase callback with an DESC of %NULL as soon as it does not need
* the returned string anymore. The callback function might then choose
* to release resources depending on R_HD.
*
**/
void
gpgme_set_passphrase_cb ( GpgmeCtx c, GpgmePassphraseCb cb, void *cb_value )
{
c->passphrase_cb = cb;
c->passphrase_cb_value = cb_value;
}
/**
* gpgme_set_pprogress_cb:
* @c: the context
* @cb: A callback function
* @cb_value: The value passed to the callback function
*
* This function sets a callback function to be used as a progress indicator.
*
* The callback function is defined as:
* <literal>
* typedef void (*GpgmeProgressCb) (void*cb_value,
* const char *what, int type,
* int curretn, int total);
* </literal>
* For details on the progress events, see the entry for the PROGRESS
* status in the file doc/DETAILS of the GnuPG distribution.
**/
void
gpgme_set_progress_cb ( GpgmeCtx c, GpgmeProgressCb cb, void *cb_value )
{
c->progress_cb = cb;
c->progress_cb_value = cb_value;
}
diff --git a/gpgme/gpgme.h b/gpgme/gpgme.h
index 57e01304..0fe59f78 100644
--- a/gpgme/gpgme.h
+++ b/gpgme/gpgme.h
@@ -1,282 +1,282 @@
/* gpgme.h - GnuPG Made Easy
* Copyright (C) 2000 Werner Koch (dd9jn)
*
* This file is part of GPGME.
*
* GPGME is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* GPGME is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifndef GPGME_H
#define GPGME_H
#ifdef _MSC_VER
typedef long off_t
#else
# include <sys/types.h>
#endif
#ifdef __cplusplus
extern "C" {
#if 0 /* just to make Emacs auto-indent happy */
}
#endif
#endif
/*
* The version of this header should match the one of the library
* It should not be used by a program because gpgme_check_version(NULL)
* does return the same version. The purpose of this macro is to
* let autoconf (using the AM_PATH_GPGME macro) check that this
* header matches the installed library.
* Warning: Do not edit the next line. configure will do that for you! */
-#define GPGME_VERSION "0.1.4"
+#define GPGME_VERSION "0.1.4a"
struct gpgme_context_s;
typedef struct gpgme_context_s *GpgmeCtx;
struct gpgme_data_s;
typedef struct gpgme_data_s *GpgmeData;
struct gpgme_recipients_s;
typedef struct gpgme_recipients_s *GpgmeRecipients;
struct gpgme_key_s;
typedef struct gpgme_key_s *GpgmeKey;
struct gpgme_trust_item_s;
typedef struct gpgme_trust_item_s *GpgmeTrustItem;
typedef enum {
GPGME_EOF = -1,
GPGME_No_Error = 0,
GPGME_General_Error = 1,
GPGME_Out_Of_Core = 2,
GPGME_Invalid_Value = 3,
GPGME_Busy = 4,
GPGME_No_Request = 5,
GPGME_Exec_Error = 6,
GPGME_Too_Many_Procs = 7,
GPGME_Pipe_Error = 8,
GPGME_No_Recipients = 9,
GPGME_No_Data = 10,
GPGME_Conflict = 11,
GPGME_Not_Implemented = 12,
GPGME_Read_Error = 13,
GPGME_Write_Error = 14,
GPGME_Invalid_Type = 15,
GPGME_Invalid_Mode = 16,
GPGME_File_Error = 17, /* errno is set in this case */
GPGME_Decryption_Failed = 18,
GPGME_No_Passphrase = 19,
GPGME_Canceled = 20,
} GpgmeError;
typedef enum {
GPGME_DATA_TYPE_NONE = 0,
GPGME_DATA_TYPE_MEM = 1,
GPGME_DATA_TYPE_FD = 2,
GPGME_DATA_TYPE_FILE = 3,
GPGME_DATA_TYPE_CB = 4
} GpgmeDataType;
typedef enum {
GPGME_SIG_STAT_NONE = 0,
GPGME_SIG_STAT_GOOD = 1,
GPGME_SIG_STAT_BAD = 2,
GPGME_SIG_STAT_NOKEY = 3,
GPGME_SIG_STAT_NOSIG = 4,
GPGME_SIG_STAT_ERROR = 5
} GpgmeSigStat;
typedef enum {
GPGME_SIG_MODE_NORMAL = 0,
GPGME_SIG_MODE_DETACH = 1,
GPGME_SIG_MODE_CLEAR = 2
} GpgmeSigMode;
typedef enum {
GPGME_ATTR_KEYID = 1,
GPGME_ATTR_FPR = 2,
GPGME_ATTR_ALGO = 3,
GPGME_ATTR_LEN = 4,
GPGME_ATTR_CREATED = 5,
GPGME_ATTR_EXPIRE = 6,
GPGME_ATTR_OTRUST = 7,
GPGME_ATTR_USERID = 8,
GPGME_ATTR_NAME = 9,
GPGME_ATTR_EMAIL = 10,
GPGME_ATTR_COMMENT = 11,
GPGME_ATTR_VALIDITY= 12,
GPGME_ATTR_LEVEL = 13,
GPGME_ATTR_TYPE = 14
} GpgmeAttr;
typedef enum {
GPGME_VALIDITY_UNKNOWN = 0,
GPGME_VALIDITY_UNDEFINED = 1,
GPGME_VALIDITY_NEVER = 2,
GPGME_VALIDITY_MARGINAL = 3,
GPGME_VALIDITY_FULL = 4,
GPGME_VALIDITY_ULTIMATE = 5
} GpgmeValidity;
typedef const char *(*GpgmePassphraseCb)(void*,
const char *desc, void *r_hd);
typedef void (*GpgmeProgressCb)(void *opaque,
const char *what,
int type, int current, int total );
/* Context management */
GpgmeError gpgme_new (GpgmeCtx *r_ctx);
void gpgme_release (GpgmeCtx c);
void gpgme_cancel (GpgmeCtx c);
GpgmeCtx gpgme_wait (GpgmeCtx c, int hang);
char *gpgme_get_notation (GpgmeCtx c);
void gpgme_set_armor (GpgmeCtx c, int yes);
void gpgme_set_textmode (GpgmeCtx c, int yes);
void gpgme_set_keylist_mode ( GpgmeCtx c, int mode );
void gpgme_set_passphrase_cb (GpgmeCtx c,
GpgmePassphraseCb cb, void *cb_value);
void gpgme_set_progress_cb (GpgmeCtx c, GpgmeProgressCb cb, void *cb_value);
/* Functions to handle recipients */
GpgmeError gpgme_recipients_new (GpgmeRecipients *r_rset);
void gpgme_recipients_release ( GpgmeRecipients rset);
GpgmeError gpgme_recipients_add_name (GpgmeRecipients rset,
const char *name);
GpgmeError gpgme_recipients_add_name_with_validity (GpgmeRecipients rset,
const char *name,
GpgmeValidity val );
unsigned int gpgme_recipients_count ( const GpgmeRecipients rset );
GpgmeError gpgme_recipients_enum_open (const GpgmeRecipients rset,void **ctx);
const char *gpgme_recipients_enum_read (const GpgmeRecipients rset,void **ctx);
GpgmeError gpgme_recipients_enum_close (const GpgmeRecipients rset,void **ctx);
/* Functions to handle data sources */
GpgmeError gpgme_data_new ( GpgmeData *r_dh );
GpgmeError gpgme_data_new_from_mem ( GpgmeData *r_dh,
const char *buffer, size_t size,
int copy );
GpgmeError gpgme_data_new_with_read_cb ( GpgmeData *r_dh,
int (*read_cb)(void*,char *,size_t,size_t*),
void *read_cb_value );
GpgmeError gpgme_data_new_from_file ( GpgmeData *r_dh,
const char *fname,
int copy );
GpgmeError gpgme_data_new_from_filepart ( GpgmeData *r_dh,
const char *fname, FILE *fp,
off_t offset, off_t length );
void gpgme_data_release ( GpgmeData dh );
char * gpgme_data_release_and_get_mem ( GpgmeData dh, size_t *r_len );
GpgmeDataType gpgme_data_get_type ( GpgmeData dh );
GpgmeError gpgme_data_rewind ( GpgmeData dh );
GpgmeError gpgme_data_read ( GpgmeData dh,
char *buffer, size_t length, size_t *nread );
GpgmeError gpgme_data_write ( GpgmeData dh,
const char *buffer, size_t length );
/* Key and trust functions */
void gpgme_key_release ( GpgmeKey key );
char *gpgme_key_get_as_xml ( GpgmeKey key );
const char *gpgme_key_get_string_attr ( GpgmeKey key, GpgmeAttr what,
const void *reserved, int idx );
unsigned long gpgme_key_get_ulong_attr ( GpgmeKey key, GpgmeAttr what,
const void *reserved, int idx );
void gpgme_trust_item_release ( GpgmeTrustItem item );
const char *gpgme_trust_item_get_string_attr ( GpgmeTrustItem item,
GpgmeAttr what,
const void *reserved, int idx );
int gpgme_trust_item_get_int_attr ( GpgmeTrustItem item, GpgmeAttr what,
const void *reserved, int idx );
/* Basic GnuPG functions */
GpgmeError gpgme_op_encrypt_start ( GpgmeCtx c,
GpgmeRecipients recp,
GpgmeData in, GpgmeData out );
GpgmeError gpgme_op_decrypt_start ( GpgmeCtx c,
GpgmeData ciph, GpgmeData plain );
GpgmeError gpgme_op_sign_start ( GpgmeCtx c,
GpgmeData in, GpgmeData out,
GpgmeSigMode mode );
GpgmeError gpgme_op_verify_start ( GpgmeCtx c,
GpgmeData sig, GpgmeData text );
GpgmeError gpgme_op_import_start ( GpgmeCtx c, GpgmeData keydata );
GpgmeError gpgme_op_export_start ( GpgmeCtx c, GpgmeRecipients recp,
GpgmeData keydata );
GpgmeError gpgme_op_genkey_start ( GpgmeCtx c, const char *parms,
GpgmeData pubkey, GpgmeData seckey );
/* Key management functions */
GpgmeError gpgme_op_keylist_start ( GpgmeCtx c,
const char *pattern, int secret_only );
GpgmeError gpgme_op_keylist_next ( GpgmeCtx c, GpgmeKey *r_key );
GpgmeError gpgme_op_trustlist_start ( GpgmeCtx c,
const char *pattern, int max_level );
GpgmeError gpgme_op_trustlist_next ( GpgmeCtx c, GpgmeTrustItem *r_item );
/* Convenience functions for normal usage */
GpgmeError gpgme_op_encrypt ( GpgmeCtx c, GpgmeRecipients recp,
GpgmeData in, GpgmeData out );
GpgmeError gpgme_op_decrypt ( GpgmeCtx c,
GpgmeData in, GpgmeData out );
GpgmeError gpgme_op_sign ( GpgmeCtx c, GpgmeData in, GpgmeData out,
GpgmeSigMode mode);
GpgmeError gpgme_op_verify ( GpgmeCtx c, GpgmeData sig, GpgmeData text,
GpgmeSigStat *r_status );
GpgmeError gpgme_op_import ( GpgmeCtx c, GpgmeData keydata );
GpgmeError gpgme_op_export ( GpgmeCtx c, GpgmeRecipients recp,
GpgmeData keydata );
GpgmeError gpgme_op_genkey ( GpgmeCtx c, const char *parms,
GpgmeData pubkey, GpgmeData seckey );
/* miscellaneous functions */
const char *gpgme_check_version ( const char *req_version );
const char *gpgme_strerror (GpgmeError err);
void gpgme_register_idle ( void (*fnc)(void) );
#ifdef __cplusplus
}
#endif
#endif /* GPGME_H */
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Mon, Jan 12, 10:37 PM (1 d, 10 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
ac/58/d0aad143852f4e346a1a262d276a
Attached To
rM GPGME
Event Timeline
Log In to Comment