Title: Set-AuthenticodeSignature does not support https timestamp server · Issue #25130 · PowerShell/PowerShell · GitHub
Open Graph Title: Set-AuthenticodeSignature does not support https timestamp server · Issue #25130 · PowerShell/PowerShell
X Title: Set-AuthenticodeSignature does not support https timestamp server · Issue #25130 · PowerShell/PowerShell
Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerShell 5.1 and PowerShell. Steps to reprodu...
Open Graph Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
X Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/25130
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Set-AuthenticodeSignature does not support https timestamp server","articleBody":"### Prerequisites\n\n- [x] Write a descriptive title.\n- [x] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\n- [x] Search the existing issues.\n- [x] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\n- [x] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\n\n### Steps to reproduce\n\nThe Set-AuthenticodeSignature command allows the use of an http or https timestamp server, however, the internal function (CryptUIWizDigitalSign) it relies on does not support https timestamp server.\nAn internal function in cryptuiwizard!CryptUIWizDigitalSign (MSSIGN32!CHttpTran::Open) will return an _Invalid Parameter_ error if the URL doesn’t start with http. This makes any https URL fail.\nIf you run Set-AuthenticodeSignature with an https timestamp server, the returned status is _The parameter is incorrect_\n\nReproduction steps:\n\n$cert = New-SelfSignedCertificate -KeyUsage DigitalSignature -KeySpec Signature -KeyAlgorithm RSA -KeyLength 2048 -DNSName “www.yourdomain.com” -CertStoreLocation Cert:\\CurrentUser\\My -Type CodeSigningCert -Subject \"CodeSign1\"\n\n$SignatureParams2 = @{\nFilePath = \"test.ps1\"\nCertificate = $cert\nIncludeChain = \"All\"\nTimestampServer = \"https://frc3161.ai.moda/microsoft\"\n}\nSet-AuthenticodeSignature @SignatureParams2\n\n### Expected behavior\n\n```console\nSet-AuthenticodeSignature should not allow an https timestamp server.\n```\n\n### Actual behavior\n\n```console\nSet-AuthenticodeSignature is allowing an https timestamp server and the command fails when calling the internal function CryptUIWizDigitalSign (part of Windows API cryptUI.dll).\n```\n\n### Error details\n\n```console\n$cert = New-SelfSignedCertificate -KeyUsage DigitalSignature -KeySpec Signature -KeyAlgorithm RSA -KeyLength 2048 -DNSName “www.yourdomain.com” -CertStoreLocation Cert:\\CurrentUser\\My -Type CodeSigningCert -Subject \"CodeSign1\"\n\n$SignatureParams2 = @{\nFilePath = \"test.ps1\"\nCertificate = $cert\nIncludeChain = \"All\"\nTimestampServer = \"https://timestamp.fabrikam.com/scripts/timstamper.dll\"\n}\nSet-AuthenticodeSignature @SignatureParams2\n\nOutput:\n\n Directory: C:\\Works\\Cases\\2501280040015507_PowerShellCrash\n\nSignerCertificate Status StatusMessage Path\n----------------- ------ ------------- ----\n UnknownError The parameter is inco… test.ps1\n```\n\n### Environment data\n\n```powershell\nName Value\n---- -----\nPSVersion 7.5.0\nPSEdition Core\nGitCommitId 7.5.0\nOS Microsoft Windows 10.0.22631\nPlatform Win32NT\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}\nPSRemotingProtocolVersion 2.3\nSerializationVersion 1.1.0.1\nWSManStackVersion 3.0\n```\n\n### Visuals\n\nThe following PR needs to be rolled back:\nhttps://github.com/PowerShell/PowerShell/pull/16134","author":{"url":"https://github.com/cemuram","@type":"Person","name":"cemuram"},"datePublished":"2025-03-06T01:19:36Z","url":"https://github.com/PowerShell/PowerShell/issues/25130"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2dc825c9-13a4-be25-5361-0b8fe6fe4576 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AF24:35EE01:6AADDD:9A0179:6AFD8F19 |
| html-safe-nonce | 7cdd1815246961db2055e15bb55fd15ea56b7cb65f1621289914caf29df91ed1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRjI0OjM1RUUwMTo2QUFEREQ6OUEwMTc5OjZBRkQ4RjE5IiwidmlzaXRvcl9pZCI6IjE5OTA1NTM2Nzk0NjcyMjA3NjEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 0cbdd904ad20848f430777fc36e46842dc0c6502486d4c1f4c22b4f7a725c82c |
| hovercard-subject-tag | issue:2899028804 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/25130/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2febe750d986a7699791d74b1191cef84e59ea188abd95988c50752974d52fef/PowerShell/PowerShell/issues/25130 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2febe750d986a7699791d74b1191cef84e59ea188abd95988c50752974d52fef/PowerShell/PowerShell/issues/25130 |
| og:image:alt | Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cemuram |
| hostname | github.com |
| expected-hostname | github.com |
| None | bc86424ef34a73b386237872800e922d149d65ba907f63d6f150a2dcb8433bea |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 927a6c5ab1c32b38830f1b9d3050c0b9e9aa92e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width