File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -137,12 +137,16 @@ public static async Task<bool> NeedsNewCertificateAsync()
137137 ResourceConfiguration resource = await GetResourceConfigurationAsync ( ) ;
138138
139139 IAppServiceCertificate existingCert = resource . ExistingCertificates ?
140- . Where ( c => c . Issuer . Contains ( Constants . DefaultCA ) )
140+ . Where ( c => c . Issuer . Contains ( Constants . DefaultCA ) || c . Issuer . Equals ( Constants . DefaultIntermediate ) )
141141 . OrderByDescending ( c => c . ExpirationDate )
142142 . FirstOrDefault ( ) ;
143-
144- if ( existingCert == null )
143+
144+ if ( existingCert == null )
145+ {
146+ _logger . LogInformation ( " No existing certificate found." ) ;
147+
145148 return true ;
149+ }
146150
147151 TimeSpan timeUntilExpiry = existingCert . ExpirationDate - DateTime . Now ;
148152
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ public class Constants
1111 public const string CertificateBlobContainer = "certificates" ;
1212 public const string DefaultEmailSender = "AzureWebAppSSLManager@dbtek.com.hk" ;
1313 public const string DefaultCA = "Let's Encrypt Authority" ;
14+ public const string DefaultIntermediate = "R3" ;
1415 public const int DefaultBatchSize = 0 ;
1516 public const int DaysBeforeExpiryToRenew = 30 ;
1617 }
You can’t perform that action at this time.
0 commit comments