зеркало из https://github.com/mono/mono-tls.git
Move Instrumentation from TlsSettings into UserSettings (TlsSettings will go away).
This commit is contained in:
Родитель
ff7a6513b7
Коммит
1c50c2a2d0
|
@ -18,7 +18,7 @@
|
|||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;PCL</DefineConstants>
|
||||
<DefineConstants>DEBUG;PCL;INSTRUMENTATION</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
|
|
|
@ -91,6 +91,15 @@ namespace Mono.Security.NewTls
|
|||
hasSignatureParameters = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if INSTRUMENTATION
|
||||
|
||||
public Instrumentation Instrumentation {
|
||||
get; set;
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ namespace Mono.Security.NewTls.TestProvider
|
|||
settings = GetSettings (userSettings);
|
||||
|
||||
if (instrumentation != null)
|
||||
((TlsSettings)settings).Instrumentation = instrumentation;
|
||||
((TlsSettings)settings).UserSettings.Instrumentation = instrumentation;
|
||||
|
||||
monoSslStream = await Start (ctx, stream, settings, cancellationToken);
|
||||
return monoSslStream;
|
||||
|
|
|
@ -191,22 +191,6 @@ namespace Mono.Security.NewTls
|
|||
PrivateKey = null;
|
||||
Certificate = null;
|
||||
}
|
||||
|
||||
#if INSTRUMENTATION
|
||||
|
||||
public bool HasInstrumentation {
|
||||
get { return TlsSettings != null && TlsSettings.Instrumentation != null; }
|
||||
}
|
||||
|
||||
public Instrumentation Instrumentation {
|
||||
get {
|
||||
if (!HasInstrumentation)
|
||||
throw new InvalidOperationException ();
|
||||
return TlsSettings.Instrumentation;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -104,13 +104,15 @@ namespace Mono.Security.NewTls
|
|||
this.eventSink = eventSink;
|
||||
|
||||
#if INSTRUMENTATION
|
||||
if (configuration.HasInstrumentation) {
|
||||
if (configuration.Instrumentation.HasSignatureInstrument)
|
||||
signatureProvider = configuration.Instrumentation.SignatureInstrument;
|
||||
if (configuration.Instrumentation.HasSettingsInstrument)
|
||||
settingsProvider = configuration.Instrumentation.SettingsInstrument;
|
||||
handshakeInstruments = configuration.Instrumentation.HandshakeInstruments;
|
||||
instrumentationEventSink = configuration.Instrumentation.EventSink;
|
||||
var userSettings = configuration.TlsSettings != null ? configuration.TlsSettings.UserSettings : null;
|
||||
var instrumentation = userSettings != null ? userSettings.Instrumentation : null;
|
||||
if (instrumentation != null) {
|
||||
if (instrumentation.HasSignatureInstrument)
|
||||
signatureProvider = instrumentation.SignatureInstrument;
|
||||
if (instrumentation.HasSettingsInstrument)
|
||||
settingsProvider = instrumentation.SettingsInstrument;
|
||||
handshakeInstruments = instrumentation.HandshakeInstruments;
|
||||
instrumentationEventSink = instrumentation.EventSink;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -42,14 +42,6 @@ namespace Mono.Security.NewTls
|
|||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#if INSTRUMENTATION
|
||||
|
||||
public Instrumentation Instrumentation {
|
||||
get; set;
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче