Skip to content

Commit dde1d4e

Browse files
committed
#242. Document that SHA-1 must not be used
1 parent 8d20edb commit dde1d4e

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,10 @@ start, for example to use the static method getSelfURLNoQuery use:
152152
Security warning
153153
----------------
154154

155-
In production, the `strict` parameter **MUST** be set as `"true"`. Otherwise
156-
your environment is not secure and will be exposed to attacks.
155+
In production, the `strict` parameter **MUST** be set as `"true"` and the
156+
`signatureAlgorithm` and `digestAlgorithm` under `security` must be set to
157+
something other than SHA1 (see https://shattered.io/ ). Otherwise your
158+
environment is not secure and will be exposed to attacks.
157159

158160

159161
Getting started
@@ -496,14 +498,16 @@ $advancedSettings = array (
496498
// 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256'
497499
// 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha384'
498500
// 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha512'
499-
'signatureAlgorithm' => 'http://www.w3.org/2000/09/xmldsig#rsa-sha1',
501+
// Notice that sha1 is a deprecated algorithm and should not be used
502+
'signatureAlgorithm' => 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256',
500503

501504
// Algorithm that the toolkit will use on digest process. Options:
502505
// 'http://www.w3.org/2000/09/xmldsig#sha1'
503506
// 'http://www.w3.org/2001/04/xmlenc#sha256'
504507
// 'http://www.w3.org/2001/04/xmldsig-more#sha384'
505508
// 'http://www.w3.org/2001/04/xmlenc#sha512'
506-
'digestAlgorithm' => 'http://www.w3.org/2000/09/xmldsig#sha1',
509+
// Notice that sha1 is a deprecated algorithm and should not be used
510+
'digestAlgorithm' => 'http://www.w3.org/2001/04/xmlenc#sha256',
507511

508512
// ADFS URL-Encodes SAML data as lowercase, and the toolkit by default uses
509513
// uppercase. Turn it True for ADFS compatibility on signature verification

advanced_settings_example.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,16 @@
8787
// 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256'
8888
// 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha384'
8989
// 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha512'
90-
'signatureAlgorithm' => 'http://www.w3.org/2000/09/xmldsig#rsa-sha1',
90+
// Notice that sha1 is a deprecated algorithm and should not be used
91+
'signatureAlgorithm' => 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256',
9192

9293
// Algorithm that the toolkit will use on digest process. Options:
9394
// 'http://www.w3.org/2000/09/xmldsig#sha1'
9495
// 'http://www.w3.org/2001/04/xmlenc#sha256'
9596
// 'http://www.w3.org/2001/04/xmldsig-more#sha384'
9697
// 'http://www.w3.org/2001/04/xmlenc#sha512'
97-
'digestAlgorithm' => 'http://www.w3.org/2000/09/xmldsig#sha1',
98+
// Notice that sha1 is a deprecated algorithm and should not be used
99+
'digestAlgorithm' => 'http://www.w3.org/2001/04/xmlenc#sha256',
98100

99101
// ADFS URL-Encodes SAML data as lowercase, and the toolkit by default uses
100102
// uppercase. Turn it True for ADFS compatibility on signature verification

0 commit comments

Comments
 (0)