@@ -20,18 +20,18 @@ |
||
20 | 20 | throw new Exception("Attempt to access the token management page unauthenticated."); |
21 | 21 | } |
22 | 22 | switch ($_POST['submit']) { |
23 | - case "NEVERMIND": |
|
24 | - \SimpleSAML\Auth\ProcessingChain::resumeProcessing($state); |
|
25 | - break; |
|
26 | - case "DELETE": |
|
27 | - if ($state['FIDO2AuthSuccessful'] == $_POST['credId']) { |
|
28 | - throw new Exception("Attempt to delete the currently used credential despite UI preventing this."); |
|
29 | - } |
|
30 | - $store = $state['webauthn:store']; |
|
31 | - $store->deleteTokenData($_POST['credId']); |
|
32 | - \SimpleSAML\Auth\ProcessingChain::resumeProcessing($state); |
|
33 | - break; |
|
34 | - default: |
|
35 | - throw new Exception("Unknown submit button state."); |
|
23 | + case "NEVERMIND": |
|
24 | + \SimpleSAML\Auth\ProcessingChain::resumeProcessing($state); |
|
25 | + break; |
|
26 | + case "DELETE": |
|
27 | + if ($state['FIDO2AuthSuccessful'] == $_POST['credId']) { |
|
28 | + throw new Exception("Attempt to delete the currently used credential despite UI preventing this."); |
|
29 | + } |
|
30 | + $store = $state['webauthn:store']; |
|
31 | + $store->deleteTokenData($_POST['credId']); |
|
32 | + \SimpleSAML\Auth\ProcessingChain::resumeProcessing($state); |
|
33 | + break; |
|
34 | + default: |
|
35 | + throw new Exception("Unknown submit button state."); |
|
36 | 36 | } |
37 | 37 |
@@ -68,15 +68,15 @@ |
||
68 | 68 | */ |
69 | 69 | $sigcheck = openssl_verify($sigData, $signature, $keyResource, OPENSSL_ALGO_SHA256); |
70 | 70 | switch ($sigcheck) { |
71 | - case 1: |
|
72 | - $this->pass("Signature validation succeeded!"); |
|
73 | - break; |
|
74 | - case 0: |
|
75 | - $this->fail("Signature validation failed (sigdata = $sigData) (signature = $signature) !"); |
|
76 | - break; |
|
77 | - default: |
|
78 | - $this->fail("There was an error executing the signature check."); |
|
79 | - break; |
|
71 | + case 1: |
|
72 | + $this->pass("Signature validation succeeded!"); |
|
73 | + break; |
|
74 | + case 0: |
|
75 | + $this->fail("Signature validation failed (sigdata = $sigData) (signature = $signature) !"); |
|
76 | + break; |
|
77 | + default: |
|
78 | + $this->fail("There was an error executing the signature check."); |
|
79 | + break; |
|
80 | 80 | } |
81 | 81 | } |
82 | 82 | } |