Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Kontrola existence cesty k veřejnému klíči #24

Closed
wants to merge 5 commits into from

Conversation

jost125
Copy link
Contributor

@jost125 jost125 commented Feb 25, 2017

No description provided.

This is better for documentation purposes of this test - invalid
public key does not affect if pkp can be counted or not
Paths are checked early in constructor, so it can be checked
only once on object constructing and close to source of bug.
@jost125 jost125 force-pushed the jm-certificate-checks branch 2 times, most recently from d2c4198 to a7f5801 Compare February 25, 2017 19:28
Copy link
Member

@janlanger janlanger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 jen pár drobných změn prosím

@@ -16,6 +16,12 @@ class CryptographyService

public function __construct(string $privateKeyFile, string $publicKeyFile, string $privateKeyPassword = '')
{
if (!file_exists($privateKeyFile)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spíš is_file file_exists vrací true i pro adresáře

} catch (\PHPUnit\Framework\AssertionFailedError $exception) {
throw $exception;
} catch (\Throwable $exception) {
$this->assertInstanceOf($expectedExceptionType, $exception);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tady by se hodilo spíš $this->expectException

/**
* @var string
*/
private $publicKeyFile;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anotaci na jeden řádek

@@ -65,6 +65,7 @@ public function getBkpCode(string $pkpCode): string

public function addWSESignature(string $request): string
{
$this->tryLoadPublicKey();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asi bych do metody posílal už obsah souboru, nebude se muset načítat 2x.

Přejmenoval bych metodu na verifyPublicKey

@janlanger janlanger closed this in b5e6ba5 Feb 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants