File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -22,11 +22,12 @@ namespace S7CommPlusDriver
22
22
public class S7Client : OpenSSLConnector . IConnectorCallback
23
23
{
24
24
//TODO: better API, maybe a Callback
25
- public static bool WriteSslKeyToFile ;
26
-
27
- #region [Constants and TypeDefs]
28
-
29
- public int _LastError = 0 ;
25
+ public static bool WriteSslKeyToFile ;
26
+ public static string WriteSslKeyPath ;
27
+
28
+ #region [Constants and TypeDefs]
29
+
30
+ public int _LastError = 0 ;
30
31
31
32
#endregion
32
33
@@ -110,6 +111,8 @@ public void OnDataAvailable()
110
111
public void SSL_CTX_keylog_cb ( IntPtr ssl , string line )
111
112
{
112
113
string filename = "key_" + m_DateTimeStarted . ToString ( "yyyyMMdd_HHmmss" ) + ".log" ;
114
+ if ( WriteSslKeyPath != null )
115
+ filename = Path . Combine ( WriteSslKeyPath , filename ) ;
113
116
StreamWriter file = new StreamWriter ( filename , append : true ) ;
114
117
file . WriteLine ( line ) ;
115
118
file . Close ( ) ;
You can’t perform that action at this time.
0 commit comments