summaryrefslogtreecommitdiff
path: root/plugin/plugin.c
diff options
context:
space:
mode:
authorSamuel Lidén Borell <samuel@slbdata.se>2010-01-27 13:12:47 +0100
committerSamuel Lidén Borell <samuel@slbdata.se>2010-01-27 13:12:47 +0100
commit646ce3ff7b95622921243850cc414f7bc42113c9 (patch)
treebeaf9c0c74a93c194b7d5532cf10357e17ab9a78 /plugin/plugin.c
parentae856f8eb2971fca9a6cc3b3c039cb376ce8d27d (diff)
downloadfribid-646ce3ff7b95622921243850cc414f7bc42113c9.tar.gz
fribid-646ce3ff7b95622921243850cc414f7bc42113c9.tar.bz2
fribid-646ce3ff7b95622921243850cc414f7bc42113c9.zip
Made the subject filter optional and a common parameter
Now it can be used in authentication objects too.
Diffstat (limited to 'plugin/plugin.c')
-rw-r--r--plugin/plugin.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/plugin.c b/plugin/plugin.c
index 52c85eb..4fd3d97 100644
--- a/plugin/plugin.c
+++ b/plugin/plugin.c
@@ -60,6 +60,7 @@ void plugin_free(Plugin *plugin) {
case PT_Authentication:
free(plugin->info.auth.challenge);
free(plugin->info.auth.policys);
+ free(plugin->info.sign.subjectFilter);
free(plugin->info.auth.signature);
break;
case PT_Signer:
@@ -110,6 +111,7 @@ static void unlockURL(const char *url) {
static char **getCommonParamPointer(Plugin *plugin, const char *name) {
if (!strcmp(name, "Policys")) return &plugin->info.auth.policys;
if (!strcmp(name, "Signature")) return &plugin->info.auth.signature;
+ if (!strcmp(name, "Subjects")) return &plugin->info.sign.subjectFilter;
return NULL;
}
@@ -120,7 +122,6 @@ static char **getParamPointer(Plugin *plugin, const char *name) {
return getCommonParamPointer(plugin, name);
case PT_Signer:
if (!strcmp(name, "Nonce")) return &plugin->info.sign.challenge;
- if (!strcmp(name, "Subjects")) return &plugin->info.sign.subjectFilter;
if (!strcmp(name, "TextToBeSigned")) return &plugin->info.sign.message;
return getCommonParamPointer(plugin, name);
default: