233 |
{ |
{ |
234 |
config_file_t opt; |
config_file_t opt; |
235 |
char *conf; |
char *conf; |
236 |
|
int rc = 0; |
237 |
|
|
238 |
conf = get_gnupg_cfgfile (); |
conf = get_gnupg_cfgfile (); |
239 |
if (!conf) |
if (!conf) |
242 |
free_if_alloc (conf); |
free_if_alloc (conf); |
243 |
return -1; |
return -1; |
244 |
} |
} |
245 |
|
free_if_alloc (conf); |
246 |
if (conf_find_option (opt, "ask-cert-level")) |
if (conf_find_option (opt, "ask-cert-level")) |
247 |
reg_prefs.gpg.ask_cert_level = 1; |
reg_prefs.gpg.ask_cert_level = 1; |
248 |
if (conf_find_option (opt, "ask-cert-expire")) |
if (conf_find_option (opt, "ask-cert-expire")) |
249 |
reg_prefs.gpg.ask_cert_expire = 1; |
reg_prefs.gpg.ask_cert_expire = 1; |
250 |
|
/* The 'textmode' option for GPG is useful for text files |
251 |
|
but it breaks the output of any binary data. Thus we return |
252 |
|
a warning here to inform the user that binary output is broken. */ |
253 |
|
if (conf_find_option (opt, "textmode")) |
254 |
|
rc = -2; |
255 |
release_config (opt); |
release_config (opt); |
256 |
free_if_alloc (conf); |
|
257 |
return 0; |
return rc; |
258 |
} |
} |
259 |
|
|
260 |
|
|
673 |
int nbytes = 0, lineno=0; |
int nbytes = 0, lineno=0; |
674 |
unsigned j; |
unsigned j; |
675 |
|
|
676 |
for (j = 0; j < strlen (buf) && j < sizeof (line); j++) { |
for (j = 0; j < strlen (buf) && j < DIM (line); j++) { |
677 |
line[nbytes++] = buf[j]; |
line[nbytes++] = buf[j]; |
678 |
if (buf[j] == '\n' || j == (strlen (buf) - 1)) { |
if (buf[j] == '\n' || j == (strlen (buf) - 1)) { |
679 |
line[nbytes] = '\0'; |
line[nbytes] = '\0'; |