https://issues.shibboleth.net/jira/browse/SSPCPP-251
authorScott Cantor <cantor.2@osu.edu>
Thu, 15 Oct 2009 18:15:48 +0000 (18:15 +0000)
committerScott Cantor <cantor.2@osu.edu>
Thu, 15 Oct 2009 18:15:48 +0000 (18:15 +0000)
shibsp/handler/impl/MetadataGenerator.cpp

index f9da6ab..c89e8ce 100644 (file)
@@ -31,6 +31,7 @@
 #ifndef SHIBSP_LITE
 # include "metadata/MetadataProviderCriteria.h"
 # include <saml/exceptions.h>
+# include <saml/SAMLConfig.h>
 # include <saml/signature/ContentReference.h>
 # include <saml/saml2/metadata/Metadata.h>
 # include <saml/saml2/metadata/MetadataProvider.h>
@@ -260,6 +261,9 @@ pair<bool,long> MetadataGenerator::processMessage(
         entity = EntityDescriptorBuilder::buildEntityDescriptor();
     }
 
+    if (!entity->getID())
+        entity->setID(SAMLConfig::getConfig().generateIdentifier());
+
     auto_ptr<EntityDescriptor> wrapper(entity);
     pair<bool,unsigned int> cache = getUnsignedInt("cacheDuration");
     if (cache.first) {