Skip to content

Commit c665261

Browse files
committed
Fixed reading certificates
1 parent 78c4797 commit c665261

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/StorageGRID-Webscale.psm1

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14343,7 +14343,7 @@ function Global:Update-SgwManagementCertificate {
1434314343
Position = 4,
1434414344
ValueFromPipelineByPropertyName = $True,
1434514345
ParameterSetName = "Path",
14346-
HelpMessage = "Path to intermediate CA certificate bundle in concatenated PEM-encoding; omit or null when there is no intermediate CA.")][Alias("FullChainFile")][String]$CaBundlePath,
14346+
HelpMessage = "Path to intermediate CA certificate bundle in concatenated PEM-encoding; omit or null when there is no intermediate CA.")][Alias("ChainFile")][String]$CaBundlePath,
1434714347
[parameter(Mandatory = $False,
1434814348
Position = 5,
1434914349
ValueFromPipelineByPropertyName = $True,
@@ -14386,7 +14386,7 @@ function Global:Update-SgwManagementCertificate {
1438614386

1438714387
if ($ServerCertificatePath) {
1438814388
if ([System.IO.FileInfo]::new($ServerCertificatePath).Exists) {
14389-
$ServerCertificate = Get-Content -Path $ServerCertificatePath
14389+
$ServerCertificate = Get-Content -Path $ServerCertificatePath -Raw
1439014390
}
1439114391
else {
1439214392
throw "Server certificate not found in $ServerCertificatePath"
@@ -14395,7 +14395,7 @@ function Global:Update-SgwManagementCertificate {
1439514395

1439614396
if ($CaBundlePath) {
1439714397
if ([System.IO.FileInfo]::new($CaBundlePath).Exists) {
14398-
$CaBundle = Get-Content -Path $CaBundlePath
14398+
$CaBundle = Get-Content -Path $CaBundlePath -Raw
1439914399
}
1440014400
else {
1440114401
throw "CA Bundle not found in $CaBundlePath"
@@ -14404,7 +14404,7 @@ function Global:Update-SgwManagementCertificate {
1440414404

1440514405
if ($PrivateKeyPath) {
1440614406
if ([System.IO.FileInfo]::new($PrivateKeyPath).Exists) {
14407-
$PrivateKey = Get-Content -Path $PrivateKeyPath
14407+
$PrivateKey = Get-Content -Path $PrivateKeyPath -Raw
1440814408
}
1440914409
else {
1441014410
throw "Private key not found in $PrivateKeyPath"
@@ -14549,7 +14549,7 @@ function Global:Update-SgwObjectCertificate {
1454914549
Position = 4,
1455014550
ValueFromPipelineByPropertyName = $True,
1455114551
ParameterSetName = "Path",
14552-
HelpMessage = "Path to intermediate CA certificate bundle in concatenated PEM-encoding; omit or null when there is no intermediate CA.")][Alias("FullChainFile")][String]$CaBundlePath,
14552+
HelpMessage = "Path to intermediate CA certificate bundle in concatenated PEM-encoding; omit or null when there is no intermediate CA.")][Alias("ChainFile")][String]$CaBundlePath,
1455314553
[parameter(Mandatory = $False,
1455414554
Position = 5,
1455514555
ValueFromPipelineByPropertyName = $True,
@@ -14592,7 +14592,7 @@ function Global:Update-SgwObjectCertificate {
1459214592

1459314593
if ($ServerCertificatePath) {
1459414594
if ([System.IO.FileInfo]::new($ServerCertificatePath).Exists) {
14595-
$ServerCertificate = Get-Content -Path $ServerCertificatePath
14595+
$ServerCertificate = Get-Content -Path $ServerCertificatePath -Raw
1459614596
}
1459714597
else {
1459814598
throw "Server certificate not found in $ServerCertificatePath"
@@ -14601,7 +14601,7 @@ function Global:Update-SgwObjectCertificate {
1460114601

1460214602
if ($CaBundlePath) {
1460314603
if ([System.IO.FileInfo]::new($CaBundlePath).Exists) {
14604-
$CaBundle = Get-Content -Path $CaBundlePath
14604+
$CaBundle = Get-Content -Path $CaBundlePath -Raw
1460514605
}
1460614606
else {
1460714607
throw "CA Bundle not found in $CaBundlePath"
@@ -14610,7 +14610,7 @@ function Global:Update-SgwObjectCertificate {
1461014610

1461114611
if ($PrivateKeyPath) {
1461214612
if ([System.IO.FileInfo]::new($PrivateKeyPath).Exists) {
14613-
$PrivateKey = Get-Content -Path $PrivateKeyPath
14613+
$PrivateKey = Get-Content -Path $PrivateKeyPath -Raw
1461414614
}
1461514615
else {
1461614616
throw "Private key not found in $PrivateKeyPath"

0 commit comments

Comments
 (0)