Open planetscripton opened 5 years ago
Does not work for me on Powershell 6.2.2 on MacOS also. Here is trace:
Add-SessionTrustedCertificate -FilePath ./myca.crt -Domain mydomain.com
Exception calling "Import" with "1" argument(s): "X509Certificate is immutable on this platform. Use the equivalent constructor instead."
At /Users/wasa/.local/share/powershell/Modules/TunableSSLValidator/1.1.0/TunableSSLValidator.psm1:128 char:21
+ $Certificate.import( (Convert-Path $FilePath) )
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : PlatformNotSupportedException
Exception calling "GetCertHashString" with "0" argument(s): "m_safeCertContext is an invalid handle."
At /Users/wasa/.local/share/powershell/Modules/TunableSSLValidator/1.1.0/TunableSSLValidator.psm1:134 char:17
+ $Hash = $Certificate.GetCertHashString()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : CryptographicException
Does this module support PowerShell Core? It doesn't appear to be working for me on PowerShell 6.2.1 on MacOS.