X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=xmltoolingtest%2FFilesystemCredentialResolverTest.h;h=4f358a86eaeaf0f3bedc679737b0517d5f70a20b;hb=2fade7a909ffab2fbeb3433dd1f8971446e3bcf4;hp=7f2816b5ab951cda1a99ddf4c7075437031227d8;hpb=e7a65d784215bc04355f014141219b3e7ab4559a;p=shibboleth%2Fcpp-xmltooling.git diff --git a/xmltoolingtest/FilesystemCredentialResolverTest.h b/xmltoolingtest/FilesystemCredentialResolverTest.h index 7f2816b..4f358a8 100644 --- a/xmltoolingtest/FilesystemCredentialResolverTest.h +++ b/xmltoolingtest/FilesystemCredentialResolverTest.h @@ -1,5 +1,5 @@ /* - * Copyright 2001-2006 Internet2 + * Copyright 2001-2007 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,8 @@ #include "XMLObjectBaseTestCase.h" -#include +#include +#include #include @@ -41,8 +42,10 @@ public: ); Locker locker(credResolver.get()); - auto_ptr key(credResolver->getKey()); - TSM_ASSERT("Retrieved key was null", key.get()!=NULL); - TSM_ASSERT_EQUALS("Unexpected number of certificates", 1, credResolver->getCertificates().size()); + const X509Credential* cred=dynamic_cast(credResolver->resolve()); + TSM_ASSERT("Retrieved credential was null", cred!=NULL); + TSM_ASSERT("Retrieved key was null", cred->getPrivateKey()!=NULL); + TSM_ASSERT_EQUALS("Unexpected number of certificates", 1, cred->getEntityCertificateChain().size()); + TSM_ASSERT_EQUALS("Custom key name not found", 1, cred->getKeyNames().count("Sample Key")); } };