- if (!assertions.empty()) {
- const saml1::Assertion* a = assertions.front();
- if (a->getIssuer()) {
- auto_ptr<saml2::Issuer> issuer(saml2::IssuerBuilder::buildIssuer());
- issuer->setName(a->getIssuer());
- policy.setIssuer(issuer.get());
- issuer.release(); // owned by policy now
- pair<bool,int> minor = a->getMinorVersion();
- protocol = (minor.first && minor.second==0) ?
- samlconstants::SAML10_PROTOCOL_ENUM : samlconstants::SAML11_PROTOCOL_ENUM;
- }
- }