diff options
Diffstat (limited to 'sm/qualified.c')
-rw-r--r-- | sm/qualified.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sm/qualified.c b/sm/qualified.c index 564e77929..b43371756 100644 --- a/sm/qualified.c +++ b/sm/qualified.c @@ -35,7 +35,7 @@ NULL indicates that this module has been initialized and if the LISTFP is also NULL, no list of qualified signatures exists. */ static char *listname; -static FILE *listfp; +static estream_t listfp; /* Read the trustlist and return entry by entry. KEY must point to a @@ -59,7 +59,7 @@ read_list (char *key, char *country, int *lnr) if (!listname) { listname = make_filename (gnupg_datadir (), "qualified.txt", NULL); - listfp = fopen (listname, "r"); + listfp = es_fopen (listname, "r"); if (!listfp && errno != ENOENT) { err = gpg_error_from_syserror (); @@ -73,9 +73,9 @@ read_list (char *key, char *country, int *lnr) do { - if (!fgets (line, DIM(line)-1, listfp) ) + if (!es_fgets (line, DIM(line)-1, listfp) ) { - if (feof (listfp)) + if (es_feof (listfp)) return gpg_error (GPG_ERR_EOF); return gpg_error_from_syserror (); } @@ -83,7 +83,7 @@ read_list (char *key, char *country, int *lnr) if (!*line || line[strlen(line)-1] != '\n') { /* Eat until end of line. */ - while ( (c=getc (listfp)) != EOF && c != '\n') + while ((c = es_getc (listfp)) != EOF && c != '\n') ; return gpg_error (*line? GPG_ERR_LINE_TOO_LONG : GPG_ERR_INCOMPLETE_LINE); @@ -163,8 +163,8 @@ gpgsm_is_in_qualified_list (ctrl_t ctrl, ksba_cert_t cert, char *country) if (listfp) { /* W32ce has no rewind, thus we use the equivalent code. */ - fseek (listfp, 0, SEEK_SET); - clearerr (listfp); + es_fseek (listfp, 0, SEEK_SET); + es_clearerr (listfp); } while (!(err = read_list (key, mycountry, &lnr))) { |