src/vs/platform/extensionManagement/node/extensionDownloader.ts/ExtensionsDownloader/download
class ExtensionsDownloader:	async download(extension: IGalleryExtension, operation: InstallOperation): Promise<{ readonly location: URI; verified: boolean }> {
		await this.cleanUpPromise;

		const location = joinPath(this.extensionsDownloadDir, this.getName(extension));
		try {
			await this.downloadFile(extension, location, location => this.extensionGalleryService.download(extension, location, operation));
		} catch (error) {
			throw new ExtensionManagementError(error.message, ExtensionManagementErrorCode.Download);
		}

		let verified: boolean = false;
		if (await this.checkForVerification(extension)) {
			const signatureArchiveLocation = await this.downloadSignatureArchive(extension);
			try {
				verified = await this.extensionSignatureVerificationService.verify(location.fsPath, signatureArchiveLocation.fsPath);
				this.logService.info(`Verified extension: ${extension.identifier.id}`, verified);
			} catch (error) {
				await this.delete(signatureArchiveLocation);
				await this.delete(location);
				throw new ExtensionManagementError((error as ExtensionSignatureVerificationError).code, ExtensionManagementErrorCode.Signature);
			}
		}

		return { location, verified };
	}