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)