dotnet / dotnet/sign

PowerShell: .xaml file extension not supported

Open
#778 0 comments 0 reactions 0 assignees View on GitHub
area-powershell bug Priority:3
Dominant language
C#
Stars
581
Forks
116
Avg merge
1d 2h
Merged PRs (30d)
8

Description

**Describe the bug**
Sign CLI does not support signing PowerShell XAML files. [This](https://github.com/PowerShell/PowerShell/blob/2f4f585e7fe075f5c1669397ae738c554fa18391/src/System.Management.Automation/security/SecurityManager.cs#L97-L106) shows the file extensions for which PowerShell verifies signatures. Attempting to sign a simple XAML file results in HRESULT 0x800b0003 (`TRUST_E_SUBJECT_FORM_UNKNOWN`), which indicates that the form of the subject is not recognized. In this context, it's because the file format is not supported.

**Repro steps**

1. Add `.xaml` to `AzureSignToolSigner`'s supported file extensions.
1. Save the following content to file user-interface.xaml.

```xaml





```

1. Try to sign the file.

**Expected behavior**
Signing succeeds.

**Actual behavior**
Signing fails.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.