8
8
9
9
Console . WriteLine ( "Starting application..." ) ;
10
10
11
- using var process = new Process ( )
12
- {
13
- StartInfo =
14
- {
15
- FileName = "/usr/bin/env" ,
16
- Arguments = "openssl version" ,
17
- RedirectStandardOutput = true ,
18
- RedirectStandardError = true ,
19
- UseShellExecute = false ,
20
- CreateNoWindow = true ,
21
- } ,
22
- EnableRaisingEvents = true ,
23
- } ;
24
-
25
- process . Start ( ) ;
26
- process . WaitForExit ( ) ;
27
- string output = process . StandardOutput . ReadToEnd ( ) ;
28
- Console . WriteLine ( "In app openssl version: \n " + output + "\n \n " ) ;
29
-
30
11
var builder = WebApplication . CreateBuilder ( args ) ;
31
12
builder . Logging . ClearProviders ( ) ;
32
13
@@ -142,6 +123,7 @@ bool AllowAnyCertificateValidationWithLogging(X509Certificate2 certificate, X509
142
123
await app . StartAsync ( ) ;
143
124
144
125
Console . WriteLine ( "Application Info:" ) ;
126
+ LogOpenSSLVersion ( ) ;
145
127
if ( mTlsEnabled )
146
128
{
147
129
Console . WriteLine ( $ "\t mTLS is enabled (client cert is required)") ;
@@ -178,4 +160,25 @@ static IPEndPoint CreateIPEndPoint(UrlPrefix urlPrefix)
178
160
}
179
161
180
162
return new IPEndPoint ( ip , urlPrefix . PortValue ) ;
163
+ }
164
+
165
+ static void LogOpenSSLVersion ( )
166
+ {
167
+ using var process = new Process ( )
168
+ {
169
+ StartInfo =
170
+ {
171
+ FileName = "/usr/bin/env" ,
172
+ Arguments = "openssl version" ,
173
+ RedirectStandardOutput = true ,
174
+ RedirectStandardError = true ,
175
+ UseShellExecute = false ,
176
+ CreateNoWindow = true
177
+ } ,
178
+ } ;
179
+
180
+ process . Start ( ) ;
181
+ process . WaitForExit ( ) ;
182
+ var output = process . StandardOutput . ReadToEnd ( ) ;
183
+ Console . WriteLine ( "In app openssl version: " + output ) ;
181
184
}
0 commit comments