Skip to content

Invoke-RestMethod and Invoke-WebRequest don't support client certificate authentication with certificate files #4544

@Karneades

Description

@Karneades

Invoke-RestMethod and Invoke-WebRequest requires the certificate specified by -Certificate to be imported in the certificate store. Both methods do not allow using certificates from files. This breaks client certificate authentication on non-Windows platforms.

Proposal: Support the use of certificate files for the client authentication by adding a new parameter -CertificateFile or by using the x509 object from Get-PfxCertificate directly.

This was tested on Ubuntu 16.04 with PowerShell 6.0.0-beta.5 and on Windows with PowerShell 5.0.

Ref: #473 and #1865

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-FixedThe issue is fixed.WG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions