OpenSSL | iOS

Para instalar OpenSSL en un dispositivo iOS de 64 bits, debe copiar los archivos de biblioteca SSL libcrypto.a y libssl.a en su sistema. Descargue el .zip de OpenSSL para iOS, extráigalo y localice los archivos .a en el directorio \lib. Debe copiar los archivos de biblioteca SSL libcrypto.a y libssl.a en estos directorios:

 

 

Añada la unidad sgcIdSSLOpenSSLHeaders_static (o IdSSLOpenSSLHeaders_static si su edición de sgcWebSockets no es Enterprise) a su cláusula uses.

 

Si necesita desplegar algún archivo, puede establecer RemotePath = StartUp\Documents y para cargar el archivo use (requiere agregar System.IOUtils a la cláusula uses):

 

TPath.GetDocumentsPath + PathDelim + <su nombre de archivo>

 

Las bibliotecas openSSL no deben desplegarse mediante el menú Proyecto/Despliegue en iOS.

 

API 1.1

Modifique IdCompilerDefines.inc y habilite SGC_OPENSSL_API_1_1 en la sección IOS:

 

{$IFDEF IOS}

{$DEFINE HAS_getifaddrs}

{$DEFINE USE_OPENSSL}

{$IFDEF CPUARM}

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

// debe estar enlazado estáticamente en la aplicación. Para el simulador de iOS, esto

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

// to add the static OpenSSL library to the project and then include the

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

// statically linked functions for the IdSSLOpenSSLHeaders unit to use...

{$DEFINE STATICLOAD_OPENSSL}

// sgc--> enable for openssl API 1.1

{$DEFINE SGC_OPENSSL_API_1_1}

{$ENDIF}

{$ENDIF}

 

Puede descargar las bibliotecas desde su cuenta.

 

 

API 3.0

Modifique IdCompilerDefines.inc y habilite SGC_OPENSSL_API_1_1 y SGC_OPENSSL_API_3_0 en la sección IOS:

 

{$IFDEF IOS}

{$DEFINE HAS_getifaddrs}

{$DEFINE USE_OPENSSL}

{$IFDEF CPUARM}

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

// debe estar enlazado estáticamente en la aplicación. Para el simulador de iOS, esto

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

// to add the static OpenSSL library to the project and then include the

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

// statically linked functions for the IdSSLOpenSSLHeaders unit to use...

{$DEFINE STATICLOAD_OPENSSL}

// sgc--> enable for openssl API 1.1

{$DEFINE SGC_OPENSSL_API_1_1}

// sgc--> habilitar para openssl API 3.0

{$DEFINE SGC_OPENSSL_API_3_0}

{$ENDIF}

{$ENDIF}

 

Puede descargar las bibliotecas desde su cuenta.