Skip to content

Commit

Permalink
Merge pull request #126 from alagoutte/indent
Browse files Browse the repository at this point in the history
fix indent (using Visual Code Formatter)
  • Loading branch information
alagoutte authored Nov 29, 2021
2 parents db71167 + b327fd6 commit 9d54409
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions PowerArubaSW/Private/SSL.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#
Function Set-ArubaSWuntrustedSSL {

# Hack for allowing untrusted SSL certs with https connections
Add-Type -TypeDefinition @"
# Hack for allowing untrusted SSL certs with https connections
Add-Type -TypeDefinition @"
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class TrustAllCertsPolicy : ICertificatePolicy {
Expand All @@ -18,14 +18,14 @@ Function Set-ArubaSWuntrustedSSL {
}
"@

[System.Net.ServicePointManager]::CertificatePolicy = New-Object -TypeName TrustAllCertsPolicy
[System.Net.ServicePointManager]::CertificatePolicy = New-Object -TypeName TrustAllCertsPolicy

}

Function Set-ArubaSWCipherSSL {

# Hack for allowing TLS 1.1 and TLS 1.2 (by default it is only SSL3 and TLS (1.0))
$AllProtocols = [System.Net.SecurityProtocolType]'Ssl3,Tls,Tls11,Tls12'
[System.Net.ServicePointManager]::SecurityProtocol = $AllProtocols
# Hack for allowing TLS 1.1 and TLS 1.2 (by default it is only SSL3 and TLS (1.0))
$AllProtocols = [System.Net.SecurityProtocolType]'Ssl3,Tls,Tls11,Tls12'
[System.Net.ServicePointManager]::SecurityProtocol = $AllProtocols

}
4 changes: 2 additions & 2 deletions PowerArubaSW/Private/Webrequest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function Invoke-ArubaSWWebRequest() {
[Parameter(Mandatory = $true, position = 1)]
[String]$uri,
[ValidateSet("GET", "POST", "DELETE", "PUT")]
[String]$method="get",
[String]$method = "get",
[Parameter(Mandatory = $false)]
[psobject]$body,
[Parameter(Mandatory = $false)]
Expand All @@ -47,7 +47,7 @@ function Invoke-ArubaSWWebRequest() {
Process {

if ($null -eq $connection ) {
if ($null -eq $DefaultArubaSWConnection){
if ($null -eq $DefaultArubaSWConnection) {
Throw "Not Connected. Connect to the Switch with Connect-ArubaSW"
}
$connection = $DefaultArubaSWConnection
Expand Down

0 comments on commit 9d54409

Please sign in to comment.