Skip to content

Commit 7600b19

Browse files
committed
Formatting fixes.
1 parent 1524a72 commit 7600b19

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

agent/src/ios/pinning.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -448,15 +448,17 @@ export namespace sslpinning {
448448
// SSL_CTX_set_custom_verify
449449
const sSLCtxSetCustomVerify = (ident: string): InvocationListener => {
450450
const getPskIdentity = libObjc.SSL_get_psk_identity;
451-
var setCustomVerify = libObjc.SSL_set_custom_verify;
451+
let setCustomVerify = libObjc.SSL_set_custom_verify;
452452
if (setCustomVerify.isNull()) {
453-
setCustomVerify = libObjc.SSL_CTX_set_custom_verify;
453+
send(c.blackBright(`SSL_set_custom_verify not found, trying SSL_CTX_set_custom_verify`));
454+
setCustomVerify = libObjc.SSL_CTX_set_custom_verify;
454455
}
455456

456457
if (setCustomVerify.isNull() || getPskIdentity.isNull()) {
457458
return null;
458459
}
459460

461+
// tslint:disable-next-line:only-arrow-functions variable-name
460462
const customVerifyCallback = new NativeCallback(function(ssl, out_alert) {
461463
qsend(quiet,
462464
c.blackBright(`[${ident}] `) + `Called ` +
@@ -466,6 +468,7 @@ export namespace sslpinning {
466468
return 0;
467469
}, "int", ["pointer", "pointer"]);
468470

471+
// tslint:disable-next-line:only-arrow-functions
469472
Interceptor.replace(setCustomVerify, new NativeCallback(function(ssl, mode, callback) {
470473
qsend(quiet,
471474
c.blackBright(`[${ident}] `) + `Called ` +
@@ -475,6 +478,7 @@ export namespace sslpinning {
475478
setCustomVerify(ssl, mode, customVerifyCallback);
476479
}, "void", ["pointer", "int", "pointer"]));
477480

481+
// tslint:disable-next-line:only-arrow-functions
478482
Interceptor.replace(getPskIdentity, new NativeCallback(function(ssl) {
479483
qsend(quiet,
480484
c.blackBright(`[${ident}] `) + `Called ` +

0 commit comments

Comments
 (0)