Merge branch 't/writer_setup_cleanup'
[paraslash.git] / error.h
diff --git a/error.h b/error.h
index 3f5ff73be3b1b5b8314b836c794b7a62b8740e91..a56faf544534557cf96e9e434acfa696a2bf7c3e 100644 (file)
--- a/error.h
+++ b/error.h
@@ -34,6 +34,7 @@ DEFINE_ERRLIST_OBJECT_ENUM;
 #define STDOUT_ERRORS
 #define FILE_WRITE_ERRORS
 #define STDIN_ERRORS
+#define WRITE_ERRORS
 
 extern const char **para_errlist[];
 
@@ -368,6 +369,12 @@ extern const char **para_errlist[];
        PARA_ERROR(AFS_SHORT_READ, "short read from afs socket"), \
 
 
+#define CRYPT_COMMON_ERRORS \
+       PARA_ERROR(SSH_KEY_HEADER, "ssh key header not found"), \
+       PARA_ERROR(BASE64, "failed to base64-decode ssh public key"), \
+       PARA_ERROR(KEY_PERM, "unprotected private key"), \
+
+
 #define CRYPT_ERRORS \
        PARA_ERROR(PRIVATE_KEY, "can not read private key"), \
        PARA_ERROR(PUBLIC_KEY, "can not read public key"), \
@@ -375,10 +382,23 @@ extern const char **para_errlist[];
        PARA_ERROR(ENCRYPT, "encrypt error"), \
        PARA_ERROR(DECRYPT, "decrypt error"), \
        PARA_ERROR(BLINDING, "failed to activate key blinding"), \
-       PARA_ERROR(KEY_PERM, "unprotected private key"), \
-       PARA_ERROR(BASE64, "failed to base64-decode ssh private key"), \
        PARA_ERROR(BIGNUM, "bignum error"), \
 
+#define GCRYPT_ERRORS \
+       PARA_ERROR(MPI_SCAN, "could not scan multi-precision integer"), \
+       PARA_ERROR(MPI_PRINT, "could not convert multi-precision integer"), \
+       PARA_ERROR(SEXP_FIND, "could not find sublist in S-expression"), \
+       PARA_ERROR(SEXP_BUILD, "could not build S-expression"), \
+       PARA_ERROR(SEXP_ENCRYPT, "could not encrypt S-expression"), \
+       PARA_ERROR(SEXP_DECRYPT, "could not decrypt S-expression"), \
+       PARA_ERROR(MD_OPEN, "could not open message digest object"), \
+       PARA_ERROR(CIPHER_OPEN, "could not create stream cipher handle"), \
+       PARA_ERROR(BAD_PRIVATE_KEY, "invalid private key"), \
+       PARA_ERROR(KEY_MARKER, "invalid/missing key header or footer"), \
+       PARA_ERROR(ASN1_PARSE, "could not parse ASN.1 key"), \
+       PARA_ERROR(SSH_PARSE, "could not parse ssh public key"), \
+       PARA_ERROR(OEAP, "error during oeap (un)padding"), \
+
 
 #define COMMAND_ERRORS \
        PARA_ERROR(COMMAND_SYNTAX, "syntax error in command"), \
@@ -403,10 +423,6 @@ extern const char **para_errlist[];
        PARA_ERROR(READ_PATTERN, "did not read expected pattern"), \
 
 
-#define WRITE_ERRORS \
-       PARA_ERROR(WRITE_SYNTAX, "para_write syntax error"), \
-
-
 #define ALSA_WRITE_ERRORS \
        PARA_ERROR(BROKEN_CONF, "Broken alsa configuration"), \
        PARA_ERROR(ACCESS_TYPE, "alsa access type not available"), \
@@ -422,10 +438,10 @@ extern const char **para_errlist[];
        PARA_ERROR(SET_RATE, "snd_pcm_hw_params_set_rate_near failed"), \
        PARA_ERROR(START_THRESHOLD, "snd_pcm_sw_params_set_start_threshold() failed"), \
        PARA_ERROR(STOP_THRESHOLD, "snd_pcm_sw_params_set_stop_threshold() failed"), \
+       PARA_ERROR(ALSA_POLL_FDS, "could not get alsa poll fd"), \
 
 
 #define WRITE_COMMON_ERRORS \
-       PARA_ERROR(WRITE_COMMON_SYNTAX, "syntax error in write option"), \
        PARA_ERROR(WRITE_COMMON_EOF, "end of file"), \