OpenSSL | iOS

64비트 iOS 디바이스에 OpenSSL을 설치하려면 libcrypto.a 및 libssl.a SSL 라이브러리 파일을 시스템에 복사해야 합니다. iOS OpenSSL .zip을 다운로드하고, 압축을 풀고, \lib 디렉터리에서 .a 파일을 찾으십시오. libcrypto.a 및 libssl.a SSL 라이브러리 파일을 다음 디렉터리에 복사해야 합니다:

 

 

uses 절에 sgcIdSSLOpenSSLHeaders_static(또는 sgcWebSockets 에디션이 Enterprise가 아닌 경우 IdSSLOpenSSLHeaders_static) 유닛을 추가하십시오.

 

파일을 배포해야 하는 경우 RemotePath = StartUp\Documents로 설정하고 파일을 로드하려면 다음을 사용하십시오(uses 절에 System.IOUtils 추가 필요):

 

TPath.GetDocumentsPath + PathDelim + <your filename>

 

openSSL 라이브러리는 iOS에서 Project/Deployment 메뉴를 사용하여 배포해서는 안 됩니다.

 

API 1.1

IdCompilerDefines.inc 를 수정하고 IOS 섹션에서 SGC_OPENSSL_API_1_1을 활성화하십시오:

 

{$IFDEF IOS}

{$DEFINE HAS_getifaddrs}

{$DEFINE USE_OPENSSL}

{$IFDEF CPUARM}

// RLebeau: For iOS devices, OpenSSL cannot be used as an external library,

// it must be statically linked into the app. For the iOS simulator, this

// is not true. Users who want to use OpenSSL in iOS device apps will need

// 정적 OpenSSL 라이브러리를 프로젝트에 추가한 다음

// IdSSLOpenSSLHeaders_static unit in their uses clause. It hooks up the

// IdSSLOpenSSLHeaders 유닛이 사용할 정적으로 링크된 함수...

{$DEFINE STATICLOAD_OPENSSL}

// sgc--> openssl API 1.1에 대해 활성화

{$DEFINE SGC_OPENSSL_API_1_1}

{$ENDIF}

{$ENDIF}

 

계정에서 라이브러리를 다운로드할 수 있습니다.

 

 

API 3.0

IdCompilerDefines.inc 를 수정하고 IOS 섹션에서 SGC_OPENSSL_API_1_1과 SGC_OPENSSL_API_3_0을 활성화하십시오:

 

{$IFDEF IOS}

{$DEFINE HAS_getifaddrs}

{$DEFINE USE_OPENSSL}

{$IFDEF CPUARM}

// RLebeau: For iOS devices, OpenSSL cannot be used as an external library,

// it must be statically linked into the app. For the iOS simulator, this

// is not true. Users who want to use OpenSSL in iOS device apps will need

// 정적 OpenSSL 라이브러리를 프로젝트에 추가한 다음

// IdSSLOpenSSLHeaders_static unit in their uses clause. It hooks up the

// IdSSLOpenSSLHeaders 유닛이 사용할 정적으로 링크된 함수...

{$DEFINE STATICLOAD_OPENSSL}

// sgc--> openssl API 1.1에 대해 활성화

{$DEFINE SGC_OPENSSL_API_1_1}

// sgc--> enable for openssl API 3.0

{$DEFINE SGC_OPENSSL_API_3_0}

{$ENDIF}

{$ENDIF}

 

계정에서 라이브러리를 다운로드할 수 있습니다.