Skip to content

Commit

Permalink
Enable system certificates v2 by default (#185098)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrmarti committed Jul 20, 2023
1 parent 6f21bd8 commit e87dc37
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/vs/workbench/api/node/proxyResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import { ILogService } from 'vs/platform/log/common/log';
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
import { LogLevel, createHttpPatch, createProxyResolver, createTlsPatch, ProxySupportSetting, ProxyAgentParams, createNetPatch } from '@vscode/proxy-agent';

const systemCertificatesV2Default = true;

export function connectProxyResolver(
extHostWorkspace: IExtHostWorkspaceProvider,
configProvider: ExtHostConfigProvider,
Expand Down Expand Up @@ -74,12 +76,12 @@ function createPatchedModules(params: ProxyAgentParams, resolveProxy: ReturnType

function certSettingV1(configProvider: ExtHostConfigProvider) {
const http = configProvider.getConfiguration('http');
return !http.get<boolean>('experimental.systemCertificatesV2') && !!http.get<boolean>('systemCertificates');
return !http.get<boolean>('experimental.systemCertificatesV2', systemCertificatesV2Default) && !!http.get<boolean>('systemCertificates');
}

function certSettingV2(configProvider: ExtHostConfigProvider) {
const http = configProvider.getConfiguration('http');
return !!http.get<boolean>('experimental.systemCertificatesV2') && !!http.get<boolean>('systemCertificates');
return !!http.get<boolean>('experimental.systemCertificatesV2', systemCertificatesV2Default) && !!http.get<boolean>('systemCertificates');
}

const modulesCache = new Map<IExtensionDescription | undefined, { http?: typeof http; https?: typeof https }>();
Expand Down

0 comments on commit e87dc37

Please sign in to comment.