mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-14 21:47:19 +02:00
* keydb.h [!ENABLE_AGENT_SUPPORT]: Define dummy types.
* cardglue.c (assuan_strerror, assuan_transact): Dummy functions if not build with agent support. * zh_TW.po, zh_CN.po, es.po, ro.po: Updated. * tr.po: Updated from TP. Note: this is an exception in general translations from the Robot are not anymore accepted. * regcomp.c (MB_CUR_MAX) [_WIN32]: Define it only if not defined.
This commit is contained in:
parent
7d4043ca57
commit
a6a93ac540
34 changed files with 6933 additions and 7065 deletions
|
@ -44,11 +44,6 @@
|
|||
#include "apdu.h"
|
||||
#include "app-common.h"
|
||||
|
||||
/* If we build w/o agent support, assuan.h won't be included and thus
|
||||
we need to define a repalcement for the assuan error type. */
|
||||
#ifndef ENABLE_AGENT_SUPPORT
|
||||
typedef int assuan_error_t;
|
||||
#endif
|
||||
|
||||
|
||||
struct ctrl_ctx_s
|
||||
|
@ -81,6 +76,48 @@ static app_t current_app;
|
|||
static assuan_error_t learn_status_cb (void *opaque, const char *line);
|
||||
|
||||
|
||||
/* To avoid cluttering the code with bunches of ifdefs we use a few
|
||||
dummy functions instead and defines. */
|
||||
#ifndef ENABLE_AGENT_SUPPORT
|
||||
|
||||
#define ASSUAN_LINELENGTH 100
|
||||
|
||||
static assuan_context_t
|
||||
agent_open (int try)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
agent_close (assuan_context_t ctx)
|
||||
{
|
||||
}
|
||||
|
||||
const char *
|
||||
assuan_strerror (assuan_error_t err)
|
||||
{
|
||||
return "no Assuan support";
|
||||
}
|
||||
|
||||
assuan_error_t
|
||||
assuan_transact (assuan_context_t ctx,
|
||||
const char *command,
|
||||
assuan_error_t (*data_cb)(void *, const void *, size_t),
|
||||
void *data_cb_arg,
|
||||
assuan_error_t (*inquire_cb)(void*, const char *),
|
||||
void *inquire_cb_arg,
|
||||
assuan_error_t (*status_cb)(void*, const char *),
|
||||
void *status_cb_arg)
|
||||
{
|
||||
return 100; /* ASSUAN_NOT_IMPLEMENTED */
|
||||
}
|
||||
assuan_error_t
|
||||
assuan_send_data (assuan_context_t ctx, const void *buffer, size_t length)
|
||||
{
|
||||
return 100; /* ASSUAN_NOT_IMPLEMENTED */
|
||||
}
|
||||
#endif /*!ENABLE_AGENT_SUPPORT*/
|
||||
|
||||
|
||||
/* Create a serialno/fpr string from the serial number and the secret
|
||||
key. caller must free the returned string. There is no error
|
||||
|
@ -253,9 +290,6 @@ app_get_serial_and_stamp (app_t app, char **serial, time_t *stamp)
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Release the card info structure. */
|
||||
void
|
||||
agent_release_card_info (struct agent_card_info_s *info)
|
||||
|
@ -280,7 +314,7 @@ agent_release_card_info (struct agent_card_info_s *info)
|
|||
}
|
||||
|
||||
|
||||
/* Print an error message for a failed assuan-Transact and return a
|
||||
/* Print an error message for a failed assuan_transact and return a
|
||||
gpg error code. No error is printed if RC is 0. */
|
||||
static gpg_error_t
|
||||
test_transact (int rc, const char *command)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue