mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
sm: Add OPTION request-origin.
* sm/server.c: Include shareddefs.h. (option_handler): Add option. -- This is required when running gpgsm in server mode as done by GPGME. Noet that a command line option takes precedence. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
2cd35df5db
commit
137644c9cb
12
sm/server.c
12
sm/server.c
@ -32,6 +32,7 @@
|
|||||||
#include "../common/sysutils.h"
|
#include "../common/sysutils.h"
|
||||||
#include "../common/server-help.h"
|
#include "../common/server-help.h"
|
||||||
#include "../common/asshelp.h"
|
#include "../common/asshelp.h"
|
||||||
|
#include "../common/shareddefs.h"
|
||||||
|
|
||||||
#define set_error(e,t) assuan_set_error (ctx, gpg_error (e), (t))
|
#define set_error(e,t) assuan_set_error (ctx, gpg_error (e), (t))
|
||||||
|
|
||||||
@ -289,6 +290,17 @@ option_handler (assuan_context_t ctx, const char *key, const char *value)
|
|||||||
ctrl->offline = i;
|
ctrl->offline = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (!strcmp (key, "request-origin"))
|
||||||
|
{
|
||||||
|
if (!opt.request_origin)
|
||||||
|
{
|
||||||
|
int i = parse_request_origin (value);
|
||||||
|
if (i == -1)
|
||||||
|
err = gpg_error (GPG_ERR_INV_VALUE);
|
||||||
|
else
|
||||||
|
opt.request_origin = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
err = gpg_error (GPG_ERR_UNKNOWN_OPTION);
|
err = gpg_error (GPG_ERR_UNKNOWN_OPTION);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user