summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Lidén Borell <samuel@slbdata.se>2011-09-08 23:34:43 +0200
committerSamuel Lidén Borell <samuel@slbdata.se>2011-09-08 23:34:43 +0200
commit623aba11cedc27556bf71d9ad04217e2984b94c4 (patch)
treee8f921c402cd1d2d8e7ffcc0195b37db3d8787e3
parent6ff66fadd465a3759cff54427d76ecd0e93a5be7 (diff)
downloadfribid-623aba11cedc27556bf71d9ad04217e2984b94c4.tar.gz
fribid-623aba11cedc27556bf71d9ad04217e2984b94c4.tar.bz2
fribid-623aba11cedc27556bf71d9ad04217e2984b94c4.zip
Claim to support application/x-personal-signer
This is an old MIME type that doesn't appear to be used with BankID. But the login page at Handelsbanken checks for this type, so we have to claim that we support it.
-rw-r--r--plugin/npmain.c3
-rw-r--r--plugin/npobject.c5
-rw-r--r--plugin/npobject.h1
-rw-r--r--plugin/plugin.c1
-rw-r--r--plugin/plugin.h1
5 files changed, 10 insertions, 1 deletions
diff --git a/plugin/npmain.c b/plugin/npmain.c
index 6357374..b8676d7 100644
--- a/plugin/npmain.c
+++ b/plugin/npmain.c
@@ -82,7 +82,8 @@ char *NPP_GetMIMEDescription() {
MIME_AUTHENTICATION ":" NO_FILE_EXTENSIONS ":Authentication;"
MIME_SIGNER ":" NO_FILE_EXTENSIONS ":Signer2;"
MIME_REGUTIL ":" NO_FILE_EXTENSIONS ":Regutil;"
- MIME_WEBADMIN ":" NO_FILE_EXTENSIONS ":Webadmin";
+ MIME_WEBADMIN ":" NO_FILE_EXTENSIONS ":Webadmin;"
+ MIME_OLDSIGNER ":" NO_FILE_EXTENSIONS ":Signer";
}
const char *NPP_GetPluginVersion() {
diff --git a/plugin/npobject.c b/plugin/npobject.c
index c292dbd..def6596 100644
--- a/plugin/npobject.c
+++ b/plugin/npobject.c
@@ -214,6 +214,9 @@ static bool objInvokeSafe(PluginObject *this, const char *name,
return true;
}
return false;
+ case PT_OldSigner:
+ // Not implemented
+ return false;
default:
return false;
}
@@ -334,6 +337,8 @@ NPObject *npobject_fromMIME(NPP instance, NPMIMEType mimeType) {
return npobject_new(instance, PT_Regutil);
} else if (!strcmp(mimeType, MIME_WEBADMIN)) {
return npobject_new(instance, PT_Webadmin);
+ } else if (!strcmp(mimeType, MIME_OLDSIGNER)) {
+ return npobject_new(instance, PT_OldSigner);
} else {
return NULL;
}
diff --git a/plugin/npobject.h b/plugin/npobject.h
index a984df9..ddbcfd9 100644
--- a/plugin/npobject.h
+++ b/plugin/npobject.h
@@ -32,6 +32,7 @@
#define MIME_SIGNER "application/x-personal-signer2"
#define MIME_REGUTIL "application/x-personal-regutil"
#define MIME_WEBADMIN "application/x-personal-webadmin"
+#define MIME_OLDSIGNER "application/x-personal-signer" // Not implemented
typedef struct {
NPObject base;
diff --git a/plugin/plugin.c b/plugin/plugin.c
index f1dc3a8..e56f8cc 100644
--- a/plugin/plugin.c
+++ b/plugin/plugin.c
@@ -98,6 +98,7 @@ void plugin_reset(Plugin *plugin) {
switch (plugin->type) {
case PT_Version:
case PT_Webadmin:
+ case PT_OldSigner:
break;
case PT_Authentication:
free(plugin->info.auth.challenge);
diff --git a/plugin/plugin.h b/plugin/plugin.h
index f529103..7485587 100644
--- a/plugin/plugin.h
+++ b/plugin/plugin.h
@@ -36,6 +36,7 @@ typedef enum {
PT_Signer,
PT_Regutil,
PT_Webadmin,
+ PT_OldSigner,
} PluginType;
typedef struct {