From f70d2438ef4a2dfad02e66f2a74cb01b94ae48ce Mon Sep 17 00:00:00 2001 From: Youri970410 <62531040+Youri970410@users.noreply.github.com> Date: Tue, 2 Mar 2021 09:37:20 +0800 Subject: [PATCH] Fix issue for PVS-Stduio (#14369) --- src/KeyVault/KeyVault/Models/PSKeyVaultCertificatePolicy.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/KeyVault/KeyVault/Models/PSKeyVaultCertificatePolicy.cs b/src/KeyVault/KeyVault/Models/PSKeyVaultCertificatePolicy.cs index a778824eced7..f60b386f875b 100644 --- a/src/KeyVault/KeyVault/Models/PSKeyVaultCertificatePolicy.cs +++ b/src/KeyVault/KeyVault/Models/PSKeyVaultCertificatePolicy.cs @@ -173,7 +173,7 @@ internal CertificatePolicy ToCertificatePolicy() if (!string.IsNullOrWhiteSpace(SubjectName) || DnsNames != null || Ekus != null || - KeyUsage != null | + KeyUsage != null || ValidityInMonths.HasValue) { var x509CertificateProperties = new X509CertificateProperties @@ -188,7 +188,7 @@ internal CertificatePolicy ToCertificatePolicy() if (Ekus != null) { - x509CertificateProperties.Ekus = Ekus == null ? null : new List(Ekus); + x509CertificateProperties.Ekus = new List(Ekus); } if (DnsNames != null)