op-developer / psd2-registration-example

Examples for generating certificates for MTLS, JWT Signing and registering to OP's PSD2 Sandbox
MIT License
5 stars 7 forks source link

Are the client cert and private key still created with this typescript version? #12

Open matiasturunen2 opened 3 years ago

matiasturunen2 commented 3 years ago

I'm developing a demo which uses OP psd2. In the documentation it mentions that cert and key are generated with this example. Is that still true? And if so, which variables I should save to file to get it working? A quote from https://op-developer.fi/p/paymentauthorizationflow step 2.

The following cURL call can be used for completing this step. The call assumes that your current directory contains your client certificate (client.crt) and the related private key (key.pem) - both are created by the Registration Helper App.

And as a side note, I already tried to save both mtlsKey and mtlsCert as is, and with .toString(), but always got an error from cURL

could not load PEM client certificate, OpenSSL error error:140AB18E:SSL routines:SSL_CTX_use_certificate:ca md too weak, (no key found, wrong pass phrase, or wrong file format?)

Which indicates that cert/key are weakly generated with md5 or there is something else wrong (Could be my fault, since I don't know if those vars I used are correct).

keksipurkki commented 3 years ago

Sorry for the delayed response!

The tool in this repository performs dynamic registration and produces the key material on the fly for the sandbox environment. You'll get the keys (QWAC and QSEALC) in JWKS format which you then have to convert to PEM if you're working with cURL and other tools depending on OpenSSL.

However, we recommend that you acquire your production certificates and test them separately against our sandbox APIs. This is important as we may need to onboard your QTSP if we do not already support it.