summaryrefslogtreecommitdiffstats
path: root/g10/gpg.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2006-04-19 13:26:11 +0200
committerWerner Koch <wk@gnupg.org>2006-04-19 13:26:11 +0200
commit29b23dea9731e8f258211bc6fd733d205c18e2a8 (patch)
treeff2a0f66bda0c1f050e8fa00cbf610e18b91c9f7 /g10/gpg.h
parent2006-04-14 Marcus Brinkmann <marcus@g10code.de> (diff)
downloadgnupg2-29b23dea9731e8f258211bc6fd733d205c18e2a8.tar.xz
gnupg2-29b23dea9731e8f258211bc6fd733d205c18e2a8.zip
Merged with gpg 1.4.3 code.
The gpg part does not yet build.
Diffstat (limited to 'g10/gpg.h')
-rw-r--r--g10/gpg.h65
1 files changed, 63 insertions, 2 deletions
diff --git a/g10/gpg.h b/g10/gpg.h
index 42c9cc662..8ef46fdca 100644
--- a/g10/gpg.h
+++ b/g10/gpg.h
@@ -1,5 +1,5 @@
/* gpg.h - top level include file for gpg etc.
- * Copyright (C) 2003 Free Software Foundation, Inc.
+ * Copyright (C) 2003, 2006 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -32,9 +32,70 @@
#define map_assuan_err(a) \
map_assuan_err_with_source (GPG_ERR_SOURCE_DEFAULT, (a))
#include <gpg-error.h>
+#include <gcrypt.h>
-/* FIXME: merge this with global.h */
+/* Number of bits we accept when reading or writing MPIs. */
+#define MAX_EXTERN_MPI_BITS 16384
+
+/* The maximum length of a binary fingerprints. */
+#define MAX_FINGERPRINT_LEN 20
+
+
+/* Forward declarations. */
+typedef struct kbnode_struct *KBNODE;
+typedef struct keydb_search_desc KEYDB_SEARCH_DESC;
+
+
+
+/* Simple wrappers. */
+#define g10_errstr(a) gpg_strerror ((a))
+
+
+/* Mapping of the old erro codes to the gpg-error ones. Fixme: This
+ is just a temporary solution: We need to do all these gpg_error()
+ calls in the code. */
+#define G10ERR_BAD_KEY GPG_ERR_BAD_KEY
+#define G10ERR_BAD_PASS GPG_ERR_BAD_PASS
+#define G10ERR_BAD_PUBKEY GPG_ERR_BAD_PUBKEY
+#define G10ERR_BAD_SIGN GPG_ERR_BAD_SIGNATURE
+#define G10ERR_BAD_URI GPG_ERR_BAD_URI
+#define G10ERR_CHECKSUM GPG_ERR_CHECKSUM
+#define G10ERR_CIPHER_ALGO GPG_ERR_CIPHER_ALGO
+#define G10ERR_CLOSE_FILE GPG_ERR_CLOSE_FILE
+#define G10ERR_COMPR_ALGO GPG_ERR_COMPR_ALGO
+#define G10ERR_CREATE_FILE GPG_ERR_CREATE_FILE
+#define G10ERR_DIGEST_ALGO GPG_ERR_DIGEST_ALGO
+#define G10ERR_FILE_EXISTS GPG_ERR_EEXIST
+#define G10ERR_GENERAL GPG_ERR_GENERAL
+#define G10ERR_INV_ARG GPG_ERR_INV_ARG
+#define G10ERR_INV_KEYRING GPG_ERR_INV_KEYRING
+#define G10ERR_INV_USER_ID GPG_ERR_INV_USER_ID
+#define G10ERR_INVALID_ARMOR GPG_ERR_INV_ARMOR
+#define G10ERR_INVALID_PACKET GPG_ERR_INV_PACKET
+#define G10ERR_KEYRING_OPEN GPG_ERR_KEYRING_OPEN
+#define G10ERR_KEYSERVER GPG_ERR_KEYSERVER
+#define G10ERR_NO_DATA GPG_ERR_NO_DATA
+#define G10ERR_NO_PUBKEY GPG_ERR_NO_PUBKEY
+#define G10ERR_NO_SECKEY GPG_ERR_NO_SECKEY
+#define G10ERR_NO_USER_ID GPG_ERR_NO_USER_ID
+#define G10ERR_NOT_PROCESSED GPG_ERR_NOT_PROCESSED
+#define G10ERR_OPEN_FILE GPG_ERR_OPEN_FILE
+#define G10ERR_PASSPHRASE GPG_ERR_PASSPHRASE
+#define G10ERR_PUBKEY_ALGO GPG_ERR_PUBKEY_ALGO
+#define G10ERR_READ_FILE GPG_ERR_READ_FILE
+#define G10ERR_RENAME_FILE GPG_ERR_RENAME_FILE
+#define G10ERR_RESOURCE_LIMIT GPG_ERR_RESOURCE_LIMIT
+#define G10ERR_SIG_CLASS GPG_ERR_SIG_CLASS
+#define G10ERR_TIME_CONFLICT GPG_ERR_TIME_CONFLICT
+#define G10ERR_TRUSTDB GPG_ERR_TRUSTDB
+#define G10ERR_UNEXPECTED GPG_ERR_UNEXPECTED
+#define G10ERR_UNKNOWN_PACKET GPG_ERR_UNKNOWN_PACKET
+#define G10ERR_UNSUPPORTED GPG_ERR_UNSUPPORTED
+#define G10ERR_UNU_PUBKEY GPG_ERR_UNUSABLE_PUBKEY
+#define G10ERR_UNU_SECKEY GPG_ERR_UNUSABLE_SECKEY
+#define G10ERR_WRONG_SECKEY GPG_ERR_WRONG_SECKEY
+
#endif /*GNUPG_G10_GPG_H*/