BlueECC icon indicating copy to clipboard operation
BlueECC copied to clipboard

Not compiling, OpenSSL linking issue

Open yspreen opened this issue 4 years ago • 5 comments

Building for iOS Simulator, but linking in dylib built for macOS, file '/usr/local/Cellar/[email protected]/1.1.1k/lib/libcrypto.dylib' for architecture x86_64

yspreen avatar Apr 09 '21 18:04 yspreen

That's obviously compiled for simulator. If I instead compile for a physical device, I get different errors:

Undefined symbol: _BN_bin2bn
Undefined symbol: _RSA_set0_key
Undefined symbol: _BIO_s_mem
Undefined symbol: _RSA_set0_crt_params
Undefined symbol: _BIO_read
Undefined symbol: _RSA_set0_factors
Undefined symbol: _PEM_write_bio_PrivateKey
Undefined symbol: _BIO_ctrl
Undefined symbol: _BIO_new
Undefined symbol: _EVP_PKEY_free
Undefined symbol: _RSA_new
Undefined symbol: _EVP_PKEY_assign
Undefined symbol: _PEM_write_bio_PUBKEY
Undefined symbol: _EVP_PKEY_new

yspreen avatar Apr 09 '21 19:04 yspreen

Ah okay, there the warning is again:

Ld: warning: ignoring file /usr/local/Cellar/[email protected]/1.1.1k/lib/libcrypto.dylib, building for iOS-arm64 but attempting to link with file built for macOS-x86_64

yspreen avatar Apr 09 '21 19:04 yspreen

Hi @yspreen, how are you compiling BlueECC? Are you including it in your project via cocoapods or SPM? Also what version of Xcode and macOS are you using?

dannys42 avatar Apr 13 '21 07:04 dannys42

Thanks for the reply @dannys42

I'm running Xcode 12.4 (12D4e), compiling via SPM. My macOS is still on Catalina.

yspreen avatar Apr 13 '21 07:04 yspreen

It seems like the issue is actually with ibm-cloud-security/Swift-JWK-to-PEM

So the question becomes: Is there any way to use JWK public keys for signature validation?

yspreen avatar Apr 13 '21 13:04 yspreen