bunq / sdk_java

Java SDK for bunq API
MIT License
47 stars 23 forks source link

Certificate pinning issue after bunq certificate renewal #123

Closed masoudparvari closed 4 years ago

masoudparvari commented 4 years ago

Steps to reproduce:

  1. Create a BunqContext with the Java SDK

What should happen:

  1. Session should be successfully created and payments should succeed

What happens:

  1. Creation fails with com.bunq.sdk.exception.UncaughtExceptionError: Uncaught exception "Certificate pinning failure!"

SDK version and environment

Extra info:

Apparently your old certificate has expired in Wednesday, 21 April 2021 at 14:00:00. And that's hard coded in code.

saket88 commented 4 years ago

Any details about the fix of this issue?

DrOof commented 4 years ago

Is the problem just the pinned key?

SANDBOX(
      "public-api.sandbox.bunq.com",
      "v1",
      "sha256/9Y+oZve6H+r17Kdn+lN5sT0ijgxLyDGIuQtUwLupawA="
  );
masoudparvari commented 4 years ago

Is the problem just the pinned key?

SANDBOX(
      "public-api.sandbox.bunq.com",
      "v1",
      "sha256/9Y+oZve6H+r17Kdn+lN5sT0ijgxLyDGIuQtUwLupawA="
  );

yes, this should be new key: sha256/SEJfjAW74vHQmGe/lb9NwBjzAw5y7rpJH3UWpGE5q8A=

DrOof commented 4 years ago

Sweet. Should we do a PR? Or is this already planned for a release?

On Thu, 26 Mar 2020 at 19:10 masoudparvari notifications@github.com wrote:

Is the problem just the pinned key?

SANDBOX( "public-api.sandbox.bunq.com", "v1", "sha256/9Y+oZve6H+r17Kdn+lN5sT0ijgxLyDGIuQtUwLupawA=" );

yes, this should be new ky: sha256/SEJfjAW74vHQmGe/lb9NwBjzAw5y7rpJH3UWpGE5q8A=

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bunq/sdk_java/issues/123#issuecomment-604590100, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE33FBX6UWULSXQR4UOTWDRJOK7LANCNFSM4LR5SOXQ .

DrOof commented 4 years ago

I have a patch for ourselves. But I can't push a branch and do a pull request.

FNG21 commented 4 years ago

Hi guys! Thanks for bringing this up :)

To enable you to keep using our SDKs, a PR has been submitted just now that will update the certificate hash. I'll close this issue when the PR is merged so you know when you can continue building great applications with our amazing API!