summaryrefslogtreecommitdiff
path: root/client/bankid.c
diff options
context:
space:
mode:
authorSamuel Lidén Borell <samuel@slbdata.se>2011-07-12 21:09:37 +0200
committerSamuel Lidén Borell <samuel@slbdata.se>2011-07-12 21:09:37 +0200
commit0bc3834f3e56bf137b654bb08688a0c1be602204 (patch)
treec696fc2fbb6efe8b504327d9245bfb858437606b /client/bankid.c
parent4e4e7d495b30c8fbea64bbd306f570eb5f61f473 (diff)
downloadfribid-0bc3834f3e56bf137b654bb08688a0c1be602204.tar.gz
fribid-0bc3834f3e56bf137b654bb08688a0c1be602204.tar.bz2
fribid-0bc3834f3e56bf137b654bb08688a0c1be602204.zip
Add the TextCharacterEncoding parameter
This parameter is just stored in the signature. It doesn't change how the message is displayed to the user (this is always autodetected).
Diffstat (limited to 'client/bankid.c')
-rw-r--r--client/bankid.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/client/bankid.c b/client/bankid.c
index dce3ebd..319e68f 100644
--- a/client/bankid.c
+++ b/client/bankid.c
@@ -242,7 +242,7 @@ static const char sign_template[] =
"</bankIdSignedData>";
static const char signedText_template[] =
- "<usrVisibleData charset=\"UTF-8\" visible=\"wysiwys\">"
+ "<usrVisibleData charset=\"%s\" visible=\"wysiwys\">"
"%s"
"</usrVisibleData>";
@@ -322,11 +322,12 @@ BankIDError bankid_authenticate(Token *token,
BankIDError bankid_sign(Token *token,
const char *challenge, int32_t serverTime,
const char *hostname, const char *ip,
- const char *message, const char *invisibleMessage,
+ const char *messageEncoding, const char *message,
+ const char *invisibleMessage,
char **signature) {
BankIDError error;
- char *extra = rasprintf(signedText_template, message);
+ char *extra = rasprintf(signedText_template, messageEncoding, message);
if (invisibleMessage) {
extra = rasprintf_append(extra, signedInvisibleText_template, invisibleMessage);