Titanium JIRA Archive
Appcelerator Modules (MOD)

[MOD-2389] iOS: HTTPS Module: https.createX509CertificatePinningSecurityManager is not a function

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 2.1.1
Fix Version/sn/a
ComponentsHttps
Labelsn/a
ReporterVictor Vazquez Montero
AssigneeUnknown
Created2018-01-22T20:57:09.000+0000
Updated2018-03-06T18:52:32.000+0000

Description

Description:

Using the 2.1.1 Library for iOS and in some times (Not all the time) when doing a request to the Backend the SSL-Pinning fails saying that the https.createX509CertificatePinningSecurityManager is not a function (Pic Attached) even when using the same function

Code:

if (OS_IOS || OS_ANDROID) { 
var https = require('appcelerator.https'); 

var securityManager = https.createX509CertificatePinningSecurityManager( 
[{ 
url: Alloy.Globals.baseUrl, 
serverCertificate: Alloy.Globals.serverCertificate 
}]); 
} 

Additional information

Request works well when on SDK 6.3.0 but in SDK 7.0.1 there is an error. We have tried to recreate this on our end but unable to get the same error. So the customer has attached a video of the error occurring.

Attachments

FileDateSize
ErrorLog.png2018-01-22T20:55:54.000+0000498714
Pinning2.mov2018-01-22T20:55:49.000+00007948441

Comments

  1. Hans Knöchel 2018-01-22

    It looks like the https instance is required when the backend-call is done? I could think of an issue where the scope gets lost when not require-ing the module in the top of the controller but inside a method. I don't think we will be able to reproduce this with the above code, so we would definitely need a full reproducible case or otherwise advice to check how the module is required. Also, I cannot see how the SDK version could influence this behavior but we will check related code-changes between those versions.

JSON Source