Skip to content

Commit

Permalink
move signature verification to shared process (#232402)
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy081 authored Oct 28, 2024
1 parent 3bfd5dd commit a14300e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
13 changes: 0 additions & 13 deletions src/vs/code/electron-main/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ import { IAuxiliaryWindowsMainService } from '../../platform/auxiliaryWindow/ele
import { AuxiliaryWindowsMainService } from '../../platform/auxiliaryWindow/electron-main/auxiliaryWindowsMainService.js';
import { normalizeNFC } from '../../base/common/normalization.js';
import { ICSSDevelopmentService, CSSDevelopmentService } from '../../platform/cssDev/node/cssDevService.js';
import { ExtensionSignatureVerificationService, IExtensionSignatureVerificationService } from '../../platform/extensionManagement/node/extensionSignatureVerificationService.js';

/**
* The main VS Code application. There will only ever be one instance,
Expand Down Expand Up @@ -1115,11 +1114,6 @@ export class CodeApplication extends Disposable {
// Dev Only: CSS service (for ESM)
services.set(ICSSDevelopmentService, new SyncDescriptor(CSSDevelopmentService, undefined, true));

if (this.productService.quality !== 'stable') {
// extensions signature verification service
services.set(IExtensionSignatureVerificationService, new SyncDescriptor(ExtensionSignatureVerificationService, undefined, true));
}

// Init services that require it
await Promises.settled([
backupMainService.initialize(),
Expand Down Expand Up @@ -1161,13 +1155,6 @@ export class CodeApplication extends Disposable {
mainProcessElectronServer.registerChannel('userDataProfiles', userDataProfilesService);
sharedProcessClient.then(client => client.registerChannel('userDataProfiles', userDataProfilesService));

if (this.productService.quality !== 'stable') {
// Extension signature verification service
const extensionSignatureVerificationService = accessor.get(IExtensionSignatureVerificationService);
sharedProcessClient.then(client => client.registerChannel('signatureVerificationService',
ProxyChannel.fromService(extensionSignatureVerificationService, disposables)));
}

// Update
const updateChannel = new UpdateChannel(accessor.get(IUpdateService));
mainProcessElectronServer.registerChannel('update', updateChannel);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,14 +326,7 @@ class SharedProcessMain extends Disposable implements IClientConnectionFilter {
// Extension Management
services.set(IExtensionsProfileScannerService, new SyncDescriptor(ExtensionsProfileScannerService, undefined, true));
services.set(IExtensionsScannerService, new SyncDescriptor(ExtensionsScannerService, undefined, true));

if (productService.quality === 'stable') {
services.set(IExtensionSignatureVerificationService, new SyncDescriptor(ExtensionSignatureVerificationService, undefined, true));
} else {
// Do extension signature verification in the main process in insiders
services.set(IExtensionSignatureVerificationService, ProxyChannel.toService(mainProcessService.getChannel('signatureVerificationService')));
}

services.set(IExtensionSignatureVerificationService, new SyncDescriptor(ExtensionSignatureVerificationService, undefined, true));
services.set(INativeServerExtensionManagementService, new SyncDescriptor(ExtensionManagementService, undefined, true));

// Extension Gallery
Expand Down

0 comments on commit a14300e

Please sign in to comment.