summaryrefslogtreecommitdiff
path: root/client/bankid.c
diff options
context:
space:
mode:
authorSamuel Lidén Borell <samuel@slbdata.se>2011-04-05 22:17:29 +0200
committerSamuel Lidén Borell <samuel@slbdata.se>2011-04-05 22:17:29 +0200
commit0fe33df3b04e1c514a8294990d4848efe8ee2067 (patch)
treec4d858b4f9e3927a9e129158c42d171458232cd7 /client/bankid.c
parente7ccd4a38065744332023495e5673fab8d79baf9 (diff)
downloadfribid-0fe33df3b04e1c514a8294990d4848efe8ee2067.tar.gz
fribid-0fe33df3b04e1c514a8294990d4848efe8ee2067.tar.bz2
fribid-0fe33df3b04e1c514a8294990d4848efe8ee2067.zip
Add a function stub for StoreCertificates + code that calls it
Diffstat (limited to 'client/bankid.c')
-rw-r--r--client/bankid.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/client/bankid.c b/client/bankid.c
index 14903b7..97e74fb 100644
--- a/client/bankid.c
+++ b/client/bankid.c
@@ -366,3 +366,20 @@ BankIDError bankid_createRequest(const RegutilInfo *params,
return (*request ? BIDERR_OK : BIDERR_InternalError);
}
+/**
+ * Stores a certificate chain for a newly created key.
+ */
+BankIDError bankid_storeCertificates(const char *certs) {
+
+ size_t length;
+ char *p7data = base64_decode_binary(certs, &length);
+
+ if (!p7data) return BIDERR_InternalError;
+
+ BankIDError error = backend_storeCertificates(p7data, length);
+
+ free(p7data);
+ return error;
+}
+
+