Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Allow unsigned source for development testing#5790

Open
dkbennett wants to merge 2 commits intomicrosoft:master from
dkbennett:unsigneddevsource
Open

Allow unsigned source for development testing #5790
dkbennett wants to merge 2 commits intomicrosoft:master from
dkbennett:unsigneddevsource

Conversation

@dkbennett
Copy link
Member

@dkbennett dkbennett commented Oct 9, 2025
edited by microsoft-github-policy-service bot
Loading

This formalizes a workaround I have been using for testing an unsigned Pre-Indexed Package Source. It would be convenient to have this in the code so I don't have to constantly stash/unstash the changes when moving around branches.

This works only when test hooks are enabled (i.e. a debug build) AND you set the preprocessor directive "AICLI_ALLOW_UNSIGNED_SOURCE"

The easy way to set this up is to add CL=/DAICLI_ALLOW_UNSIGNED_SOURCE to your Environment variables and restart visual studio.

I've noticed Visual Studio will not recognize the directive is set, but the compiler will set it when it builds and it will work. I did not make these const due to a web of compiler warnings and errors when a const value is specified first in an if statement.


Microsoft Reviewers: Open in CodeFlow

EmperorArthur reacted with thumbs up emoji

This comment has been minimized.

{
// To use an unsigned source, set AICLI_ALLOW_UNSIGNED_SOURCE and use a debug build.
// Ex: set CL=/DAICLI_ALLOW_UNSIGNED_SOURCE
#if ! defined( AICLI_DISABLE_TEST_HOOKS ) && defined( AICLI_ALLOW_UNSIGNED_SOURCE )
Copy link
Member

@JohnMcPMS JohnMcPMS Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would rather see this hardened more to prevent what feels like potential for accidental disabling of the security.

I would do that by creating a function on the base class for use in calling ValidateTrustInfo. Then create a derived type from the Desktop version that overrides that virtual with the one that doesn't check (and can do that easily from preprocessor instead of a global bool).

I would also create a separate semantic for using the Desktop version all the time, mostly because we might consider allowing that as choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@JohnMcPMS JohnMcPMS JohnMcPMS left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /