Skip to content

Commit 520618a

Browse files
committed
Addressed comments.
1 parent b7cad53 commit 520618a

File tree

5 files changed

+26
-24
lines changed

5 files changed

+26
-24
lines changed

src/ResourceManager/Network/Commands.Network/ApplicationGateway/SslCertificate/AzureApplicationGatewaySslCertificateBase.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@ public PSApplicationGatewaySslCertificate NewObject()
4646

4747
sslCertificate.Name = this.Name;
4848
sslCertificate.Data = Convert.ToBase64String(File.ReadAllBytes(this.CertificateFile));
49-
#pragma warning disable 0618
5049
sslCertificate.Password = this.Password;
51-
#pragma warning restore 0618
5250
sslCertificate.Id =
5351
ApplicationGatewayChildResourceHelper.GetResourceNotSetId(
5452
this.NetworkClient.NetworkManagementClient.SubscriptionId,

src/ResourceManager/Network/Commands.Network/ApplicationGateway/SslCertificate/SetAzureApplicationGatewaySslCertificateCommand.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,8 @@ public override void ExecuteCmdlet()
3939
{
4040
throw new ArgumentException("Ssl certificate with the specified name does not exist");
4141
}
42-
43-
#pragma warning disable 0618
44-
X509Certificate2 cert = new X509Certificate2(CertificateFile, Password, X509KeyStorageFlags.Exportable);
45-
#pragma warning restore 0618
42+
43+
X509Certificate2 cert = new X509Certificate2(this.CertificateFile, this.Password, X509KeyStorageFlags.Exportable);
4644

4745
var newSslCertificate = base.NewObject();
4846

src/ResourceManager/Network/documentation/current-breaking-changes.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,4 @@
3838
https://github.com/Azure/azure-powershell/blob/dev/documentation/breaking-changes/breaking-change-template.md
3939
-->
4040

41-
## Current Breaking Changes
42-
43-
The following cmdlets were affected this release:
44-
45-
**(Add/New/Set)-AzureRmApplicationGatewaySslCertificate**
46-
- Changed type of parameter ``-Password`` from ``String`` to ``SecureString``.
47-
48-
```powershell
49-
50-
# Old
51-
(Add/New/Set)-AzureRmApplicationGatewaySslCertificate [other required parameters] -Password "P@ssw0rd"
52-
53-
# New
54-
$password = ConvertTo-SecureString "P@ssw0rd" -AsPlainText -Force
55-
(Add/New/Set)-AzureRmApplicationGatewaySslCertificate [other required parameters] -Password $password
56-
```
41+
## Current Breaking Changes

src/ResourceManager/Network/documentation/upcoming-breaking-changes.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,18 @@
2525
https://github.com/Azure/azure-powershell/blob/dev/documentation/breaking-changes/breaking-change-template.md
2626
-->
2727

28-
# Upcoming Breaking Changes
28+
# Upcoming Breaking Changes
29+
30+
The following cmdlets were affected this release:
31+
32+
**(Get/Set/New)-AzureRmApplicationGatewaySslCertificate**
33+
- Parameter "Password" being replaced in favor of a SecureString
34+
35+
```powershell
36+
37+
# Old
38+
# (Get/Set/New)-AzureRmApplicationGatewaySslCertificate [other required parameters] -Password "plain-text string"
39+
40+
# New
41+
# (Get/Set/New)-AzureRmApplicationGatewaySslCertificate [other required parameters] -Password $SecureStringVariable
42+
```

tools/StaticAnalysis/Exceptions/BreakingChangeIssues.csv

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,4 +680,11 @@
680680
"Microsoft.Azure.Commands.Compute.dll","Microsoft.Azure.Commands.Compute.Automation.NewAzureRmVmssConfigCommand","New-AzureRmVmssConfig","0","2000","The cmdlet 'New-AzureRmVmssConfig' no longer supports the parameter 'RecoveryPolicyMode' and no alias was found for the original parameter name.","Add the parameter 'RecoveryPolicyMode' back to the cmdlet 'New-AzureRmVmssConfig', or add an alias to the original parameter name."
681681
"Microsoft.Azure.Commands.Compute.dll","Microsoft.Azure.Commands.Compute.Automation.NewAzureRmVmssConfigCommand","New-AzureRmVmssConfig","0","2080","The parameter 'AutoOSUpgrade' in parameter set '__AllParameterSets' for cmdlet 'New-AzureRmVmssConfig' no longer has the attribute 'ValueFromPipelineByPropertyName'.","Add the attribute 'ValueFromPipelineByPropertyName' back to parameter 'AutoOSUpgrade' in parameter set '__AllParameterSets'."
682682
"Microsoft.Azure.Commands.Compute.dll","Microsoft.Azure.Commands.Compute.Automation.NewAzureRmVmssConfigCommand","New-AzureRmVmssConfig","0","2100","The parameter 'IdentityType' in cmdlet 'New-AzureRmVmssConfig' is no longer in the parameter set '__AllParameterSets'.","Add parameter 'IdentityType' back to the parameter set '__AllParameterSets'."
683-
"Microsoft.Azure.Commands.Compute.dll","Microsoft.Azure.Commands.Compute.Automation.NewAzureRmVmssConfigCommand","New-AzureRmVmssConfig","0","2100","The parameter 'RecoveryPolicyMode' in cmdlet 'New-AzureRmVmssConfig' is no longer in the parameter set '__AllParameterSets'.","Add parameter 'RecoveryPolicyMode' back to the parameter set '__AllParameterSets'."
683+
"Microsoft.Azure.Commands.Compute.dll","Microsoft.Azure.Commands.Compute.Automation.NewAzureRmVmssConfigCommand","New-AzureRmVmssConfig","0","2100","The parameter 'RecoveryPolicyMode' in cmdlet 'New-AzureRmVmssConfig' is no longer in the parameter set '__AllParameterSets'.","Add parameter 'RecoveryPolicyMode' back to the parameter set '__AllParameterSets'."
684+
"d:\workspace\powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Network\Microsoft.Azure.Commands.Network.dll","Microsoft.Azure.Commands.Network.AddAzureApplicationGatewayHttpListenerCommand","Add-AzureRmApplicationGatewayHttpListener","0","3000","The type of property 'Password' of type 'Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySslCertificate' has changed from 'System.String' to 'System.Security.SecureString'.","Change the type of property 'Password' back to 'System.String'."
685+
"d:\workspace\powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Network\Microsoft.Azure.Commands.Network.dll","Microsoft.Azure.Commands.Network.SetAzureApplicationGatewayHttpListenerCommand","Set-AzureRmApplicationGatewayHttpListener","0","3000","The type of property 'Password' of type 'Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySslCertificate' has changed from 'System.String' to 'System.Security.SecureString'.","Change the type of property 'Password' back to 'System.String'."
686+
"d:\workspace\powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Network\Microsoft.Azure.Commands.Network.dll","Microsoft.Azure.Commands.Network.AddAzureApplicationGatewaySslCertificateCommand","Add-AzureRmApplicationGatewaySslCertificate","0","2020","The cmdlet 'Add-AzureRmApplicationGatewaySslCertificate' no longer supports the type 'System.String' for parameter 'Password'.","Change the type for parameter 'Password' back to 'System.String'."
687+
"d:\workspace\powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Network\Microsoft.Azure.Commands.Network.dll","Microsoft.Azure.Commands.Network.GetAzureApplicationGatewaySslCertificate","Get-AzureRmApplicationGatewaySslCertificate","0","3000","The type of property 'Password' of type 'Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySslCertificate' has changed from 'System.String' to 'System.Security.SecureString'.","Change the type of property 'Password' back to 'System.String'."
688+
"d:\workspace\powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Network\Microsoft.Azure.Commands.Network.dll","Microsoft.Azure.Commands.Network.NewAzureApplicationGatewaySslCertificateCommand","New-AzureRmApplicationGatewaySslCertificate","0","3000","The type of property 'Password' of type 'Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySslCertificate' has changed from 'System.String' to 'System.Security.SecureString'.","Change the type of property 'Password' back to 'System.String'."
689+
"d:\workspace\powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Network\Microsoft.Azure.Commands.Network.dll","Microsoft.Azure.Commands.Network.NewAzureApplicationGatewaySslCertificateCommand","New-AzureRmApplicationGatewaySslCertificate","0","2020","The cmdlet 'New-AzureRmApplicationGatewaySslCertificate' no longer supports the type 'System.String' for parameter 'Password'.","Change the type for parameter 'Password' back to 'System.String'."
690+
"d:\workspace\powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Network\Microsoft.Azure.Commands.Network.dll","Microsoft.Azure.Commands.Network.SetAzureApplicationGatewaySslCertificateCommand","Set-AzureRmApplicationGatewaySslCertificate","0","2020","The cmdlet 'Set-AzureRmApplicationGatewaySslCertificate' no longer supports the type 'System.String' for parameter 'Password'.","Change the type for parameter 'Password' back to 'System.String'."

0 commit comments

Comments
 (0)