aboutsummaryrefslogtreecommitdiffstats
path: root/src/starter
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2007-07-03 09:26:44 +0000
committerAndreas Steffen <andreas.steffen@strongswan.org>2007-07-03 09:26:44 +0000
commite0e6137dd3ab3694a3bdd1c2845a9fe2efee5087 (patch)
treec3eb6f90ff249fa634d8dc7aa13ef1b4eff947bf /src/starter
parent4979e85871fa9e389800dcc887a23f67776652fc (diff)
downloadstrongswan-e0e6137dd3ab3694a3bdd1c2845a9fe2efee5087.tar.bz2
strongswan-e0e6137dd3ab3694a3bdd1c2845a9fe2efee5087.tar.xz
support of PKCS#11 init arguments required by NSS softoken, patch contributed by Robert Varga
Diffstat (limited to 'src/starter')
-rw-r--r--src/starter/args.c1
-rw-r--r--src/starter/confread.h1
-rw-r--r--src/starter/invokepluto.c5
-rw-r--r--src/starter/keywords.h1
-rw-r--r--src/starter/keywords.txt1
5 files changed, 9 insertions, 0 deletions
diff --git a/src/starter/args.c b/src/starter/args.c
index f6c697f74..605794281 100644
--- a/src/starter/args.c
+++ b/src/starter/args.c
@@ -173,6 +173,7 @@ static const token_info_t token_info[] =
{ ARG_STR, offsetof(starter_config_t, setup.virtual_private), NULL },
{ ARG_STR, offsetof(starter_config_t, setup.eapdir), NULL },
{ ARG_STR, offsetof(starter_config_t, setup.pkcs11module), NULL },
+ { ARG_STR, offsetof(starter_config_t, setup.pkcs11initargs), NULL },
{ ARG_ENUM, offsetof(starter_config_t, setup.pkcs11keepstate), LST_bool },
{ ARG_ENUM, offsetof(starter_config_t, setup.pkcs11proxy), LST_bool },
diff --git a/src/starter/confread.h b/src/starter/confread.h
index 99851d5b6..970166c90 100644
--- a/src/starter/confread.h
+++ b/src/starter/confread.h
@@ -178,6 +178,7 @@ struct starter_config {
char *virtual_private;
char *eapdir;
char *pkcs11module;
+ char *pkcs11initargs;
bool pkcs11keepstate;
bool pkcs11proxy;
diff --git a/src/starter/invokepluto.c b/src/starter/invokepluto.c
index 240d98391..5ea47f69f 100644
--- a/src/starter/invokepluto.c
+++ b/src/starter/invokepluto.c
@@ -187,6 +187,11 @@ starter_start_pluto (starter_config_t *cfg, bool debug)
arg[argc++] = "--pkcs11module";
arg[argc++] = cfg->setup.pkcs11module;
}
+ if (cfg->setup.pkcs11initargs)
+ {
+ arg[argc++] = "--pkcs11initargs";
+ arg[argc++] = cfg->setup.pkcs11initargs;
+ }
if (cfg->setup.pkcs11keepstate)
{
arg[argc++] = "--pkcs11keepstate";
diff --git a/src/starter/keywords.h b/src/starter/keywords.h
index d527fa0b4..8f5108ad8 100644
--- a/src/starter/keywords.h
+++ b/src/starter/keywords.h
@@ -41,6 +41,7 @@ typedef enum {
KW_VIRTUAL_PRIVATE,
KW_EAPDIR,
KW_PKCS11MODULE,
+ KW_PKCS11INITARGS,
KW_PKCS11KEEPSTATE,
KW_PKCS11PROXY,
diff --git a/src/starter/keywords.txt b/src/starter/keywords.txt
index b08947117..573a2389a 100644
--- a/src/starter/keywords.txt
+++ b/src/starter/keywords.txt
@@ -50,6 +50,7 @@ virtual_private, KW_VIRTUAL_PRIVATE
eap, KW_EAP
eapdir, KW_EAPDIR
pkcs11module, KW_PKCS11MODULE
+pkcs11initargs, KW_PKCS11INITARGS
pkcs11keepstate, KW_PKCS11KEEPSTATE
pkcs11proxy, KW_PKCS11PROXY
keyexchange, KW_KEYEXCHANGE