Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
e2d22a18
Commit
e2d22a18
authored
Feb 22, 2016
by
Piers Harding
Committed by
Robert Lyon
Jun 29, 2016
Browse files
Bug 1579285: create work around for openssl_x509_fingerprint
behatnotneeded Change-Id: I50d6371766a244525e587c43fd1b72b1baf057ba
parent
004c45ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
e2d22a18
...
...
@@ -35,3 +35,4 @@ mahara-*.zip
logfile
node_modules/
htdocs/.externalToolBuilders/
htdocs/auth/saml/extlib/simplesamlphp
htdocs/auth/saml/lib.php
View file @
e2d22a18
...
...
@@ -421,11 +421,11 @@ class PluginAuthSaml extends PluginAuth {
),
'sha1fingerprint'
=>
array
(
'type'
=>
'html'
,
'value'
=>
'<div><p>'
.
get_string
(
'sha1fingerprint'
,
'auth.webservice'
,
openssl_x509_fingerprint
(
$cert
,
"sha1"
))
.
'</p></div>'
,
'value'
=>
'<div><p>'
.
get_string
(
'sha1fingerprint'
,
'auth.webservice'
,
auth_saml_
openssl_x509_fingerprint
(
$cert
,
"sha1"
))
.
'</p></div>'
,
),
'md5fingerprint'
=>
array
(
'type'
=>
'html'
,
'value'
=>
'<div><p>'
.
get_string
(
'md5fingerprint'
,
'auth.webservice'
,
openssl_x509_fingerprint
(
$cert
,
"md5"
))
.
'</p></div>'
,
'value'
=>
'<div><p>'
.
get_string
(
'md5fingerprint'
,
'auth.webservice'
,
auth_saml_
openssl_x509_fingerprint
(
$cert
,
"md5"
))
.
'</p></div>'
,
),
'expires'
=>
array
(
'type'
=>
'html'
,
...
...
@@ -828,6 +828,15 @@ class PluginAuthSaml extends PluginAuth {
}
}
/**
* Work around for missing function in 5.5 - is in 5.6
*/
function
auth_saml_openssl_x509_fingerprint
(
$cert
,
$hash
)
{
$cert
=
preg_replace
(
'#-.*-|\r|\n#'
,
''
,
$cert
);
$bin
=
base64_decode
(
$cert
);
return
hash
(
$hash
,
$bin
);
}
if
(
file_exists
(
get_config
(
'docroot'
)
.
'auth/saml/extlib/simplesamlphp/lib/SimpleSAML/XHTML/IdPDisco.php'
))
{
require_once
(
get_config
(
'docroot'
)
.
'auth/saml/extlib/simplesamlphp/lib/SimpleSAML/XHTML/IdPDisco.php'
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment