File tree Expand file tree Collapse file tree 1 file changed +15
-16
lines changed
src/Security/Authentication/Certificate/samples/Certificate.Sample Expand file tree Collapse file tree 1 file changed +15
-16
lines changed Original file line number Diff line number Diff line change @@ -7,24 +7,23 @@ namespace Certificate.Sample
77{
88 public class Program
99 {
10- public static Task Main ( string [ ] args )
10+ public static void Main ( string [ ] args )
1111 {
12- var host = Host . CreateDefaultBuilder ( args )
13- . ConfigureWebHost ( webHostBuilder =>
12+ CreateHostBuilder ( args ) . Build ( ) . Run ( ) ;
13+ }
14+
15+ public static IHostBuilder CreateHostBuilder ( string [ ] args ) =>
16+ Host . CreateDefaultBuilder ( args )
17+ . ConfigureWebHostDefaults ( webBuilder =>
1418 {
15- webHostBuilder
16- . UseStartup < Startup > ( )
19+ webBuilder . UseStartup < Startup > ( )
1720 . ConfigureKestrel ( options =>
18- {
19- options . ConfigureHttpsDefaults ( opt =>
20- {
21- opt . ClientCertificateMode = ClientCertificateMode . RequireCertificate ;
22- } ) ;
23- } ) ;
24- } )
25- . Build ( ) ;
26-
27- return host . RunAsync ( ) ;
28- }
21+ {
22+ options . ConfigureHttpsDefaults ( opt =>
23+ {
24+ opt . ClientCertificateMode = ClientCertificateMode . RequireCertificate ;
25+ } ) ;
26+ } ) ;
27+ } ) ;
2928 }
3029}
You can’t perform that action at this time.
0 commit comments