Replace use of Sequoia's backend with a custom key store.
- Sequoia's key store doesn't meet pep's needs (in particular, the
ability to search on a key's user id) and trying to shoehorn pep's
needs onto Sequoia's key store abstractions is just introducing
overhead with no appreciable gain in functionality.
- This patch changes the Sequoia backend to use a local sqlite
database to store the public keys.
1 // This file is under GNU General Public License 3.0
13 static inline FILE * Fopen(const char *filename, const char *mode)
18 f = fopen(filename, mode);
19 } while (f == NULL && errno == EINTR);
24 static inline FILE * Fdopen(int fildes, const char *mode)
29 f = fdopen(fildes, mode);
30 } while (f == NULL && errno == EINTR);
35 static inline char *Fgets(char * str, int size, FILE * stream)
40 s = fgets(str, size, stream);
41 } while (s == NULL && errno == EINTR);
46 static inline int Fputs(const char *str, FILE * stream)
51 r = fputs(str, stream);
52 } while (r == EOF && errno == EINTR);
57 static inline int Fclose(FILE *stream)
63 } while (r == EOF && errno == EINTR);
68 static inline FILE * Freopen(
77 f = freopen(filename, mode, stream);
78 } while (f == NULL && errno == EINTR);
83 static inline int Fprintf(FILE * stream, const char * format, ...)
88 va_start(arglist, format);
91 n = vfprintf(stream, format, arglist);
92 } while (n < 0 && errno == EINTR);
99 static inline size_t Fwrite(const void *ptr, size_t size, size_t nitems, FILE *stream)
105 size_t n = fwrite((char *) ptr + r, size, nitems, stream);
108 } while (nitems && ferror(stream) == EINTR);
113 static inline size_t Fread(void *ptr, size_t size, size_t nitems, FILE *stream)
119 size_t n = fread((char *) ptr + r, size, nitems, stream);
122 } while (!feof(stream) && nitems && ferror(stream) == EINTR);
127 static inline int Fflush(FILE *stream)
133 } while (r == -1 && errno == EINTR);
138 static inline int Mkstemp(char *template)
143 fd = mkstemp(template);
144 } while (fd == -1 && errno == EINTR);
149 static inline int Close(int fildes)
155 } while (r == -1 && errno == EINTR);