Skip to content

Commit 276245b

Browse files
Resource manager dll reference
1 parent 832c40d commit 276245b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/ResourceManager/Automation/Commands.Automation/Commands.ResourceManagement.Automation.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
</Reference>
7474
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7575
<SpecificVersion>False</SpecificVersion>
76-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll</HintPath>
76+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll</HintPath>
7777
</Reference>
7878
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory">
7979
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.14.201151115\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll</HintPath>

src/ServiceManagement/Automation/Commands.Automation/Common/AutomationClient.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,7 +1108,7 @@ public CertificateInfo CreateCertificate(string automationAccountName, string na
11081108
public CertificateInfo UpdateCertificate(string automationAccountName, string name, string path, SecureString password,
11091109
string description, bool? exportable)
11101110
{
1111-
if (String.IsNullOrWhiteSpace(path) && password != null && exportable.HasValue)
1111+
if (String.IsNullOrWhiteSpace(path) && (password != null || exportable.HasValue))
11121112
{
11131113
throw new ResourceCommonException(typeof(CertificateInfo),
11141114
string.Format(CultureInfo.CurrentCulture, Resources.SetCertificateInvalidArgs, name));
@@ -1634,8 +1634,8 @@ private Certificate CreateCertificateInternal(string automationAccountName, stri
16341634
SecureString password, string description, bool exportable)
16351635
{
16361636
var cert = (password == null)
1637-
? new X509Certificate2(path)
1638-
: new X509Certificate2(path, password);
1637+
? new X509Certificate2(path, String.Empty, X509KeyStorageFlags.Exportable | X509KeyStorageFlags.PersistKeySet | X509KeyStorageFlags.MachineKeySet)
1638+
: new X509Certificate2(path, password, X509KeyStorageFlags.Exportable | X509KeyStorageFlags.PersistKeySet | X509KeyStorageFlags.MachineKeySet);
16391639

16401640
var ccprop = new CertificateCreateProperties()
16411641
{

0 commit comments

Comments
 (0)