Comments (2)
Thanks @Kodzila ! I will look into this. I cheated a bit a had the code output the digest hash for me - but thus far I have only tested it with the test certificates.
You can also get the test root certificate here:
https://www.nets.eu/dk-da/kundeservice/nemid-tjenesteudbyder/NemID-tjenesteudbyderpakken/Pages/OCES-II-certifikat-eksempler.aspx
Getting the digest with some extra temporary PHP code, seems like a hassle - would be nice with a different, simpler approach - maybe matching against the fingerprint of the certificate? I mean, these can be retrieved using an openssl command.
from nemid.
Hello @zubfatal I'm on the same page as you are and managed to get through this issue.
You need to go to this page:
https://www.nets.eu/dk-da/kundeservice/NemID-Til-Private/Pages/Repository.aspx
and download root certificate.
Then in the code you can calculate fingerprint and push to certificationDigests:
$root = file_get_contents(__DIR__ . '/../certs/root.crt');
$config['login']['certificationDigests'][] = hash('sha256', $root);
This is how to configure it for production. For test I could not find relevant certificate, only ready sha256 signature:
0e2fd1fda36a4bf3995e28619704d60e3382c91e44a2b458ab891316380b1d50
found in: https://github.com/tobandan/nemid-php/blob/master/www/index.php#L99
from nemid.
Related Issues (15)
- checkOcsp on php 7 gives malformedRequest HOT 1
- Remove the high usage of config() everywhere HOT 1
- Refactor the old core classes
- Signature could not be validated !!!
- Where do I find the certificate? VOCES or FOCES? HOT 1
- Invalid target origin '{https://appletk.danid.dk/}' HOT 21
- Various questions HOT 1
- Why not implement LDAP? HOT 1
- Help Wanted: Issue with the integration HOT 3
- A little help getting started
- PSR-4 Update HOT 3
- checkOscp gives cURL error HOT 2
- Certificate chain not signed by any trustedroots HOT 3
- Rid to CPR match
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nemid.