Skip to content
Snippets Groups Projects
Commit de13a877 authored by Alexander König's avatar Alexander König
Browse files

aa-statistics should now be working

parent 875de70d
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,7 @@ ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US.UTF-8
# build nginx
RUN apt-get install -y zlib1g zlib1g-dev libpcre3 libpcre3-dev curl php-fpm
RUN apt-get install -y zlib1g zlib1g-dev libpcre3 libpcre3-dev curl
RUN cpanm File::Spec::Functions
RUN cpanm Term::ReadLine
COPY commul-customization/nginx_build.sh /tmp/nginx_build.sh
......@@ -56,6 +56,8 @@ COPY commul-customization/webpage/ /opt/nginx/html/
RUN mkdir /opt/nginx/html/secure
COPY commul-customization/shib_test.pl /opt/nginx/html/secure/
# install php
RUN apt-get update && apt-get install -y php-fpm php-xml
# copy over aa-statistics script
RUN mkdir /opt/nginx/html/php
COPY commul-customization/aa-statistics.php /opt/nginx/html/php/
......
......@@ -97,7 +97,16 @@ for ($i=$assertion_count; 0 < $i; --$i)
{
$assertion_link = str_replace("https://" . getenv("SERVER_NAME"), "https://127.0.0.1", $assertion_link);
//TODO add a timeout
$xml = simplexml_load_file($assertion_link);
// need to ignore that certificate does not match 127.0.0.1
$arrContextOptions=array(
"ssl"=>array(
"verify_peer"=>false,
"verify_peer_name"=>false,
),
);
$assertion = file_get_contents($assertion_link, false, stream_context_create($arrContextOptions));
$xml = simplexml_load_string($assertion);
// echo $xml->asXML()."=====\n\n";
try{
$idp = (string)$xml->xpath('//*[local-name()="Issuer"]')[0];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment