Skip to content

Commit 4524c42

Browse files
metsmamrts
authored andcommitted
Nonce support was added to EstEID 2015
+ All ID-Card certificates are expired in this service WE2-839 Signed-off-by: Raul Metsma <[email protected]>
1 parent 4599fe7 commit 4524c42

File tree

6 files changed

+7
-12
lines changed

6 files changed

+7
-12
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ PHP Session is been used for storing the challenge nonce.
6767

6868
You must explicitly specify which **intermediate** certificate authorities (CAs) are trusted to issue the eID authentication and OCSP responder certificates. CA certificates can be loaded from resources.
6969

70-
First, copy the trusted certificates, for example `ESTEID-SK_2015.der.cer` and `ESTEID2018.der.cer`, to `certificates/` folder, then load the certificates as follows:
70+
First, copy the trusted certificates, for example `ESTEID2018.der.cer`, to `certificates/` folder, then load the certificates as follows:
7171

7272
```php
7373
use web_eid\web_eid_authtoken_validation_php\certificate\CertificateLoader;
@@ -76,7 +76,7 @@ use web_eid\web_eid_authtoken_validation_php\certificate\CertificateLoader;
7676
public function trustedIntermediateCACertificates(): array
7777
{
7878
return CertificateLoader::loadCertificatesFromResources(
79-
__DIR__ . "/../certificates/ESTEID2018.cer", __DIR__ . "/../certificates/ESTEID-SK_2015.cer"
79+
__DIR__ . "/../certificates/ESTEID2018.cer"
8080
);
8181
}
8282
...
@@ -296,7 +296,7 @@ The following additional configuration options are available in `AuthTokenValida
296296

297297
- `withDisallowedCertificatePolicies(string ...$policies)` – adds the given policies to the list of disallowed user certificate policies. In order for the user certificate to be considered valid, it must not contain any policies present in this list. Contains the Estonian Mobile-ID policies by default as it must not be possible to authenticate with a Mobile-ID certificate when an eID smart card is expected.
298298

299-
- `withNonceDisabledOcspUrls(URI ...$urls)` – adds the given URLs to the list of OCSP responder access location URLs for which the nonce protocol extension will be disabled. Some OCSP responders don't support the nonce extension. Contains the ESTEID-2015 OCSP responder URL by default.
299+
- `withNonceDisabledOcspUrls(URI ...$urls)` – adds the given URLs to the list of OCSP responder access location URLs for which the nonce protocol extension will be disabled. Some OCSP responders don't support the nonce extension.
300300

301301
Extended configuration example:
302302

examples/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
],
1212
"require": {
1313
"php": ">=7.4",
14-
"web-eid/web-eid-authtoken-validation-php": "1.0.0",
14+
"web-eid/web-eid-authtoken-validation-php": "1.1.0",
1515
"altorouter/altorouter": "1.1.0",
1616
"guzzlehttp/psr7": "2.4.5",
1717
"psr/log": "^3.0"

examples/src/Auth.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ class Auth
4040
public function trustedIntermediateCACertificates(): array
4141
{
4242
return CertificateLoader::loadCertificatesFromResources(
43-
__DIR__ . "/../certificates/esteid2018.der.crt",
44-
__DIR__ . "/../certificates/ESTEID-SK_2015.der.crt"
43+
__DIR__ . "/../certificates/esteid2018.der.crt"
4544
);
4645
}
4746

src/validator/AuthTokenValidationConfiguration.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
use GuzzleHttp\Psr7\Uri;
3131
use web_eid\web_eid_authtoken_validation_php\util\DateAndTime;
3232
use web_eid\web_eid_authtoken_validation_php\util\UriCollection;
33-
use web_eid\web_eid_authtoken_validation_php\validator\ocsp\OcspUrl;
3433

3534
use InvalidArgumentException;
3635
use web_eid\web_eid_authtoken_validation_php\validator\ocsp\service\DesignatedOcspServiceConfiguration;
@@ -57,7 +56,7 @@ public function __construct()
5756
SubjectCertificatePolicies::$ESTEID_SK_2015_MOBILE_ID_POLICY_V3,
5857
SubjectCertificatePolicies::$ESTEID_SK_2015_MOBILE_ID_POLICY
5958
];
60-
$this->nonceDisabledOcspUrls = new UriCollection(new Uri(OcspUrl::AIA_ESTEID_2015_URL));
59+
$this->nonceDisabledOcspUrls = new UriCollection();
6160
}
6261

6362
public function setSiteOrigin(Uri $siteOrigin): void

src/validator/ocsp/OcspUrl.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131

3232
final class OcspUrl
3333
{
34-
public const AIA_ESTEID_2015_URL = "http://aia.sk.ee/esteid2015";
35-
3634
public function __construct()
3735
{
3836
throw new BadFunctionCallException("Utility class");

tests/testutil/OcspServiceMaker.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
use web_eid\web_eid_authtoken_validation_php\util\UriCollection;
3030
use web_eid\web_eid_authtoken_validation_php\util\X509Collection;
3131
use web_eid\web_eid_authtoken_validation_php\validator\ocsp\OcspServiceProvider;
32-
use web_eid\web_eid_authtoken_validation_php\validator\ocsp\OcspUrl;
3332
use web_eid\web_eid_authtoken_validation_php\validator\ocsp\service\AiaOcspServiceConfiguration;
3433
use web_eid\web_eid_authtoken_validation_php\validator\ocsp\service\DesignatedOcspServiceConfiguration;
3534

@@ -52,7 +51,7 @@ public static function getDesignatedOcspServiceProvider(bool $doesSupportNonce =
5251
private static function getAiaOcspServiceConfiguration(): AiaOcspServiceConfiguration
5352
{
5453
return new AiaOcspServiceConfiguration(
55-
new UriCollection(new Uri(OcspUrl::AIA_ESTEID_2015_URL), new Uri(self::TEST_ESTEID_2015)),
54+
new UriCollection(new Uri(self::TEST_ESTEID_2015)),
5655
CertificateValidator::buildTrustFromCertificates([Certificates::getTestEsteid2018CA(), Certificates::getTestEsteid2018CAGov(), Certificates::getTestEsteid2015CA()])
5756
);
5857
}

0 commit comments

Comments
 (0)