summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2008-08-01 14:07:52 +0000
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2008-08-01 14:07:52 +0000
commitd2e3ec3fa355ed11eb090b34b4681c235097e6fb (patch)
tree73c578cd475760dcb6013b7c31879f8b910b5966
parent02f8255421b5ac8e0269c66f0209d0971c1203a4 (diff)
downloadlasso-d2e3ec3fa355ed11eb090b34b4681c235097e6fb.tar.gz
lasso-d2e3ec3fa355ed11eb090b34b4681c235097e6fb.tar.xz
lasso-d2e3ec3fa355ed11eb090b34b4681c235097e6fb.zip
- Add a
const LassoDiscoDescription *lasso_wsf_profile_get_description(LassoWsfProfile *profile) - Add documentation to lasso_wsf_profile_verify_credential_signature
-rw-r--r--lasso/id-wsf/wsf_profile.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/lasso/id-wsf/wsf_profile.c b/lasso/id-wsf/wsf_profile.c
index 7b007bae..b03282c1 100644
--- a/lasso/id-wsf/wsf_profile.c
+++ b/lasso/id-wsf/wsf_profile.c
@@ -360,6 +360,34 @@ lasso_wsf_profile_set_description(LassoWsfProfile *profile, LassoDiscoDescriptio
g_assign_gobject(profile->private_data->description, description);
}
+const LassoDiscoDescription *
+lasso_wsf_profile_get_description(LassoWsfProfile *profile)
+{
+ return profile->private_data->description;
+}
+
+/**
+ * lasso_wsf_profile_verify_credential_signature:
+ * @profile: a #LassoWsfProfile
+ * @doc: an #xmlDoc containing the credential node
+ * @credential: an #xmlNode representing the credential
+ *
+ * Verify that the credentials have really been by the provider present in
+ * their Issuer property. To do this it lookup the provider public key in the
+ * metadtatas loaded in the setupt #LassoServer object. If the credential is
+ * signed using a X509 certificate, verify this certificate using the CA
+ * chain list of this provider.
+ *
+ * Returns: 0 if credentials are valid,
+ * %LASSO_PROFILE_ERROR_MISSING_ISSUER if credential contains no Issuer
+ * attribute, %LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND if the Issuer provider is
+ * unknown from #LassoServer, %LASSO_DS_ERROR_CA_CERT_CHAIN_LOAD_FAILED if we
+ * cannot load the given CA chcert chain,
+ * %LASSO_DS_ERROR_PUBLIC_KEY_LOAD_FAILED if we cannot the public key of the
+ * provider, %LASSO_DS_ERROR_SIGNATURE_VERIFICATION_FAILED if the signature
+ * verification failed, and %LASSO_DS_ERROR_INVALID_SIGNATURE if the signature
+ * is invalid.
+ */
static gint
lasso_wsf_profile_verify_credential_signature(
LassoWsfProfile *profile, xmlDoc *doc, xmlNode *credential)