Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
05a3c3fe
Commit
05a3c3fe
authored
4 years ago
by
Tim van Dijen
Committed by
Tim van Dijen
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove unused method
parent
b580bb67
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/saml/lib/Message.php
+0
-37
0 additions, 37 deletions
modules/saml/lib/Message.php
with
0 additions
and
37 deletions
modules/saml/lib/Message.php
+
0
−
37
View file @
05a3c3fe
...
...
@@ -123,43 +123,6 @@ class Message
}
/**
* Find the certificate used to sign a message or assertion.
*
* An exception is thrown if we are unable to locate the certificate.
*
* @param array $certFingerprints The fingerprints we are looking for.
* @param array $certificates Array of certificates.
*
* @return string Certificate, in PEM-format.
*
* @throws \SimpleSAML\Error\Exception if we cannot find the certificate matching the fingerprint.
*/
private
static
function
findCertificate
(
array
$certFingerprints
,
array
$certificates
):
string
{
$candidates
=
[];
foreach
(
$certificates
as
$cert
)
{
$fp
=
strtolower
(
sha1
(
base64_decode
(
$cert
)));
if
(
!
in_array
(
$fp
,
$certFingerprints
,
true
))
{
$candidates
[]
=
$fp
;
continue
;
}
/* We have found a matching fingerprint. */
$pem
=
"-----BEGIN CERTIFICATE-----
\n
"
.
chunk_split
(
$cert
,
64
)
.
"-----END CERTIFICATE-----
\n
"
;
return
$pem
;
}
$candidates
=
"'"
.
implode
(
"', '"
,
$candidates
)
.
"'"
;
$fps
=
"'"
.
implode
(
"', '"
,
$certFingerprints
)
.
"'"
;
throw
new
SSP_Error\Exception
(
'Unable to find a certificate matching the configured '
.
'fingerprint. Candidates: '
.
$candidates
.
'; certFingerprint: '
.
$fps
.
'.'
);
}
/**
* Check the signature on a SAML2 message or assertion.
*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment