Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix indent (using Visual Code Formatter) #126

Merged
merged 1 commit into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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