22 |
#endif |
#endif |
23 |
|
|
24 |
#include <windows.h> |
#include <windows.h> |
|
#include <windows.h> |
|
25 |
#include <sys/stat.h> |
#include <sys/stat.h> |
26 |
|
|
27 |
#include "gpgme.h" |
#include "gpgme.h" |
325 |
} |
} |
326 |
|
|
327 |
|
|
328 |
/* If @export is 1, export the ownertrust data to the |
/* If EXPORTFLAG is 1, export the ownertrust data to the |
329 |
buffer @data. Otherwise import the ownertrust data from @data. |
buffer DATA. Otherwise import the ownertrust data from DATA. |
330 |
Return value: 0 on success. */ |
Return value: 0 on success. */ |
331 |
gpgme_error_t |
gpgme_error_t |
332 |
gpg_manage_ownertrust (char **data, int export) |
gpg_manage_ownertrust (char **data, int exportflag) |
333 |
{ |
{ |
334 |
gpgme_error_t err = gpg_error (GPG_ERR_NO_ERROR); |
gpgme_error_t err = gpg_error (GPG_ERR_NO_ERROR); |
335 |
HANDLE out = NULL, in = NULL; |
HANDLE out = NULL, in = NULL; |
345 |
if (!cmd) |
if (!cmd) |
346 |
abort (); |
abort (); |
347 |
sprintf (cmd, "%s %s", p, |
sprintf (cmd, "%s %s", p, |
348 |
export? "--export-ownertrust" : "--import-ownertrust"); |
exportflag? "--export-ownertrust" : "--import-ownertrust"); |
349 |
|
|
350 |
if (export) |
if (exportflag) |
351 |
out = create_tmpfile ("gpg_ot_out"); |
out = create_tmpfile ("gpg_ot_out"); |
352 |
else { |
else { |
353 |
DWORD nw; |
DWORD nw; |