Skip to content

Commit

Permalink
Merge pull request #38 from fr05t1k/fix-warning
Browse files Browse the repository at this point in the history
Add ability to add pkcs7 flags
  • Loading branch information
fr05t1k authored Oct 15, 2020
2 parents 93b9d7b + 6243687 commit 755b45d
Show file tree
Hide file tree
Showing 2 changed files with 136 additions and 53 deletions.
10 changes: 9 additions & 1 deletion src/Esia/Signer/SignerPKCS7.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@

class SignerPKCS7 extends AbstractSignerPKCS7 implements SignerInterface
{
private $pkcs7Flags = PKCS7_DETACHED;

public function addPKCS7Flag(int $pkcs7Flag): void
{
$this->pkcs7Flags |= $pkcs7Flag;
}

/**
* @throws SignFailException
*/
Expand Down Expand Up @@ -42,7 +49,8 @@ public function sign(string $message): string
$signFile,
$cert,
$privateKey,
[]
[],
$this->pkcs7Flags
);

if ($signResult) {
Expand Down
Loading

0 comments on commit 755b45d

Please sign in to comment.