Thanks Brian,

I tried changing the path to /usr/bin/xmlsec1 and at least something
changed.  I get this new error when I try to generate a SAML response.

array(23) { [0]=> string(45) "Usage: xmlsec [] []" [1]=> string(0)
"" [2]=> string(68) "xmlsec is a command line tool for signing,
verifying, encrypting and" [3]=> string(59) "decrypting XML documents.
The allowed values are:" [4]=> string(53) " --help display this help
information and exit" [5]=> string(73) " --help-all display help
information for all commands/options and exit" [6]=> string(66) " --
help- display help information for command and exit" [7]=> string(49)
" --version print version information and exit" [8]=> string(41) " --
keys keys XML file manipulation" [9]=> string(48) " --sign sign data
and output XML document" [10]=> string(37) " --verify verify signed
document" [11]=> string(70) " --sign-tmpl create and sign dynamicaly
generated signature template" [12]=> string(51) " --encrypt encrypt
data and output XML document" [13]=> string(45) " --decrypt decrypt
data from XML document" [14]=> string(0) "" [15]=> string(0) "" [16]=>
string(54) "Report bugs to http://www.aleksey.com/xmlsec/bugs.html";
[17]=> string(0) "" [18]=> string(47) "Written by Aleksey
Sanin ." [19]=> string(0) "" [20]=> string(38) "Copyright (C)
2002-2003 Aleksey Sanin." [21]=> string(62) "This is free software:
see the source for copying information." [22]=> string(0) "" }

I guess this mean that I'm not using the command in the right way.
Any ideas would be really helpful.

The code as it is now in the process_response.php is the following:

 // The path to xmlsec/xmlsec1 may need to be adjusted here.
  // xmlsec supports many key types, which can be selected
  // by using other command-line parameters.
  $cmd = '/usr/bin/xmlsec1 sign --privkey-pem ' . $privKey .
             ' --pubkey-der ' . $pubKey . ' --output ' . $tempFileName .
             '.out ' . $tempFileName;
  exec($cmd, $resp);
  var_dump($resp);
  unlink($tempFileName);

  $xmlResult = @file_get_contents($tempFileName . '.out');
  if (!$xmlResult) {
    $error = 'Unable to sign XML response. Please ensure that xmlsec
is ' .
                 'installed, and check your keys.';
    // uncomment the line below to print xmlsec error messages
    // $error .= '<br><br>'.
        //             str_replace('[br]', '<br>',
        //                         htmlentities(implode($resp, '[br]')));
    return false;
  } else {
    unlink($tempFileName . '.out');
    return $xmlResult;
  }
}

Thanks

On 18 ene, 15:39, Brian <[EMAIL PROTECTED]> wrote:
> I just got this going up on our servers at work.  You need to put the
> path to the xmlsec executable in the $cmd variable.  The PHP code
> actually runs the xmlsec program with a shell call.  It looks like
> your server administrator gave you the path to the xmlsec libraries.
> For me the correct path was: /usr/bin/xmlsec1.
>
> Good luck!
>
> On Jan 17, 10:01 pm, Ank891 <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello I installed the SAMLTestTool PHP implementation on my webserver
> > (http://www.ticos.org/SAMLTestTool/saml_demo.php) but when I try to
> > generate the SAML response I get the following error: Unable to sign
> > XML response. Please ensure that xmlsec is installed, and check your
> > keys.
>
> > I check with my server administrator and they confirmed that xmlsec is
> > installed on /usr/local/lib where I see the following libraries:
>
> > libxmlsec1.a                  libxmlsec1-openssl.so.1
> > libxmlsec1.la                 libxmlsec1-openssl.so.1.2.11
> > libxmlsec1-openssl.a          libxmlsec1.so
> > libxmlsec1-openssl.la         libxmlsec1.so.1
> > libxmlsec1-openssl.so         libxmlsec1.so.1.2.11
>
> > I included this path in the PHP configuration.  But the error message
> > remains.  I guess by this point is obvious that I'm not at all
> > familiar with the use and configuration of xmlsec.
>
> > On the process_response.php file there are a couple of lines that I
> > think could be originating the error, but do to my lack of knowledge
> > of xmlsec I'm unable to fix it.  The lines are:
>
> >   // The path to xmlsec/xmlsec1 may need to be adjusted here.
> >   // xmlsec supports many key types, which can be selected
> >   // by using other command-line parameters.
> >   $cmd = '/usr/local/lib/ sign --privkey-pem ' . $privKey .
> >              ' --pubkey-der ' . $pubKey . ' --output ' . $tempFileName .
> >              '.out ' . $tempFileName;
> >   exec($cmd, $resp);
> >   var_dump($resp);
> >   unlink($tempFileName);
>
> >   $xmlResult = @file_get_contents($tempFileName . '.out');
> >   if (!$xmlResult) {
> >     $error = 'Unable to sign XML response. Please ensure that xmlsec
> > is ' .
> >                  'installed, and check your keys.';
> >     // uncomment the line below to print xmlsec error messages
> >     // $error .= '<br><br>'.
> >         //             str_replace('[br]', '<br>',
> >         //                         htmlentities(implode($resp, '[br]')));
> >     return false;
> >   } else {
> >     unlink($tempFileName . '.out');
> >     return $xmlResult;
> >   }
>
> > If you have any advise please contact me.
>
> > Thanks.- Ocultar texto de la cita -
>
> - Mostrar texto de la cita -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Apps APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-apps-apis?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to