Skip to content

Commit 4ccbde2

Browse files
committed
Replace PrivateKey class with the one from xml-security
1 parent a104180 commit 4ccbde2

File tree

6 files changed

+93
-184
lines changed

6 files changed

+93
-184
lines changed

phpstan-baseline.neon

Lines changed: 76 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,211 +1,229 @@
11
parameters:
22
ignoreErrors:
33
-
4-
message: "#^Call to static method addSign\\(\\) on an unknown class SimpleSAML\\\\Module\\\\saml\\\\Message\\.$#"
4+
message: '#^Call to static method addSign\(\) on an unknown class SimpleSAML\\Module\\saml\\Message\.$#'
5+
identifier: class.notFound
56
count: 1
67
path: src/Binding/HTTPArtifact.php
78

89
-
9-
message: "#^Call to static method getInstance\\(\\) on an unknown class SimpleSAML\\\\Configuration\\.$#"
10+
message: '#^Call to static method getInstance\(\) on an unknown class SimpleSAML\\Configuration\.$#'
11+
identifier: class.notFound
1012
count: 2
1113
path: src/Binding/HTTPArtifact.php
1214

1315
-
14-
message: "#^Call to static method getInstance\\(\\) on an unknown class SimpleSAML\\\\Store\\\\StoreFactory\\.$#"
16+
message: '#^Call to static method getInstance\(\) on an unknown class SimpleSAML\\Store\\StoreFactory\.$#'
17+
identifier: class.notFound
1518
count: 1
1619
path: src/Binding/HTTPArtifact.php
1720

1821
-
19-
message: "#^Call to static method getMetadataHandler\\(\\) on an unknown class SimpleSAML\\\\Metadata\\\\MetaDataStorageHandler\\.$#"
22+
message: '#^Call to static method getMetadataHandler\(\) on an unknown class SimpleSAML\\Metadata\\MetaDataStorageHandler\.$#'
23+
identifier: class.notFound
2024
count: 1
2125
path: src/Binding/HTTPArtifact.php
2226

2327
-
24-
message: "#^Instantiated class SimpleSAML\\\\Utils\\\\HTTP not found\\.$#"
28+
message: '#^Instantiated class SimpleSAML\\Utils\\HTTP not found\.$#'
29+
identifier: class.notFound
2530
count: 1
2631
path: src/Binding/HTTPArtifact.php
2732

2833
-
29-
message: "#^Parameter \\$key of method SimpleSAML\\\\SAML2\\\\Binding\\\\HTTPArtifact\\:\\:validateSignature\\(\\) has invalid type SimpleSAML\\\\XMLSecurity\\\\XMLSecurityKey\\.$#"
34+
message: '#^Parameter \$key of method SimpleSAML\\SAML2\\Binding\\HTTPArtifact\:\:validateSignature\(\) has invalid type SimpleSAML\\XMLSecurity\\XMLSecurityKey\.$#'
35+
identifier: class.notFound
3036
count: 1
3137
path: src/Binding/HTTPArtifact.php
3238

3339
-
34-
message: "#^Parameter \\$sp of method SimpleSAML\\\\SAML2\\\\Binding\\\\HTTPArtifact\\:\\:setSPMetadata\\(\\) has invalid type SimpleSAML\\\\Configuration\\.$#"
40+
message: '#^Parameter \$sp of method SimpleSAML\\SAML2\\Binding\\HTTPArtifact\:\:setSPMetadata\(\) has invalid type SimpleSAML\\Configuration\.$#'
41+
identifier: class.notFound
3542
count: 1
3643
path: src/Binding/HTTPArtifact.php
3744

3845
-
39-
message: "#^Property SimpleSAML\\\\SAML2\\\\Binding\\\\HTTPArtifact\\:\\:\\$spMetadata has unknown class SimpleSAML\\\\Configuration as its type\\.$#"
46+
message: '#^Property SimpleSAML\\SAML2\\Binding\\HTTPArtifact\:\:\$spMetadata has unknown class SimpleSAML\\Configuration as its type\.$#'
47+
identifier: class.notFound
4048
count: 1
4149
path: src/Binding/HTTPArtifact.php
4250

4351
-
44-
message: "#^Access to constant AES128_CBC on an unknown class SimpleSAML\\\\XMLSecurity\\\\XMLSecurityKey\\.$#"
45-
count: 1
46-
path: src/Certificate/PrivateKeyLoader.php
47-
48-
-
49-
message: "#^Access to constant RSA_1_5 on an unknown class SimpleSAML\\\\XMLSecurity\\\\XMLSecurityKey\\.$#"
50-
count: 1
51-
path: src/Certificate/PrivateKeyLoader.php
52-
53-
-
54-
message: "#^Instantiated class SimpleSAML\\\\XMLSecurity\\\\XMLSecurityKey not found\\.$#"
55-
count: 2
56-
path: src/Certificate/PrivateKeyLoader.php
57-
58-
-
59-
message: "#^Method SimpleSAML\\\\SAML2\\\\Certificate\\\\PrivateKeyLoader\\:\\:convertPrivateKeyToRsaKey\\(\\) has invalid return type SimpleSAML\\\\XMLSecurity\\\\XMLSecurityKey\\.$#"
60-
count: 1
61-
path: src/Certificate/PrivateKeyLoader.php
62-
63-
-
64-
message: "#^Parameter \\$configuration of method SimpleSAML\\\\SAML2\\\\Configuration\\\\SimpleSAMLConverter\\:\\:convertToIdentityProvider\\(\\) has invalid type SimpleSAML\\\\Configuration\\.$#"
52+
message: '#^Parameter \$configuration of method SimpleSAML\\SAML2\\Configuration\\SimpleSAMLConverter\:\:convertToIdentityProvider\(\) has invalid type SimpleSAML\\Configuration\.$#'
53+
identifier: class.notFound
6554
count: 1
6655
path: src/Configuration/SimpleSAMLConverter.php
6756

6857
-
69-
message: "#^Parameter \\$configuration of method SimpleSAML\\\\SAML2\\\\Configuration\\\\SimpleSAMLConverter\\:\\:convertToServiceProvider\\(\\) has invalid type SimpleSAML\\\\Configuration\\.$#"
58+
message: '#^Parameter \$configuration of method SimpleSAML\\SAML2\\Configuration\\SimpleSAMLConverter\:\:convertToServiceProvider\(\) has invalid type SimpleSAML\\Configuration\.$#'
59+
identifier: class.notFound
7060
count: 1
7161
path: src/Configuration/SimpleSAMLConverter.php
7262

7363
-
74-
message: "#^Parameter \\$configuration of method SimpleSAML\\\\SAML2\\\\Configuration\\\\SimpleSAMLConverter\\:\\:enrichForDecryptionProvider\\(\\) has invalid type SimpleSAML\\\\Configuration\\.$#"
64+
message: '#^Parameter \$configuration of method SimpleSAML\\SAML2\\Configuration\\SimpleSAMLConverter\:\:enrichForDecryptionProvider\(\) has invalid type SimpleSAML\\Configuration\.$#'
65+
identifier: class.notFound
7566
count: 1
7667
path: src/Configuration/SimpleSAMLConverter.php
7768

7869
-
79-
message: "#^Parameter \\$configuration of method SimpleSAML\\\\SAML2\\\\Configuration\\\\SimpleSAMLConverter\\:\\:enrichForIdentityProvider\\(\\) has invalid type SimpleSAML\\\\Configuration\\.$#"
70+
message: '#^Parameter \$configuration of method SimpleSAML\\SAML2\\Configuration\\SimpleSAMLConverter\:\:enrichForIdentityProvider\(\) has invalid type SimpleSAML\\Configuration\.$#'
71+
identifier: class.notFound
8072
count: 1
8173
path: src/Configuration/SimpleSAMLConverter.php
8274

8375
-
84-
message: "#^Parameter \\$configuration of method SimpleSAML\\\\SAML2\\\\Configuration\\\\SimpleSAMLConverter\\:\\:enrichForServiceProvider\\(\\) has invalid type SimpleSAML\\\\Configuration\\.$#"
76+
message: '#^Parameter \$configuration of method SimpleSAML\\SAML2\\Configuration\\SimpleSAMLConverter\:\:enrichForServiceProvider\(\) has invalid type SimpleSAML\\Configuration\.$#'
77+
identifier: class.notFound
8578
count: 1
8679
path: src/Configuration/SimpleSAMLConverter.php
8780

8881
-
89-
message: "#^Parameter \\$configuration of method SimpleSAML\\\\SAML2\\\\Configuration\\\\SimpleSAMLConverter\\:\\:pluckConfiguration\\(\\) has invalid type SimpleSAML\\\\Configuration\\.$#"
82+
message: '#^Parameter \$configuration of method SimpleSAML\\SAML2\\Configuration\\SimpleSAMLConverter\:\:pluckConfiguration\(\) has invalid type SimpleSAML\\Configuration\.$#'
83+
identifier: class.notFound
9084
count: 1
9185
path: src/Configuration/SimpleSAMLConverter.php
9286

9387
-
94-
message: "#^Instantiated class SimpleSAML\\\\Utils\\\\Config not found\\.$#"
88+
message: '#^Instantiated class SimpleSAML\\Utils\\Config not found\.$#'
89+
identifier: class.notFound
9590
count: 1
9691
path: src/SOAPClient.php
9792

9893
-
99-
message: "#^Instantiated class SimpleSAML\\\\Utils\\\\Crypto not found\\.$#"
94+
message: '#^Instantiated class SimpleSAML\\Utils\\Crypto not found\.$#'
95+
identifier: class.notFound
10096
count: 1
10197
path: src/SOAPClient.php
10298

10399
-
104-
message: "#^Parameter \\$dstMetadata of method SimpleSAML\\\\SAML2\\\\SOAPClient\\:\\:send\\(\\) has invalid type SimpleSAML\\\\Configuration\\.$#"
100+
message: '#^Parameter \$dstMetadata of method SimpleSAML\\SAML2\\SOAPClient\:\:send\(\) has invalid type SimpleSAML\\Configuration\.$#'
101+
identifier: class.notFound
105102
count: 1
106103
path: src/SOAPClient.php
107104

108105
-
109-
message: "#^Parameter \\$key of method SimpleSAML\\\\SAML2\\\\SOAPClient\\:\\:validateSSL\\(\\) has invalid type SimpleSAML\\\\XMLSecurity\\\\XMLSecurityKey\\.$#"
106+
message: '#^Parameter \$key of method SimpleSAML\\SAML2\\SOAPClient\:\:validateSSL\(\) has invalid type SimpleSAML\\XMLSecurity\\XMLSecurityKey\.$#'
107+
identifier: class.notFound
110108
count: 1
111109
path: src/SOAPClient.php
112110

113111
-
114-
message: "#^Parameter \\$srcMetadata of method SimpleSAML\\\\SAML2\\\\SOAPClient\\:\\:send\\(\\) has invalid type SimpleSAML\\\\Configuration\\.$#"
112+
message: '#^Parameter \$srcMetadata of method SimpleSAML\\SAML2\\SOAPClient\:\:send\(\) has invalid type SimpleSAML\\Configuration\.$#'
113+
identifier: class.notFound
115114
count: 1
116115
path: src/SOAPClient.php
117116

118117
-
119-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
118+
message: '#^Unsafe usage of new static\(\)\.$#'
119+
identifier: new.static
120120
count: 2
121121
path: src/XML/md/AbstractEndpointType.php
122122

123123
-
124-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
124+
message: '#^Unsafe usage of new static\(\)\.$#'
125+
identifier: new.static
125126
count: 2
126127
path: src/XML/md/AbstractIndexedEndpointType.php
127128

128129
-
129-
message: "#^Access to undefined constant static\\(SimpleSAML\\\\SAML2\\\\XML\\\\md\\\\AbstractRoleDescriptor\\)\\:\\:XSI_TYPE_NAME\\.$#"
130+
message: '#^Access to undefined constant static\(SimpleSAML\\SAML2\\XML\\md\\AbstractRoleDescriptor\)\:\:XSI_TYPE_NAME\.$#'
131+
identifier: classConstant.notFound
130132
count: 2
131133
path: src/XML/md/AbstractRoleDescriptor.php
132134

133135
-
134-
message: "#^Access to undefined constant static\\(SimpleSAML\\\\SAML2\\\\XML\\\\md\\\\AbstractRoleDescriptor\\)\\:\\:XSI_TYPE_NAMESPACE\\.$#"
136+
message: '#^Access to undefined constant static\(SimpleSAML\\SAML2\\XML\\md\\AbstractRoleDescriptor\)\:\:XSI_TYPE_NAMESPACE\.$#'
137+
identifier: classConstant.notFound
135138
count: 2
136139
path: src/XML/md/AbstractRoleDescriptor.php
137140

138141
-
139-
message: "#^Access to undefined constant static\\(SimpleSAML\\\\SAML2\\\\XML\\\\md\\\\AbstractRoleDescriptor\\)\\:\\:XSI_TYPE_PREFIX\\.$#"
142+
message: '#^Access to undefined constant static\(SimpleSAML\\SAML2\\XML\\md\\AbstractRoleDescriptor\)\:\:XSI_TYPE_PREFIX\.$#'
143+
identifier: classConstant.notFound
140144
count: 2
141145
path: src/XML/md/AbstractRoleDescriptor.php
142146

143147
-
144-
message: "#^Call to an undefined static method SimpleSAML\\\\SAML2\\\\XML\\\\md\\\\AbstractSignedMdElement\\:\\:getXsiTypeNamespaceURI\\(\\)\\.$#"
148+
message: '#^Call to an undefined static method SimpleSAML\\SAML2\\XML\\md\\AbstractSignedMdElement\:\:getXsiTypeNamespaceURI\(\)\.$#'
149+
identifier: staticMethod.notFound
145150
count: 1
146151
path: src/XML/md/AbstractSignedMdElement.php
147152

148153
-
149-
message: "#^Access to undefined constant static\\(SimpleSAML\\\\SAML2\\\\XML\\\\saml\\\\AbstractBaseID\\)\\:\\:XSI_TYPE_NAME\\.$#"
154+
message: '#^Access to undefined constant static\(SimpleSAML\\SAML2\\XML\\saml\\AbstractBaseID\)\:\:XSI_TYPE_NAME\.$#'
155+
identifier: classConstant.notFound
150156
count: 2
151157
path: src/XML/saml/AbstractBaseID.php
152158

153159
-
154-
message: "#^Access to undefined constant static\\(SimpleSAML\\\\SAML2\\\\XML\\\\saml\\\\AbstractBaseID\\)\\:\\:XSI_TYPE_NAMESPACE\\.$#"
160+
message: '#^Access to undefined constant static\(SimpleSAML\\SAML2\\XML\\saml\\AbstractBaseID\)\:\:XSI_TYPE_NAMESPACE\.$#'
161+
identifier: classConstant.notFound
155162
count: 2
156163
path: src/XML/saml/AbstractBaseID.php
157164

158165
-
159-
message: "#^Access to undefined constant static\\(SimpleSAML\\\\SAML2\\\\XML\\\\saml\\\\AbstractBaseID\\)\\:\\:XSI_TYPE_PREFIX\\.$#"
166+
message: '#^Access to undefined constant static\(SimpleSAML\\SAML2\\XML\\saml\\AbstractBaseID\)\:\:XSI_TYPE_PREFIX\.$#'
167+
identifier: classConstant.notFound
160168
count: 2
161169
path: src/XML/saml/AbstractBaseID.php
162170

163171
-
164-
message: "#^Access to undefined constant static\\(SimpleSAML\\\\SAML2\\\\XML\\\\saml\\\\AbstractCondition\\)\\:\\:XSI_TYPE_NAME\\.$#"
172+
message: '#^Access to undefined constant static\(SimpleSAML\\SAML2\\XML\\saml\\AbstractCondition\)\:\:XSI_TYPE_NAME\.$#'
173+
identifier: classConstant.notFound
165174
count: 2
166175
path: src/XML/saml/AbstractCondition.php
167176

168177
-
169-
message: "#^Access to undefined constant static\\(SimpleSAML\\\\SAML2\\\\XML\\\\saml\\\\AbstractCondition\\)\\:\\:XSI_TYPE_NAMESPACE\\.$#"
178+
message: '#^Access to undefined constant static\(SimpleSAML\\SAML2\\XML\\saml\\AbstractCondition\)\:\:XSI_TYPE_NAMESPACE\.$#'
179+
identifier: classConstant.notFound
170180
count: 2
171181
path: src/XML/saml/AbstractCondition.php
172182

173183
-
174-
message: "#^Access to undefined constant static\\(SimpleSAML\\\\SAML2\\\\XML\\\\saml\\\\AbstractCondition\\)\\:\\:XSI_TYPE_PREFIX\\.$#"
184+
message: '#^Access to undefined constant static\(SimpleSAML\\SAML2\\XML\\saml\\AbstractCondition\)\:\:XSI_TYPE_PREFIX\.$#'
185+
identifier: classConstant.notFound
175186
count: 2
176187
path: src/XML/saml/AbstractCondition.php
177188

178189
-
179-
message: "#^Access to undefined constant static\\(SimpleSAML\\\\SAML2\\\\XML\\\\saml\\\\AbstractStatement\\)\\:\\:XSI_TYPE_NAME\\.$#"
190+
message: '#^Access to undefined constant static\(SimpleSAML\\SAML2\\XML\\saml\\AbstractStatement\)\:\:XSI_TYPE_NAME\.$#'
191+
identifier: classConstant.notFound
180192
count: 2
181193
path: src/XML/saml/AbstractStatement.php
182194

183195
-
184-
message: "#^Access to undefined constant static\\(SimpleSAML\\\\SAML2\\\\XML\\\\saml\\\\AbstractStatement\\)\\:\\:XSI_TYPE_NAMESPACE\\.$#"
196+
message: '#^Access to undefined constant static\(SimpleSAML\\SAML2\\XML\\saml\\AbstractStatement\)\:\:XSI_TYPE_NAMESPACE\.$#'
197+
identifier: classConstant.notFound
185198
count: 2
186199
path: src/XML/saml/AbstractStatement.php
187200

188201
-
189-
message: "#^Access to undefined constant static\\(SimpleSAML\\\\SAML2\\\\XML\\\\saml\\\\AbstractStatement\\)\\:\\:XSI_TYPE_PREFIX\\.$#"
202+
message: '#^Access to undefined constant static\(SimpleSAML\\SAML2\\XML\\saml\\AbstractStatement\)\:\:XSI_TYPE_PREFIX\.$#'
203+
identifier: classConstant.notFound
190204
count: 2
191205
path: src/XML/saml/AbstractStatement.php
192206

193207
-
194-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
208+
message: '#^Unsafe usage of new static\(\)\.$#'
209+
identifier: new.static
195210
count: 1
196211
path: src/XML/saml/Attribute.php
197212

198213
-
199-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
214+
message: '#^Unsafe usage of new static\(\)\.$#'
215+
identifier: new.static
200216
count: 1
201217
path: src/XML/saml/EncryptedAttribute.php
202218

203219
-
204-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
220+
message: '#^Unsafe usage of new static\(\)\.$#'
221+
identifier: new.static
205222
count: 1
206223
path: src/XML/saml/EncryptedID.php
207224

208225
-
209-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
226+
message: '#^Unsafe usage of new static\(\)\.$#'
227+
identifier: new.static
210228
count: 1
211229
path: src/XML/saml/NameIDType.php

src/Certificate/PrivateKey.php

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)