@@ -19,8 +19,9 @@ public class CAEnrollmentProcessor {
1919 private readonly string _caName ;
2020 private readonly ILogger _logger ;
2121
22- private const SslProtocols CaEnrollmentSslProtocols =
23- SslProtocols . Ssl3 | SslProtocols . Tls | SslProtocols . Tls11 | SslProtocols . Tls12 ;
22+ // TLS1.3 is not available in .Net Framework 4.7.2, but the enum can still be assigned.
23+ private const SslProtocols CaEnrollmentSslProtocols =
24+ SslProtocols . Ssl3 | SslProtocols . Tls | SslProtocols . Tls11 | SslProtocols . Tls12 | ( SslProtocols ) 12288 ;
2425
2526 public CAEnrollmentProcessor ( string caDnsHostname , string caName , ILogger log = null ) {
2627 _caDnsHostname = caDnsHostname ;
@@ -46,7 +47,7 @@ await Task.WhenAll(
4647 } catch ( Exception ex ) {
4748 _logger . LogError ( ex , "An error occurred while scanning enrollment endpoints" ) ;
4849 }
49-
50+
5051 endpoints = TagEndpoints ( endpoints ) . ToList ( ) ;
5152
5253 return endpoints ;
@@ -57,7 +58,7 @@ private IEnumerable<APIResult<CAEnrollmentEndpoint>> TagEndpoints(IEnumerable<AP
5758 foreach ( var endpoint in tagEndpoints ) {
5859 if ( ! endpoint . Collected )
5960 continue ;
60-
61+
6162 var enrollmentEndpoint = endpoint . Result ;
6263 if ( enrollmentEndpoint . Url . Scheme != Uri . UriSchemeHttps ) {
6364 switch ( enrollmentEndpoint . Status ) {
@@ -226,4 +227,4 @@ private async Task<APIResult<CAEnrollmentEndpoint>> GetNtlmEndpoint(Uri url, boo
226227 }
227228 }
228229 }
229- }
230+ }
0 commit comments