File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -22,11 +22,12 @@ namespace S7CommPlusDriver
2222 public class S7Client : OpenSSLConnector . IConnectorCallback
2323 {
2424 //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 ;
3031
3132 #endregion
3233
@@ -110,6 +111,8 @@ public void OnDataAvailable()
110111 public void SSL_CTX_keylog_cb ( IntPtr ssl , string line )
111112 {
112113 string filename = "key_" + m_DateTimeStarted . ToString ( "yyyyMMdd_HHmmss" ) + ".log" ;
114+ if ( WriteSslKeyPath != null )
115+ filename = Path . Combine ( WriteSslKeyPath , filename ) ;
113116 StreamWriter file = new StreamWriter ( filename , append : true ) ;
114117 file . WriteLine ( line ) ;
115118 file . Close ( ) ;
You can’t perform that action at this time.
0 commit comments