diff --git a/docs/simplesamlphp-reference-idp-remote.txt b/docs/simplesamlphp-reference-idp-remote.txt index 71478f112cea7017b999cb666f46a5956d60f06a..d39812cce1023f855d93c71634c442896f30d741 100644 --- a/docs/simplesamlphp-reference-idp-remote.txt +++ b/docs/simplesamlphp-reference-idp-remote.txt @@ -27,9 +27,6 @@ The following options are common between both the SAML 2.0 protocol and Shibbole `base64attributes` : 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` : 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`. 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` : 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. diff --git a/modules/saml/lib/Message.php b/modules/saml/lib/Message.php index 9dd11c65f542c98f5ba05eb68d42982418000124..65ebff37ff76feb60cfc441c14870cc9f1688c0c 100644 --- a/modules/saml/lib/Message.php +++ b/modules/saml/lib/Message.php @@ -160,28 +160,9 @@ class sspmod_saml_Message { $pemCert = self::findCertificate($certFingerprint, $certificates); $pemKeys = array($pemCert); } else { - /* Attempt CA validation. */ - $caFile = $srcMetadata->getString('caFile', NULL); - if ($caFile === NULL) { - 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); + throw new SimpleSAML_Error_Exception( + 'Missing certificate in metadata for ' . + var_export($srcMetadata->getString('entityid'), TRUE)); } SimpleSAML_Logger::debug('Has ' . count($pemKeys) . ' candidate keys for validation.');