Closed matanelgabsi closed 3 years ago
Great, and thanks for sharing this. Would be happy to release a new version. But, any ideas why the MIHBigIntegerTests -testInitWithSignedInteger
fails?
Yes, I think so, I'm trying to debug right now and fix.. sorry for missing the test :( (the reason, I think, is that BN_LONG was removed from openssl, trying to find an alternative macro)
If you have any idea I would love to hear it.. can't find an alternative macro for it.. not sure why they removed it..
@hohl I can confirm this is the issue, do you have any good idea what to do with it? it seems that OpenSSL removed BN_LONG. I can think of two options:
/*
* 64-bit processor with LP64 ABI
*/
# ifdef SIXTY_FOUR_BIT_LONG
# define BN_LONG long
# endif
/*
* 64-bit processor other than LP64 ABI
*/
# ifdef SIXTY_FOUR_BIT
# define BN_LONG long long
# endif
# ifdef THIRTY_TWO_BIT
# define BN_LONG int
# endif
What do you think?
I guess option two is the best one for now.
Tests now passed
Looks good to me. I'll have a closer look at the weekend and will most likely push out an update thereafter. Thanks for your work! Then, let's get that pod finally up-to-date again! :)
Did you run pod lib lint
? Test cases pass in Xcode, but I can't make CocoaPods become friends with the OpenSSL dependency.
Ignoring ffi-1.12.2 because its extensions are not built. Try: gem pristine ffi --version 1.12.2
-> MIHCrypto (0.6.0)
- ERROR | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
- NOTE | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: note: Using new build system
- NOTE | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: note: Building targets in parallel
- NOTE | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: note: Using codesigning identity override: -
- NOTE | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: note: Planning build
- NOTE | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: note: Constructing build description
- NOTE | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the App editor. (in target 'App' from project 'App')
- NOTE | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: warning: Skipping code signing because the target does not have an Info.plist file and one is not being generated automatically. (in target 'App' from project 'App')
- ERROR | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_arm64e_armv7_armv7s/openssl.framework/Headers/bio.h:687:1: error: expected function body after function declarator
- WARN | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_arm64e_armv7_armv7s/openssl.framework/Headers/bio.h:699:55: warning: declaration of 'union BIO_sock_info_u' will not be visible outside of this function [-Wvisibility]
- ERROR | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_arm64e_armv7_armv7s/openssl.framework/Headers/bn.h:183:43: error: unknown type name 'BN_ULONG'
- ERROR | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_arm64e_armv7_armv7s/openssl.framework/Headers/bn.h:186:39: error: unknown type name 'BN_ULONG'
- ERROR | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_arm64e_armv7_armv7s/openssl.framework/Headers/bn.h:214:22: error: unknown type name 'BN_ULONG'
- ERROR | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_arm64e_armv7_armv7s/openssl.framework/Headers/bn.h:266:1: error: unknown type name 'BN_ULONG'
- ERROR | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_arm64e_armv7_armv7s/openssl.framework/Headers/bn.h:266:39: error: unknown type name 'BN_ULONG'
- ERROR | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_arm64e_armv7_armv7s/openssl.framework/Headers/bn.h:267:1: error: unknown type name 'BN_ULONG'
- ERROR | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_arm64e_armv7_armv7s/openssl.framework/Headers/bn.h:267:33: error: unknown type name 'BN_ULONG'
- ERROR | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_arm64e_armv7_armv7s/openssl.framework/Headers/bn.h:268:28: error: unknown type name 'BN_ULONG'
- ERROR | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_arm64e_armv7_armv7s/openssl.framework/Headers/bn.h:269:28: error: unknown type name 'BN_ULONG'
- ERROR | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_arm64e_armv7_armv7s/openssl.framework/Headers/bn.h:270:28: error: unknown type name 'BN_ULONG'
- ERROR | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_arm64e_armv7_armv7s/openssl.framework/Headers/bn.h:271:28: error: unknown type name 'BN_ULONG'
- ERROR | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_arm64e_armv7_armv7s/openssl.framework/Headers/bn.h:272:1: error: unknown type name 'BN_ULONG'
- ERROR | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_arm64e_armv7_armv7s/openssl.framework/Headers/bn.h:288:37: error: unknown type name 'BN_ULONG'
- ERROR | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_arm64e_armv7_armv7s/openssl.framework/Headers/bn.h:323:24: error: unknown type name 'BN_ULONG'
- ERROR | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_arm64e_armv7_armv7s/openssl.framework/Headers/bn.h:332:1: error: expected function body after function declarator
- ERROR | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_arm64e_armv7_armv7s/openssl.framework/Headers/bn.h:403:1: error: expected function body after function declarator
- WARN | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_arm64e_armv7_armv7s/openssl.framework/Headers/asn1.h:554:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
- ERROR | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_arm64e_armv7_armv7s/openssl.framework/Headers/asn1.h:554:68: error: expected ';' after top level declarator
- ERROR | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_arm64e_armv7_armv7s/openssl.framework/Headers/ec.h:274:1: error: expected function body after function declarator
- NOTE | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: fatal error: too many errors emitted, stopping now [-ferror-limit=]
- NOTE | [MIHCrypto/SHA] xcodebuild: <PROJECT_DIR>/MIHCrypto/MIHCrypto/SHA/MIHSecureHashAlgorithm512.m:20:9: fatal error: could not build module 'OpenSSL'
- NOTE | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: <PROJECT_DIR>/MIHCrypto/MIHCrypto/Utils/NSData+MIHConversion.m:20:10: fatal error: could not build module 'OpenSSL'
- NOTE | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: note: Using codesigning identity override:
- WARN | [MIHCrypto/RSA] xcodebuild: <PROJECT_DIR>/MIHCrypto/MIHCrypto/RSA/MIHRSAKeyFactory.m:43:60: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
- WARN | [MIHCrypto/EC] xcodebuild: <PROJECT_DIR>/MIHCrypto/MIHCrypto/EC/MIHECPublicKey.m:51:27: warning: passing 'unsigned char **' to parameter of type 'const unsigned char **' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]
- NOTE | [MIHCrypto/EC] xcodebuild: OpenSSL-Universal/Frameworks/OpenSSL.xcframework/macos-arm64_arm64e_x86_64/OpenSSL.framework/Headers/ec.h:1062:61: note: passing argument to parameter 'in' here
- WARN | [MIHCrypto/EC] xcodebuild: <PROJECT_DIR>/MIHCrypto/MIHCrypto/EC/MIHECPublicKey.m:76:50: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
- WARN | [MIHCrypto/EC] xcodebuild: <PROJECT_DIR>/MIHCrypto/MIHCrypto/EC/MIHECPublicKey.m:76:80: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
- WARN | [MIHCrypto/EC] xcodebuild: <PROJECT_DIR>/MIHCrypto/MIHCrypto/EC/MIHECPublicKey.m:98:50: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
- WARN | [MIHCrypto/EC] xcodebuild: <PROJECT_DIR>/MIHCrypto/MIHCrypto/EC/MIHECPrivateKey.m:51:28: warning: passing 'unsigned char **' to parameter of type 'const unsigned char **' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]
- NOTE | [MIHCrypto/EC] xcodebuild: OpenSSL-Universal/Frameworks/OpenSSL.xcframework/macos-arm64_arm64e_x86_64/OpenSSL.framework/Headers/ec.h:1019:62: note: passing argument to parameter 'in' here
- WARN | [MIHCrypto/EC] xcodebuild: <PROJECT_DIR>/MIHCrypto/MIHCrypto/EC/MIHECPrivateKey.m:77:31: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
- WARN | [MIHCrypto/EC] xcodebuild: <PROJECT_DIR>/MIHCrypto/MIHCrypto/EC/MIHECPrivateKey.m:107:51: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
- WARN | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: <PROJECT_DIR>/MIHCrypto/MIHCrypto/Utils/MIHCryptoConfiguration.m:61:5: warning: 'OPENSSL_config' is deprecated [-Wdeprecated-declarations]
- NOTE | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: OpenSSL-Universal/Frameworks/OpenSSL.xcframework/macos-arm64_arm64e_x86_64/OpenSSL.framework/Headers/conf.h:91:1: note: 'OPENSSL_config' has been explicitly marked deprecated here
- NOTE | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: warning: [CP] Unable to find matching .xcframework slice in ' false macos-arm64_arm64e_x86_64/OpenSSL.framework' for the current build architectures (arm64 x86_64).
- NOTE | [MIHCrypto/Core, MIHCrypto/Mathematics, MIHCrypto/AES, and more...] xcodebuild: ld: warning: directory not found for option '-LOpenSSL-Universal/lib-ios'
- NOTE | [MIHCrypto/AES,MIHCrypto/EC] xcodebuild: <PROJECT_DIR>/MIHCrypto/MIHCrypto/Utils/MIHInternal.m:20:10: fatal error: could not build module 'OpenSSL'
- NOTE | [MIHCrypto/RSA] xcodebuild: <PROJECT_DIR>/MIHCrypto/MIHCrypto/RSA/MIHRSAPublicKey.h:18:10: fatal error: could not build module 'OpenSSL'
- NOTE | [iOS] [MIHCrypto/SHA] xcodebuild: <PROJECT_DIR>/MIHCrypto/MIHCrypto/SHA/MIHSecureHashAlgorithm384.m:20:9: fatal error: could not build module 'OpenSSL'
[!] MIHCrypto did not pass validation, due to 20 errors and 11 warnings.
You can use the `--no-clean` option to inspect any issue.
I did run it, but when i created the PR, seems that changes done as a result of the failed test messed something up.. I will look into it..
Great, thank you for your dedication to this upgrade! 🙂
Universal-OpenSSL 1.1.X is a breaking change.. had to do a few adjustments:
This change also fixes listing issue (https://github.com/hohl/MIHCrypto/issues/62), so now lint has no errors..