Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: iOS OpenSSL



Permlink Replies: 3 - Last Post: Dec 2, 2016 4:23 AM Last Post By: Dagmara Niedzwi... Threads: [ Previous | Next ]
Dagmara Niedzwi...

Posts: 13
Registered: 11/15/15
iOS OpenSSL
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 30, 2016 8:30 AM
Hi All

Currently I'm using Berlin Update 2. I try to call webservice from ipad 32bit by HTTPRIO. I find out that I must include the required libraries: libcrypto.a and libssl.a. Where can I find these? I downloaded example from google but these do not work.
I copied libraries to C:\Program Files (x86)\Embarcadero\Studio\18.0\lib\iosDevice32\release and C:\Program Files (x86)\Embarcadero\Studio\18.0\lib\iosDevice32\debug folders. I changed 'Link with SSL and Crypto' to true in C++ Linker. I added

#if defined(TARGET_OS_IPHONE) and defined(CPUARM)
#include <IdSSLOpenSSLHeaders_Static.hpp>
#endif

to my code but still getting error:
"First chance exception at $000E89B8. Exception class Bad system call (12)."
Maybe I am doing something wrong. Any ideas?

Dagmara

Edited by: Dagmara Niedzwiecka on Dec 1, 2016 7:27 AM
Dagmara Niedzwi...

Posts: 13
Registered: 11/15/15
Re: iOS OpenSSL
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 1, 2016 8:30 AM   in response to: Dagmara Niedzwi... in response to: Dagmara Niedzwi...
It is working now. I made a stupid mistake. Included code should be without 'and defined(CPUARM)' (which is for delhpi):

#if defined(TARGET_OS_IPHONE)
#include <IdSSLOpenSSLHeaders_Static.hpp>
#endif

Dagmara Niedzwiecka wrote:
Hi All

Currently I'm using Berlin Update 2. I try to call webservice from ipad 32bit by HTTPRIO. I find out that I must include the required libraries: libcrypto.a and libssl.a. Where can I find these? I downloaded example from google but these do not work.
I copied libraries to C:\Program Files (x86)\Embarcadero\Studio\18.0\lib\iosDevice32\release and C:\Program Files (x86)\Embarcadero\Studio\18.0\lib\iosDevice32\debug folders. I changed 'Link with SSL and Crypto' to true in C++ Linker. I added

#if defined(TARGET_OS_IPHONE) and defined(CPUARM)
#include <IdSSLOpenSSLHeaders_Static.hpp>
#endif

to my code but still getting error:
"First chance exception at $000E89B8. Exception class Bad system call (12)."
Maybe I am doing something wrong. Any ideas?

Dagmara

Edited by: Dagmara Niedzwiecka on Dec 1, 2016 7:27 AM
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: iOS OpenSSL
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 1, 2016 10:51 AM   in response to: Dagmara Niedzwi... in response to: Dagmara Niedzwi...
Dagmara wrote:

It is working now. I made a stupid mistake. Included code should
be without 'and defined(CPUARM)' (which is for delhpi):

#if defined(TARGET_OS_IPHONE)
#include <IdSSLOpenSSLHeaders_Static.hpp>
#endif

Actually, the check for ARM should not be omitted, because the static-link
logic only works on iOS devices, not in the iOS Simulator (which uses x86
instead of ARM). Try this:

#if defined(TARGET_OS_IPHONE) && (defined(__arm__) || defined(__arm64__))
#include <IdSSLOpenSSLHeaders_Static.hpp>
#endif


--
Remy Lebeau (TeamB)
Dagmara Niedzwi...

Posts: 13
Registered: 11/15/15
Re: iOS OpenSSL
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 2, 2016 4:23 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
You are right! Thank you

Remy Lebeau (TeamB) wrote:
Actually, the check for ARM should not be omitted, because the static-link
logic only works on iOS devices, not in the iOS Simulator (which uses x86
instead of ARM). Try this:

#if defined(TARGET_OS_IPHONE) && (defined(__arm__) || defined(__arm64__))
#include <IdSSLOpenSSLHeaders_Static.hpp>
#endif


--
Remy Lebeau (TeamB)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02