Skip to content
Snippets Groups Projects
Commit 04b5af6d authored by Olav Morken's avatar Olav Morken
Browse files

Remove the caFile option from SAML 2.0.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2899 44740490-163a-0410-bde0-09ae8108e29a
parent 2fdd394b
No related branches found
No related tags found
No related merge requests found
...@@ -27,9 +27,6 @@ The following options are common between both the SAML 2.0 protocol and Shibbole ...@@ -27,9 +27,6 @@ The following options are common between both the SAML 2.0 protocol and Shibbole
`base64attributes` `base64attributes`
: Whether attributes received from this IdP should be base64 decoded. The default is `FALSE`. : Whether attributes received from this IdP should be base64 decoded. The default is `FALSE`.
`caFile`
: Alternative to specifying a certificate. Allows you to specify a file with root certificates, and responses from the service be validated against these certificates. Note that simpleSAMLphp doesn't support chains with any itermediate certificates between the root and the certificate used to sign the response. Support for PKIX in SimpleSAMLphp is experimental, and we encourage users to not rely on PKIX for validation of signatures; for background information review [the SAML 2.0 Metadata Interoperability Profile](http://docs.oasis-open.org/security/saml/Post2.0/sstc-metadata-iop-cd-01.pdf).
`certData` `certData`
: The base64 encoded certificate for this IdP. This is an alternative to storing the certificate in a file on disk and specifying the filename in the `certificate`-option. : The base64 encoded certificate for this IdP. This is an alternative to storing the certificate in a file on disk and specifying the filename in the `certificate`-option.
...@@ -186,6 +183,9 @@ These options overrides the options set in `saml20-sp-hosted`. ...@@ -186,6 +183,9 @@ These options overrides the options set in `saml20-sp-hosted`.
Shibboleth 1.3 options Shibboleth 1.3 options
---------------------- ----------------------
`caFile`
: Alternative to specifying a certificate. Allows you to specify a file with root certificates, and responses from the service be validated against these certificates. Note that simpleSAMLphp doesn't support chains with any itermediate certificates between the root and the certificate used to sign the response. Support for PKIX in SimpleSAMLphp is experimental, and we encourage users to not rely on PKIX for validation of signatures; for background information review [the SAML 2.0 Metadata Interoperability Profile](http://docs.oasis-open.org/security/saml/Post2.0/sstc-metadata-iop-cd-01.pdf).
`saml1.useartifact` `saml1.useartifact`
: Request that the IdP returns the result to the artifact binding. : Request that the IdP returns the result to the artifact binding.
The default is to use the POST binding, set this option to TRUE to use the artifact binding instead. The default is to use the POST binding, set this option to TRUE to use the artifact binding instead.
......
...@@ -160,28 +160,9 @@ class sspmod_saml_Message { ...@@ -160,28 +160,9 @@ class sspmod_saml_Message {
$pemCert = self::findCertificate($certFingerprint, $certificates); $pemCert = self::findCertificate($certFingerprint, $certificates);
$pemKeys = array($pemCert); $pemKeys = array($pemCert);
} else { } else {
/* Attempt CA validation. */ throw new SimpleSAML_Error_Exception(
$caFile = $srcMetadata->getString('caFile', NULL); 'Missing certificate in metadata for ' .
if ($caFile === NULL) { var_export($srcMetadata->getString('entityid'), TRUE));
throw new SimpleSAML_Error_Exception(
'Missing certificate in metadata for ' .
var_export($srcMetadata->getString('entityid'), TRUE));
}
$caFile = SimpleSAML_Utilities::resolveCert($caFile);
if (count($certificates) === 0) {
/* We need the full certificate in order to check it against the CA file. */
SimpleSAML_Logger::debug('No certificate in message when validating with CA.');
return FALSE;
}
/* We assume that it is the first certificate that was used to sign the message. */
$pemCert = "-----BEGIN CERTIFICATE-----\n" .
chunk_split($certificates[0], 64) .
"-----END CERTIFICATE-----\n";
SimpleSAML_Utilities::validateCA($pemCert, $caFile);
$pemKeys = array($pemCert);
} }
SimpleSAML_Logger::debug('Has ' . count($pemKeys) . ' candidate keys for validation.'); SimpleSAML_Logger::debug('Has ' . count($pemKeys) . ' candidate keys for validation.');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment