@@ -44,7 +44,7 @@ public static void Main()
4444 var builder = WebApplication . CreateBuilder ( ) ;
4545 builder . Logging . ClearProviders ( ) ;
4646 builder . Logging . AddProvider ( new ColoryrLoggerProvider ( ) ) ;
47- if ( Config . Ssl )
47+ if ( Config . UseSsl )
4848 {
4949 builder . Services . AddCertificateForwarding ( options =>
5050 {
@@ -54,8 +54,7 @@ public static void Main()
5454 if ( ! string . IsNullOrWhiteSpace ( headerValue ) )
5555 {
5656 byte [ ] bytes = StringToByteArray ( headerValue ) ;
57- var clientCertificate = new X509Certificate2 ( bytes ) ;
58- return clientCertificate ;
57+ return new X509Certificate2 ( bytes ) ;
5958 }
6059 return null ;
6160 } ;
@@ -66,11 +65,11 @@ public static void Main()
6665 i . ServerCertificateSelector = ASPServer . Ssl ) ) ;
6766 foreach ( var item in Config . Ssls )
6867 {
69- if ( File . Exists ( item . Value . SslLocal ) )
68+ if ( File . Exists ( item . Value . Ssl ) )
7069 {
7170 try
7271 {
73- var ssl = new X509Certificate2 ( item . Value . SslLocal , item . Value . SslPassword ) ;
72+ var ssl = new X509Certificate2 ( item . Value . Ssl , item . Value . Password ) ;
7473 if ( item . Key == "default" )
7574 DefaultSsl = ssl ;
7675 else
@@ -83,15 +82,15 @@ public static void Main()
8382 }
8483 else
8584 {
86- ServerMain . LogError ( $ "SSL证书找不到:{ item . Value . SslLocal } ") ;
85+ ServerMain . LogError ( $ "SSL证书找不到:{ item . Value . Ssl } ") ;
8786 }
8887 }
8988 }
9089 string [ ] urls = new string [ Config . Http . Count ] ;
9190 for ( int a = 0 ; a < Config . Http . Count ; a ++ )
9291 {
9392 var item = Config . Http [ a ] ;
94- urls [ a ] = $ "{ ( Config . Ssl ? https : http ) } ://{ item . IP } :{ item . Port } /";
93+ urls [ a ] = $ "{ ( Config . UseSsl ? https : http ) } ://{ item . IP } :{ item . Port } /";
9594 ServerMain . LogOut ( $ "Http服务器监听{ item . IP } :{ item . Port } ") ;
9695 }
9796
0 commit comments