| 64 | |
| 65 | == OpenSSL == |
| 66 | |
| 67 | Follow the instructions below to enable TLS transport by using OpenSSL: |
| 68 | 1. Build and install OpenSSL-0.9.8o for iPhone by following [http://www.x2on.de/2010/02/01/tutorial-iphone-app-with-compiled-openssl-library/ these instructions]. |
| 69 | 1. Specify OpenSSL location when running {{{configure-iphone}}}, for example (with Bash): |
| 70 | {{{ |
| 71 | export OPENSSL=/Users/you/openssl/openssl_arm |
| 72 | export CFLAGS="-O2 -Wno-unused-label -I${OPENSSL}/include" |
| 73 | export LDFLAGS="-L${OPENSSL}/lib" |
| 74 | ./configure-iphone |
| 75 | }}} |
| 76 | And check that OpenSSL is detected by the configure script: |
| 77 | {{{ |
| 78 | ... |
| 79 | checking for OpenSSL installations.. |
| 80 | checking openssl/ssl.h usability... yes |
| 81 | checking openssl/ssl.h presence... no |
| 82 | aconfigure: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor! |
| 83 | aconfigure: WARNING: openssl/ssl.h: proceeding with the compiler's result |
| 84 | checking for openssl/ssl.h... yes |
| 85 | checking for ERR_load_BIO_strings in -lcrypto... yes |
| 86 | checking for SSL_library_init in -lssl... yes |
| 87 | OpenSSL library found, SSL support enabled |
| 88 | ... |
| 89 | }}} |
| 90 | 1. Build the libraries: |
| 91 | {{{ |
| 92 | make dep && make |
| 93 | }}} |
| 94 | 1. In XCode project setting of your application (for example, ipjsua), add {{{libssl.a}}} and {{{libcrypto.a}}} from OpenSSL ARM directory to the project's Libraries: |
| 95 | a. In '''Group & Files''' pane, expand '''ipjsua''', then right click '''Libraries''', and select '''Add -> Existing Files...'''. |
| 96 | a. Find {{{libssl.a}}} and {{{libcrypto.a}}} from OpenSSL ARM directory (for example, {{{/Users/you/openssl/openssl_arm}}}) |
| 97 | 1. Build the app |
| 98 | |