Git Product home page Git Product logo

Comments (2)

zubfatal avatar zubfatal commented on July 17, 2024 1

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.

Kodzila avatar Kodzila commented on July 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.