diff options
author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2011-12-02 18:42:14 +0100 |
---|---|---|
committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2011-12-05 12:03:13 +0100 |
commit | cd017964d04782f015771d00b6dffd360499c49a (patch) | |
tree | 5690bf9af94b0d0a3d1c187116b8e1dffd7f84db /tests | |
parent | 71721b370caa64589b238b3c6d56f275a47eceb7 (diff) | |
download | lasso-cd017964d04782f015771d00b6dffd360499c49a.tar.gz lasso-cd017964d04782f015771d00b6dffd360499c49a.tar.xz lasso-cd017964d04782f015771d00b6dffd360499c49a.zip |
[core] introduce the LassoSignatureContext context, to pass around signature parameters
This structure is used to pass around the signature algorithm
and the signature key.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/random_tests.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/random_tests.c b/tests/random_tests.c index 100d5f6b..cb2d4171 100644 --- a/tests/random_tests.c +++ b/tests/random_tests.c @@ -278,7 +278,8 @@ START_TEST(test06_lib_statuscode) } END_TEST -extern xmlSecKey* lasso_xmlsec_load_private_key_from_buffer(const char *buffer, size_t length, const char *password); +extern xmlSecKey* lasso_xmlsec_load_private_key_from_buffer(const char *buffer, size_t length, const + char *password, LassoSignatureMethod method, const char *certificate); extern int lasso_saml2_query_verify_signature(const char *query, const xmlSecKey *sender_public_key); @@ -315,7 +316,8 @@ NC1/bzp8cGOcJ88BD5+Ny6qgPVCrMLE5twQumJ12V3SvjGNtzFBvg2c/9S5OmVqR\n\ LlTxKnCrWAXftSm1rNtewTsF\n\ -----END CERTIFICATE-----"; - xmlSecKeyPtr key = lasso_xmlsec_load_private_key_from_buffer(pkey, sizeof(pkey)-1, NULL); + xmlSecKeyPtr key = lasso_xmlsec_load_private_key_from_buffer(pkey, sizeof(pkey)-1, NULL, + LASSO_SIGNATURE_METHOD_RSA_SHA1, NULL); fail_unless(key != NULL, "Cannot load public key"); fail_unless(lasso_saml2_query_verify_signature(query1, key) == 0, "Signature was not validated"); |