Skip to content

Commit

Permalink
Updated SetaPDF-Signer dependency
Browse files Browse the repository at this point in the history
Implemented #9 "Use PadesProxyTrait"
  • Loading branch information
MaximilianKresse committed Mar 16, 2023
1 parent 03c5578 commit 0462771
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 167 deletions.
23 changes: 1 addition & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,26 +45,6 @@ for more options for authentication with composer.

**You have to define your credentials for AWS KMS in [environment variables](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_credentials_environment.html).**


### Evaluation version
By default this packages depends on a licensed version of the [SetaPDF-Signer](https://www.setasign.com/signer)
component. If you want to use it with an [evaluation version](https://www.setasign.com/products/setapdf-signer/evaluate/)
please use following in your composer.json:

```json
{
"require": {
"setasign/setapdf-signer-addon-aws-kms": "dev-evaluation"
},
"repositories": [
{
"type": "composer",
"url": "https://www.setasign.com/downloads/"
}
]
}
```

## Usage

All classes in this package are located in the namespace `setasign\SetaPDF\Signer\Module\AwsKms`.
Expand All @@ -85,7 +65,6 @@ $awsKmsModule = new setasign\SetaPDF\Signer\Module\AwsKms\Module($keyId, $kmsCli

$cert = file_get_contents('your-cert.crt');
$awsKmsModule->setCertificate($cert);
$awsKmsModule->setDigest($digest);
$awsKmsModule->setSignatureAlgorithm($algorithm);

// the file to sign
Expand All @@ -101,7 +80,7 @@ $signer = new SetaPDF_Signer($document);
$signer->sign($awsKmsModule);
```

Make sure that you pass `$digest` and `$algorithm` values which match the configuration of the key in the KMS.
Make sure that you pass `$algorithm` value which match the configuration of the key in the KMS.

## License

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"require": {
"php": ">=5.6",
"setasign/setapdf-signer": "^2.0",
"setasign/setapdf-signer": "^2.40",
"aws/aws-sdk-php": "^3.171"
},
"require-dev": {
Expand Down
153 changes: 104 additions & 49 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0462771

Please sign in to comment.