X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-sp-resolver.git;a=blobdiff_plain;f=shibresolver%2Fresolver.cpp;h=f8acdc75f36c715075583ddcc8036ae9b0a468d2;hp=dfea7c32f5fb07a2450feb85ffda4dad699545be;hb=2ca1e797032f83b80a9f06e107a1614dc10bda4a;hpb=98219f6cccb312505dd0cfe7e30373c465e9c1c2 diff --git a/shibresolver/resolver.cpp b/shibresolver/resolver.cpp index dfea7c3..f8acdc7 100644 --- a/shibresolver/resolver.cpp +++ b/shibresolver/resolver.cpp @@ -121,6 +121,27 @@ void RemotedResolver::receive(DDF& in, ostream& out) { } +bool ShibbolethResolver::init(unsigned long features, const char* config, bool rethrow) +{ + SPConfig::getConfig().setFeatures(features | SPConfig::AttributeResolution | SPConfig::Metadata | SPConfig::Trust); + if (!SPConfig::getConfig().init()) + return false; + if (!SPConfig::getConfig().instantiate(config, rethrow)) + return false; + return true; +} + +/** + * Shuts down runtime. + * + * Each process using the library SHOULD call this function exactly once before terminating itself. + */ +void ShibbolethResolver::term() +{ + SPConfig::getConfig().term(); +} + + extern "C" int SHIBRESOLVER_EXPORTS xmltooling_extension_init(void*) { #ifdef SHIBRESOLVER_SHIBSP_HAS_REMOTING