File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -635,17 +635,7 @@ function Connect-AZTenant {
635
635
throw " Private key invalid for certificate with thumbprint $ ( $cert.Thumbprint ) ."
636
636
}
637
637
$privKey = $cert.PrivateKey
638
- Write-Debug " private key is type $ ( $privKey.GetType ().FullName) "
639
- if ($privKey -isnot [Security.Cryptography.RSACryptoServiceProvider ]) {
640
- # On non-Windows, the private key ends up being of type RSAOpenSsl
641
- # which for some reason doesn't allow reading of the KeySize attribute
642
- # which then breaks New-Jws's internal validation checks. So we need
643
- # to convert it to an RSACryptoServiceProvider object instead.
644
- Write-Debug " Converting privatekey to RSACryptoServiceProvider"
645
- $keyParams = $privKey.ExportParameters ($true )
646
- $privKey = [Security.Cryptography.RSACryptoServiceProvider ]::new()
647
- $privKey.ImportParameters ($keyParams )
648
- }
638
+ Write-Debug " Private key is type $ ( $privKey.GetType ().FullName) "
649
639
650
640
Write-Verbose " Authenticating with certificate based credential"
651
641
$clientId = [uri ]::EscapeDataString($AZAppUsername )
You can’t perform that action at this time.
0 commit comments