From b300601da94d8ec029ba7e55491f36dcee95b995 Mon Sep 17 00:00:00 2001 From: olavmrk Date: Wed, 18 May 2011 10:49:21 +0000 Subject: Remove unused function am_get_provider_id(). git-svn-id: https://modmellon.googlecode.com/svn/trunk@128 a716ebb1-153a-0410-b759-cfb97c6a1b53 --- auth_mellon_config.c | 60 ---------------------------------------------------- 1 file changed, 60 deletions(-) (limited to 'auth_mellon_config.c') diff --git a/auth_mellon_config.c b/auth_mellon_config.c index 53be596..aff13f6 100644 --- a/auth_mellon_config.c +++ b/auth_mellon_config.c @@ -162,66 +162,6 @@ static const char *am_set_filestring_slot(cmd_parms *cmd, } -/* This function extracts an IdP ProviderID from metadata - * - * Parameters: - * apr_pool_t *p Pool to allocate temporary items from. - * server_rec *s The server. - * const char *file File containing metadata. - * const char **provider The providerID - * - * Returns: - * NULL on success or an error string on failure. - * - */ -static const char *am_get_provider_id(apr_pool_t *p, - server_rec *s, - const char *file, - const char **provider) -{ - char *data; - apr_xml_parser *xp; - apr_xml_doc *xd; - apr_xml_attr *xa; - char error[1024]; - - *provider = NULL; - - /* - * Get the data - */ - if ((data = am_getfile(p, s, file)) == NULL) - return apr_psprintf(p, "Cannot read file %s", file); - - /* - * Parse - */ - xp = apr_xml_parser_create(p); - if (apr_xml_parser_feed(xp, data, strlen(data)) != 0) - return apr_psprintf(p, "Cannot parse %s: %s", file, - apr_xml_parser_geterror(xp, error, sizeof(error))); - - if (apr_xml_parser_done(xp, &xd) != 0) - return apr_psprintf(p, "Parse error %s: %s", file, - apr_xml_parser_geterror(xp, error, sizeof(error))); - - /* - * Extract /EntityDescriptor@EntityID - */ - if (strcasecmp(xd->root->name, "EntityDescriptor") != 0) - return apr_psprintf(p, " is not root in %s", file); - - for (xa = xd->root->attr; xa; xa = xa->next) - if (strcasecmp(xa->name, "entityID") == 0) - break; - - if (xa == NULL) - return apr_psprintf(p, "entityID not found in %s", file); - - *provider = xa->value; - return NULL; -} - /* This function handles configuration directives which use * a glob pattern * -- cgit