hyperledger / anoncreds-rs

anoncreds-rs
https://wiki.hyperledger.org/display/anoncreds
Apache License 2.0
73 stars 51 forks source link

iOS crashes when built in release mode #339

Closed KolbyRKunz closed 1 month ago

KolbyRKunz commented 1 month ago

When using anoncreds in a release build iOS will crash whenever it tries to make a call into anoncreds from React Native. This is being used in a Credo based project. It occurs when using Credo 0.4.2 and Credo 0.5. This also appears to happen with the version 1 and version 2.2 of anoncreds. Initial attempts to resolve this by removing flipper as suggested in this credo issue have not worked. The app runs fine in a development build but when packaged for release it either runs into an EXEC_BAD_ACCESS, SIGABRT or does not crash and has a Error code 1024 - Invalid state: Internal OpenSSL error: error:0180006c:bignum routines:BN_mod_inverse:no inverse:crypto/bn/bngcd.c:532 then crashes on any additional attempts with one of the two aforementioned errors.

cc: @genaris

berendsliedrecht commented 1 month ago

Do you have a reproducible example for this? Colliding OpenSSL versions of other dependencies has been a big source of issues like these..

It's annoying we have to keep openssl due to its great performance, but I wish we could just move to rustls or something else..

KolbyRKunz commented 1 month ago

It was colliding version. We had an old dependency make it way back into our branch from some merges that caused the error.

andrewwhitehead commented 1 month ago

@berendsliedrecht We might be able to remove the OpenSSL dependency soon with this update: https://github.com/hyperledger-labs/agora-glass_pumpkin/pull/24

berendsliedrecht commented 1 month ago

@berendsliedrecht We might be able to remove the OpenSSL dependency soon with this update:

https://github.com/hyperledger-labs/agora-glass_pumpkin/pull/24

Oh that's amazing! Maybe we can keep OpenSSL in but the default will be glass pumpkin.