156 |
free_if_alloc (path); |
free_if_alloc (path); |
157 |
return keyring; |
return keyring; |
158 |
} |
} |
159 |
if (file_exist_check (keyring) || get_file_size (keyring) == 0) { |
if (file_exist_check (keyring) || pub && get_file_size (keyring) == 0) { |
160 |
free_if_alloc (keyring); |
free_if_alloc (keyring); |
161 |
optfile = make_filename (path, GPG_CONF, NULL); |
optfile = make_filename (path, GPG_CONF, NULL); |
162 |
keyring = get_gnupg_keyring_from_options (optfile, pub); |
keyring = get_gnupg_keyring_from_options (optfile, pub); |
170 |
/* Return the full path (with the gpg exe name). First the registry is scanned |
/* Return the full path (with the gpg exe name). First the registry is scanned |
171 |
for the entry 'gpgProgram'. If it wasn't set, the default path is the |
for the entry 'gpgProgram'. If it wasn't set, the default path is the |
172 |
appended string 'gpg.exe' is used. */ |
appended string 'gpg.exe' is used. */ |
173 |
|
|
174 |
|
/* FIXME: Use gpgme's engine info here. */ |
175 |
char* |
char* |
176 |
get_gnupg_prog (void) |
get_gnupg_prog (void) |
177 |
{ |
{ |
217 |
break; |
break; |
218 |
} |
} |
219 |
} |
} |
220 |
if (!keyid) { |
if (!keyid) |
221 |
*ret_no_useable = 1; |
*ret_no_useable = 1; |
|
msg_box (NULL, _("No useable secret key found."), _("GPG Error"), MB_ERR); |
|
|
} |
|
222 |
return keyid; |
return keyid; |
223 |
} |
} |
224 |
|
|
358 |
gpgme_release (ctx); |
gpgme_release (ctx); |
359 |
return rc; |
return rc; |
360 |
} |
} |
361 |
|
|
362 |
|
/* FIXME: This check is wrong! */ |
363 |
if (major < *r_major || minor < *r_minor) |
if (major < *r_major || minor < *r_minor) |
364 |
rc = 1; |
rc = 1; |
365 |
else { |
else { |