Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS build fails because of "Use of undeclared identifier 'kind_'". #241

Closed
RhyG opened this issue Mar 5, 2024 · 21 comments
Closed

iOS build fails because of "Use of undeclared identifier 'kind_'". #241

RhyG opened this issue Mar 5, 2024 · 21 comments

Comments

@RhyG
Copy link

RhyG commented Mar 5, 2024

G'day, when trying to build the iOS app it's failing with the error Use of undeclared identifier 'kind_'.

Screenshot 2024-03-05 at 14 32 07

From what I can tell it's due to this check in MGLCipherHostObject.cpp here. I'm not familiar with C++, but can see that kind_ property isn't defined anywhere, and I'm assuming based off the trailing underscore it's meant to be declared as a private member variable on that class.

There's a commented out TODO for a similar check at the top of the file here that doesn't have the same conditions, could it be that that's what's meant to be used?

Downgrading OpenSSL fixes the issue, but we'd like to be able to pull in the latest version of that library if possible. Would be happy to open a PR but I don't know C++ at all unfortunately.

Cheers and thanks for the work on this library!

@RhyG RhyG changed the title Builds failing because of "Use of undeclared identifier 'kind_'". iOS error build fails because of "Use of undeclared identifier 'kind_'". Mar 5, 2024
@RhyG RhyG changed the title iOS error build fails because of "Use of undeclared identifier 'kind_'". iOS build fails because of "Use of undeclared identifier 'kind_'". Mar 5, 2024
@EvelynGuoEntain
Copy link

EvelynGuoEntain commented Mar 6, 2024

+1, same issue here

@charles4221
Copy link

+1 my team are experiencing the same issue

@alex1092
Copy link

alex1092 commented Mar 7, 2024

+1 having the same issue

@DaftlyGrins
Copy link

Same here.

@I-Atlas
Copy link

I-Atlas commented Mar 7, 2024

@mrousavy, please help us

@andrashejj
Copy link

+1

@icc-romeu
Copy link

icc-romeu commented Mar 15, 2024

There is a PR pending that solves this.

#210

In the meantime pin OpenSSL to version lower than 3 in Podfile and it will work:

  pod "OpenSSL-Universal", "~> 1.1.2200"

@RhyG
Copy link
Author

RhyG commented Mar 17, 2024

@icc-romeu we're currently using this method to get around the issue, but especially with the privacy manifest changes coming up it would be preferable to be able to use the latest versions of OpenSSL rather than pinning to an old version.

@mrousavy
Copy link
Member

What privacy manifest changes are you talking about exactly?

@RhyG
Copy link
Author

RhyG commented Mar 18, 2024

What privacy manifest changes are you talking about exactly?

Referring to the requirement Apple has introduced for apps to declare usages of certain APIs. OpenSSL was on an initial list released by Apple of libraries that access these APIs. Not sure if an issue has been raised on this library yet though.

In saying that we're also having conflicts with other deps when pinning OpenSSL so that's not the only reason we're keen to upgrade.

@greynewell
Copy link

Having the same issue. Will have to seek alternatives, I am unwilling to downgrade OpenSSL.

@boorad
Copy link
Collaborator

boorad commented Apr 2, 2024

The downgrade may go in with #233 as well. But I'll see about taking a look at this issue after that PR is merged.

@corn-o
Copy link

corn-o commented Apr 3, 2024

+1 same here

@hanyufoodles
Copy link

hanyufoodles commented Apr 17, 2024

+1 here. Is there a way to downgrade OpenSSL for expo managed project?

@kaladivo
Copy link

You can use this patch until the fix is merged and released.

index 3c0346a8a33548b249cca08e018a99a064c0d950..7c539af75c22bae2440cb6070d8944514c7c324e 100644
--- a/cpp/Cipher/MGLCipherHostObject.cpp
+++ b/cpp/Cipher/MGLCipherHostObject.cpp
@@ -577,7 +577,7 @@ bool MGLCipherHostObject::InitAuthenticated(const char *cipher_type, int iv_len,
     // TODO(tniessen) Support CCM decryption in FIPS mode
 
 #if OPENSSL_VERSION_MAJOR >= 3
-    if (mode == EVP_CIPH_CCM_MODE && kind_ == kDecipher &&
+    if (mode == EVP_CIPH_CCM_MODE && !isCipher_ &&
         EVP_default_properties_is_fips_enabled(nullptr)) {
 #else
     if (mode == EVP_CIPH_CCM_MODE && !isCipher_ && FIPS_mode()) {

@mrousavy
Copy link
Member

I just released react-native-quick-crypto 0.7.0-rc.0 to npm - is that fixed here already or is that a separate PR? @boorad

@boorad
Copy link
Collaborator

boorad commented Apr 18, 2024

The fix is in #253, so it will be in another release candidate after the requested changes in that PR are made.

@boorad
Copy link
Collaborator

boorad commented Apr 19, 2024

#253 merged to main

@boorad boorad closed this as completed Apr 19, 2024
@akinzalowevidation
Copy link

The fix is in #253, so it will be in another release candidate after the requested changes in that PR are made.

Is there an ETA on the next release candidate version that it will be included in?

@boorad
Copy link
Collaborator

boorad commented Apr 23, 2024

Is there an ETA on the next release candidate version that it will be included in?

I was working on it in Github Actions this morning, but haven't been able to make that work just yet. Hopefully in the next day or so.

@boorad
Copy link
Collaborator

boorad commented Apr 25, 2024

0.7.0-rc.1 has been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests