aboutsummaryrefslogtreecommitdiffstats
path: root/common/errors.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2001-11-24 17:43:43 +0000
committerWerner Koch <[email protected]>2001-11-24 17:43:43 +0000
commitbab7fa0b297b8e99f5e222bbceda0716b62f7215 (patch)
treeb3fe5f7ec7e1c1bed0bdd98f036c27d605106d15 /common/errors.h
parentSigning does now work. There is no secret key management yet, so you (diff)
downloadgnupg-bab7fa0b297b8e99f5e222bbceda0716b62f7215.tar.gz
gnupg-bab7fa0b297b8e99f5e222bbceda0716b62f7215.zip
Added new directory common to enable sharing of some code and error
numbers between gpg, gpgsm and gpg-agent. Move some files and code to there.
Diffstat (limited to 'common/errors.h')
-rw-r--r--common/errors.h122
1 files changed, 122 insertions, 0 deletions
diff --git a/common/errors.h b/common/errors.h
new file mode 100644
index 000000000..4f7cb32f0
--- /dev/null
+++ b/common/errors.h
@@ -0,0 +1,122 @@
+/* errors.h - Globally used error codes
+ * Copyright (C) 2001 Free Software Foundation, Inc.
+ *
+ * This file is part of GnuPG.
+ *
+ * GnuPG 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.
+ *
+ * GnuPG 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 GNUPG_COMMON_ERRORS_H
+#define GNUPG_COMMON_ERRORS_H
+
+#include "util.h"
+
+/* Error numbers */
+enum {
+ GNUPG_EOF = -1,
+ GNUPG_No_Error = 0,
+ GNUPG_General_Error = 1,
+ GNUPG_Out_Of_Core = 2,
+ GNUPG_Invalid_Value = 3,
+ GNUPG_IO_Error = 4,
+ GNUPG_Resource_Limit = 5,
+ GNUPG_Internal_Error = 6,
+ GNUPG_Bad_Certificate = 7,
+ GNUPG_Bad_Certificate_Path = 8,
+ GNUPG_Missing_Certificate = 9,
+ GNUPG_No_Data = 10,
+ GNUPG_Bad_Signature = 11,
+ GNUPG_Not_Implemented = 12,
+ GNUPG_Conflict = 13,
+ GNUPG_Bug = 14
+};
+
+/* Status codes - fixme: should go into another file */
+enum {
+ STATUS_ENTER,
+ STATUS_LEAVE,
+ STATUS_ABORT,
+ STATUS_GOODSIG,
+ STATUS_BADSIG,
+ STATUS_ERRSIG,
+ STATUS_BADARMOR,
+ STATUS_RSA_OR_IDEA,
+ STATUS_SIGEXPIRED,
+ STATUS_KEYREVOKED,
+ STATUS_TRUST_UNDEFINED,
+ STATUS_TRUST_NEVER,
+ STATUS_TRUST_MARGINAL,
+ STATUS_TRUST_FULLY,
+ STATUS_TRUST_ULTIMATE,
+
+ STATUS_SHM_INFO,
+ STATUS_SHM_GET,
+ STATUS_SHM_GET_BOOL,
+ STATUS_SHM_GET_HIDDEN,
+
+ STATUS_NEED_PASSPHRASE,
+ STATUS_VALIDSIG,
+ STATUS_SIG_ID,
+ STATUS_ENC_TO,
+ STATUS_NODATA,
+ STATUS_BAD_PASSPHRASE,
+ STATUS_NO_PUBKEY,
+ STATUS_NO_SECKEY,
+ STATUS_NEED_PASSPHRASE_SYM,
+ STATUS_DECRYPTION_FAILED,
+ STATUS_DECRYPTION_OKAY,
+ STATUS_MISSING_PASSPHRASE,
+ STATUS_GOOD_PASSPHRASE,
+ STATUS_GOODMDC,
+ STATUS_BADMDC,
+ STATUS_ERRMDC,
+ STATUS_IMPORTED,
+ STATUS_IMPORT_RES,
+ STATUS_FILE_START,
+ STATUS_FILE_DONE,
+ STATUS_FILE_ERROR,
+
+ STATUS_BEGIN_DECRYPTION,
+ STATUS_END_DECRYPTION,
+ STATUS_BEGIN_ENCRYPTION,
+ STATUS_END_ENCRYPTION,
+
+ STATUS_DELETE_PROBLEM,
+ STATUS_GET_BOOL,
+ STATUS_GET_LINE,
+ STATUS_GET_HIDDEN,
+ STATUS_GOT_IT,
+ STATUS_PROGRESS,
+ STATUS_SIG_CREATED,
+ STATUS_SESSION_KEY,
+ STATUS_NOTATION_NAME,
+ STATUS_NOTATION_DATA,
+ STATUS_POLICY_URL,
+ STATUS_BEGIN_STREAM,
+ STATUS_END_STREAM,
+ STATUS_KEY_CREATED,
+ STATUS_USERID_HIN,
+ STATUS_UNEXPECTED,
+ STATUS_INV_RECP,
+ STATUS_NO_RECP,
+ STATUS_ALREADY_SIGNED,
+};
+
+
+/*-- errors.c (built) --*/
+const char *gnupg_strerror (int err);
+
+
+#endif /*GNUPG_COMMON_ERRORS_H*/