Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
PROJECTNAME: 'web-eid/web-eid-authtoken-validation-php'
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Download Coverity Build Tool
run: |
curl --silent --data "token=$TOKEN&project=$PROJECTNAME" -o cov-analysis-linux64.tar.gz https://scan.coverity.com/download/linux64
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- uses: shivammathur/setup-php@v2
with:
Expand All @@ -26,7 +26,7 @@ jobs:

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion src/certificate/CertificateValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public static function validateIsValidAndSignedByTrustedCA(

if ($certificate->validateSignature()) {
$chain = $certificate->getChain();
$trustedCACert = end($chain);
$trustedCACert = next($chain);

// Verify that the trusted CA cert is presently valid before returning the result.
self::certificateIsValidOnDate($trustedCACert, $now, "Trusted CA");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public static function setUpBeforeClass(): void
protected function setUp(): void
{
AsnUtil::loadOIDs();
$this->trustedValidator = new SubjectCertificateTrustedValidator(new TrustedCertificates([]), new Logger());
$this->trustedValidator = new SubjectCertificateTrustedValidator(new TrustedCertificates([Certificates::getTestEsteid2018CAGov()]), new Logger());
self::setSubjectCertificateIssuerCertificate($this->trustedValidator);
$this->estEid2018Cert = Certificates::getJaakKristjanEsteid2018Cert();
$this->configuration = new AuthTokenValidationConfiguration();
Expand Down