Проблема с закреплением SSL IONIC 4 только в iOSIOS

Программируем под IOS
Ответить Пред. темаСлед. тема
Гость
 Проблема с закреплением SSL IONIC 4 только в iOS

Сообщение Гость »


I'm currently using ionic-native-http and cordova-plugin-advanced-http for SSL Pinning in my Ionic 4 project.

For SSL Certificate, I'm using the certificate in Google.com

For the platform Android everything works as expected.

On the other hand in iOS the code throws an error in runtime and does not work as expected.

The error:

NSLocalizedDescription=The certificate for this server is invalid. You might be connecting to a server that is pretending to be “www.google.com.tr” which could put your confidential information at risk. Here is my certificate folder location. The top certificate is the result of build operation in ionic:


Изображение


For testing ssl pinning in my app.component.ts file here is the code block that throws and error:

this.http .setSSLCertMode("pinned") .then((response) => { console.log("SSL Pinning - Aktif GÖrünüyor"); }) .catch(() => { console.log("SSL Pinning - Başarısız"); }); this.http .get("https://www.google.com/", {}, {}) .catch((error) => { const showMaintenanceMessage = this.modalController.create( Maintenance, { message: "Sertifikanız Doğrulanamadı", }, { showBackdrop: false, enableBackdropDismiss: false, } ); showMaintenanceMessage.present(); this.platform.exitApp(); }); // SSL PINNING END // I stuck at the step for a month and eager to find a solution with respect to lack of library assistance.

Thanks in advance.


Источник: https://stackoverflow.com/questions/781 ... nly-in-ios
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «IOS»