From e1a490357dd3436162c4cf9ee9a782a831547840 Mon Sep 17 00:00:00 2001 From: "Keith D. Moore" Date: Thu, 14 Feb 2019 02:46:07 -0600 Subject: [PATCH] fix(http): add 'legacy' as valid option to setSSLCertMode (#2913) * Add 'legacy' as valid option to setSSLCertMode Fixes #2912 * Add 'legacy' to params for setSSLCertMode * Update index.ts --- src/@ionic-native/plugins/http/index.ts | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/src/@ionic-native/plugins/http/index.ts b/src/@ionic-native/plugins/http/index.ts index 60af2b2b90..3b9282bf57 100644 --- a/src/@ionic-native/plugins/http/index.ts +++ b/src/@ionic-native/plugins/http/index.ts @@ -77,10 +77,7 @@ export class HTTP extends IonicNativePlugin { * @returns {Object} an object representing a basic HTTP Authorization header of the form {'Authorization': 'Basic base64EncodedUsernameAndPassword'} */ @Cordova({ sync: true }) - getBasicAuthHeader( - username: string, - password: string - ): { Authorization: string } { + getBasicAuthHeader(username: string, password: string): { Authorization: string } { return; } @@ -177,13 +174,14 @@ export class HTTP extends IonicNativePlugin { /** * Set SSL Cert handling mode, being one of the following values * default: default SSL cert handling using system's CA certs + * legacy: use legacy default behavior (< 2.0.3), excluding user installed CA certs (only for Android) * nocheck: disable SSL cert checking, trusting all certs (meant to be used only for testing purposes) * pinned: trust only provided certs * @see https://github.com/silkimen/cordova-plugin-advanced-http#setsslcertmode - * @param {'default' | 'nocheck' | 'pinned'} mode SSL Cert handling mode + * @param {'default' | 'legacy' | 'nocheck' | 'pinned'} mode SSL Cert handling mode */ @Cordova() - setSSLCertMode(mode: 'default' | 'nocheck' | 'pinned'): Promise { + setSSLCertMode(mode: 'default' | 'legacy' | 'nocheck' | 'pinned'): Promise { return; } @@ -279,13 +277,7 @@ export class HTTP extends IonicNativePlugin { * @returns {Promise} returns a FileEntry promise that resolve on success, and reject on failure */ @Cordova() - uploadFile( - url: string, - body: any, - headers: any, - filePath: string, - name: string - ): Promise { + uploadFile(url: string, body: any, headers: any, filePath: string, name: string): Promise { return; } @@ -298,12 +290,7 @@ export class HTTP extends IonicNativePlugin { * @returns {Promise} returns a FileEntry promise that resolve on success, and reject on failure */ @Cordova() - downloadFile( - url: string, - body: any, - headers: any, - filePath: string - ): Promise { + downloadFile(url: string, body: any, headers: any, filePath: string): Promise { return; } }