< Summary - Kestrun — Combined Coverage

Information
Class: Public.Certificate.Get-KrCertificatePurpose
Assembly: Kestrun.PowerShell.Public
File(s): /home/runner/work/Kestrun/Kestrun/src/PowerShell/Kestrun/Public/Certificate/Get-KrCertificatePurpose.ps1
Tag: Kestrun/Kestrun@9d3a582b2d63930269564a7591aa77ef297cadeb
Line coverage
0%
Covered lines: 0
Uncovered lines: 1
Coverable lines: 1
Total lines: 26
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100

Metrics

File(s)

/home/runner/work/Kestrun/Kestrun/src/PowerShell/Kestrun/Public/Certificate/Get-KrCertificatePurpose.ps1

#LineLine coverage
 1<#
 2    .SYNOPSIS
 3        Lists the Enhanced Key Usage values on a certificate.
 4        This function is designed to be used in the context of Kestrun's certificate management.
 5    .DESCRIPTION
 6        Retrieves the Enhanced Key Usage (EKU) OIDs from a given X509Certificate2 object.
 7        The EKU values indicate the intended purposes of the certificate.
 8    .PARAMETER Certificate
 9        The X509Certificate2 object to retrieve the EKU values from.
 10    .EXAMPLE
 11        Get-KrCertificatePurpose -Certificate $cert
 12        This will return the Enhanced Key Usage values for the specified certificate.
 13    .NOTES
 14        This function is part of the Kestrun module.
 15#>
 16function Get-KrCertificatePurpose {
 17    [KestrunRuntimeApi('Everywhere')]
 18    [CmdletBinding()]
 19    [OutputType([System.Collections.Generic.IEnumerable`1[[System.String, System.Private.CoreLib]]])]
 20    param(
 21        [Parameter(Mandatory)]
 22        [System.Security.Cryptography.X509Certificates.X509Certificate2] $Certificate
 23    )
 024    return [Kestrun.Certificates.CertificateManager]::GetPurposes($Certificate)
 25}
 26

Methods/Properties

Get-KrCertificatePurpose()