]> git.notmuchmail.org Git - notmuch/blob - util/util.c
crypto: handle PKCS#7 envelopedData in _notmuch_crypto_decrypt
[notmuch] / util / util.c
1 #include "util.h"
2 #include "error_util.h"
3 #include <string.h>
4 #include <errno.h>
5
6 const char *
7 util_error_string (util_status_t errnum)
8 {
9     switch (errnum) {
10     case UTIL_SUCCESS:
11         return "success";
12     case UTIL_OUT_OF_MEMORY:
13         return "out of memory";
14     case UTIL_EOF:
15         return "end of file";
16     case UTIL_ERRNO:
17         return strerror (errno);
18     case UTIL_GZERROR:
19         /* we lack context to be more informative here */
20         return "zlib error";
21     default:
22         INTERNAL_ERROR ("unexpected error status %d", errnum);
23     }
24 }