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
790639cc
Commit
790639cc
authored
8 years ago
by
Thijs Kinkhorst
Browse files
Options
Downloads
Patches
Plain Diff
Coding style psr-2, no functional changes.
parent
24bc1f2b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/authX509/lib/Auth/Process/ExpiryWarning.php
+6
-3
6 additions, 3 deletions
modules/authX509/lib/Auth/Process/ExpiryWarning.php
modules/authX509/lib/Auth/Source/X509userCert.php
+18
-9
18 additions, 9 deletions
modules/authX509/lib/Auth/Source/X509userCert.php
with
24 additions
and
12 deletions
modules/authX509/lib/Auth/Process/ExpiryWarning.php
+
6
−
3
View file @
790639cc
...
@@ -14,7 +14,8 @@
...
@@ -14,7 +14,8 @@
* @author Joost van Dijk, SURFnet. <Joost.vanDijk@surfnet.nl>
* @author Joost van Dijk, SURFnet. <Joost.vanDijk@surfnet.nl>
* @package SimpleSAMLphp
* @package SimpleSAMLphp
*/
*/
class
sspmod_authX509_Auth_Process_ExpiryWarning
extends
SimpleSAML_Auth_ProcessingFilter
{
class
sspmod_authX509_Auth_Process_ExpiryWarning
extends
SimpleSAML_Auth_ProcessingFilter
{
private
$warndaysbefore
=
30
;
private
$warndaysbefore
=
30
;
private
$renewurl
=
null
;
private
$renewurl
=
null
;
...
@@ -25,7 +26,8 @@ class sspmod_authX509_Auth_Process_ExpiryWarning extends SimpleSAML_Auth_Process
...
@@ -25,7 +26,8 @@ class sspmod_authX509_Auth_Process_ExpiryWarning extends SimpleSAML_Auth_Process
* @param array $config Configuration information about this filter.
* @param array $config Configuration information about this filter.
* @param mixed $reserved For future use.
* @param mixed $reserved For future use.
*/
*/
public
function
__construct
(
$config
,
$reserved
)
{
public
function
__construct
(
$config
,
$reserved
)
{
parent
::
__construct
(
$config
,
$reserved
);
parent
::
__construct
(
$config
,
$reserved
);
assert
(
'is_array($config)'
);
assert
(
'is_array($config)'
);
...
@@ -53,7 +55,8 @@ class sspmod_authX509_Auth_Process_ExpiryWarning extends SimpleSAML_Auth_Process
...
@@ -53,7 +55,8 @@ class sspmod_authX509_Auth_Process_ExpiryWarning extends SimpleSAML_Auth_Process
*
*
* @param array $state The state of the response.
* @param array $state The state of the response.
*/
*/
public
function
process
(
&
$state
)
{
public
function
process
(
&
$state
)
{
assert
(
'is_array($state)'
);
assert
(
'is_array($state)'
);
if
(
isset
(
$state
[
'isPassive'
])
&&
$state
[
'isPassive'
]
===
true
)
{
if
(
isset
(
$state
[
'isPassive'
])
&&
$state
[
'isPassive'
]
===
true
)
{
...
...
This diff is collapsed.
Click to expand it.
modules/authX509/lib/Auth/Source/X509userCert.php
+
18
−
9
View file @
790639cc
...
@@ -7,7 +7,8 @@
...
@@ -7,7 +7,8 @@
* @author Emmanuel Dreyfus <manu@netbsd.org>
* @author Emmanuel Dreyfus <manu@netbsd.org>
* @package SimpleSAMLphp
* @package SimpleSAMLphp
*/
*/
class
sspmod_authX509_Auth_Source_X509userCert
extends
SimpleSAML_Auth_Source
{
class
sspmod_authX509_Auth_Source_X509userCert
extends
SimpleSAML_Auth_Source
{
/**
/**
* x509 attributes to use from the certificate
* x509 attributes to use from the certificate
...
@@ -37,17 +38,20 @@ class sspmod_authX509_Auth_Source_X509userCert extends SimpleSAML_Auth_Source {
...
@@ -37,17 +38,20 @@ class sspmod_authX509_Auth_Source_X509userCert extends SimpleSAML_Auth_Source {
* @param array $info Information about this authentication source.
* @param array $info Information about this authentication source.
* @param array &$config Configuration for this authentication source.
* @param array &$config Configuration for this authentication source.
*/
*/
public
function
__construct
(
$info
,
&
$config
)
{
public
function
__construct
(
$info
,
&
$config
)
{
assert
(
'is_array($info)'
);
assert
(
'is_array($info)'
);
assert
(
'is_array($config)'
);
assert
(
'is_array($config)'
);
if
(
isset
(
$config
[
'authX509:x509attributes'
]))
if
(
isset
(
$config
[
'authX509:x509attributes'
]))
{
$this
->
x509attributes
=
$this
->
x509attributes
=
$config
[
'authX509:x509attributes'
];
$config
[
'authX509:x509attributes'
];
}
if
(
array_key_exists
(
'authX509:ldapusercert'
,
$config
))
if
(
array_key_exists
(
'authX509:ldapusercert'
,
$config
))
{
$this
->
ldapusercert
=
$this
->
ldapusercert
=
$config
[
'authX509:ldapusercert'
];
$config
[
'authX509:ldapusercert'
];
}
parent
::
__construct
(
$info
,
$config
);
parent
::
__construct
(
$info
,
$config
);
...
@@ -63,7 +67,8 @@ class sspmod_authX509_Auth_Source_X509userCert extends SimpleSAML_Auth_Source {
...
@@ -63,7 +67,8 @@ class sspmod_authX509_Auth_Source_X509userCert extends SimpleSAML_Auth_Source {
*
*
* @param array $pem_data PEM-encoded certificate
* @param array $pem_data PEM-encoded certificate
*/
*/
private
function
pem2der
(
$pem_data
)
{
private
function
pem2der
(
$pem_data
)
{
$begin
=
"CERTIFICATE-----"
;
$begin
=
"CERTIFICATE-----"
;
$end
=
"-----END"
;
$end
=
"-----END"
;
$pem_data
=
substr
(
$pem_data
,
$pem_data
=
substr
(
$pem_data
,
...
@@ -79,7 +84,8 @@ class sspmod_authX509_Auth_Source_X509userCert extends SimpleSAML_Auth_Source {
...
@@ -79,7 +84,8 @@ class sspmod_authX509_Auth_Source_X509userCert extends SimpleSAML_Auth_Source {
*
*
* @param array $der_data DER-encoded certificate
* @param array $der_data DER-encoded certificate
*/
*/
private
function
der2pem
(
$der_data
)
{
private
function
der2pem
(
$der_data
)
{
$pem
=
chunk_split
(
base64_encode
(
$der_data
),
64
,
"
\n
"
);
$pem
=
chunk_split
(
base64_encode
(
$der_data
),
64
,
"
\n
"
);
$pem
=
"-----BEGIN CERTIFICATE-----
\n
"
.
$pem
.
$pem
=
"-----BEGIN CERTIFICATE-----
\n
"
.
$pem
.
"-----END CERTIFICATE-----
\n
"
;
"-----END CERTIFICATE-----
\n
"
;
...
@@ -95,7 +101,8 @@ class sspmod_authX509_Auth_Source_X509userCert extends SimpleSAML_Auth_Source {
...
@@ -95,7 +101,8 @@ class sspmod_authX509_Auth_Source_X509userCert extends SimpleSAML_Auth_Source {
*
*
* @param array &$state Information about the current authentication.
* @param array &$state Information about the current authentication.
*/
*/
public
function
authFailed
(
&
$state
)
{
public
function
authFailed
(
&
$state
)
{
$config
=
SimpleSAML_Configuration
::
getInstance
();
$config
=
SimpleSAML_Configuration
::
getInstance
();
$t
=
new
SimpleSAML_XHTML_Template
(
$config
,
$t
=
new
SimpleSAML_XHTML_Template
(
$config
,
...
@@ -118,7 +125,8 @@ class sspmod_authX509_Auth_Source_X509userCert extends SimpleSAML_Auth_Source {
...
@@ -118,7 +125,8 @@ class sspmod_authX509_Auth_Source_X509userCert extends SimpleSAML_Auth_Source {
*
*
* @param array &$state Information about the current authentication.
* @param array &$state Information about the current authentication.
*/
*/
public
function
authenticate
(
&
$state
)
{
public
function
authenticate
(
&
$state
)
{
assert
(
'is_array($state)'
);
assert
(
'is_array($state)'
);
$ldapcf
=
$this
->
ldapcf
;
$ldapcf
=
$this
->
ldapcf
;
...
@@ -232,7 +240,8 @@ class sspmod_authX509_Auth_Source_X509userCert extends SimpleSAML_Auth_Source {
...
@@ -232,7 +240,8 @@ class sspmod_authX509_Auth_Source_X509userCert extends SimpleSAML_Auth_Source {
*
*
* @param array &$state Information about the current authentication.
* @param array &$state Information about the current authentication.
*/
*/
public
function
authSuccesful
(
&
$state
)
{
public
function
authSuccesful
(
&
$state
)
{
SimpleSAML_Auth_Source
::
completeAuth
(
$state
);
SimpleSAML_Auth_Source
::
completeAuth
(
$state
);
assert
(
'false'
);
/* NOTREACHED */
assert
(
'false'
);
/* NOTREACHED */
...
...
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