You've already forked linux-packaging-mono
Imported Upstream version 4.3.2.467
Former-commit-id: 9c2cb47f45fa221e661ab616387c9cda183f283d
This commit is contained in:
@ -31,6 +31,15 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
#if SECURITY_DEP
|
||||
#if MONO_SECURITY_ALIAS
|
||||
extern alias MonoSecurity;
|
||||
using MonoSecurity::Mono.Security.Interface;
|
||||
#else
|
||||
using Mono.Security.Interface;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Configuration;
|
||||
@ -39,11 +48,13 @@ using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Cache;
|
||||
using System.Net.Sockets;
|
||||
using System.Net.Security;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using Mono.Net.Security;
|
||||
|
||||
namespace System.Net
|
||||
{
|
||||
@ -101,6 +112,11 @@ namespace System.Net
|
||||
int maxResponseHeadersLength;
|
||||
static int defaultMaxResponseHeadersLength;
|
||||
int readWriteTimeout = 300000; // ms
|
||||
IMonoTlsProvider tlsProvider;
|
||||
#if SECURITY_DEP
|
||||
MonoTlsSettings tlsSettings;
|
||||
#endif
|
||||
ServerCertValidationCallback certValidationCallback;
|
||||
|
||||
enum NtlmAuthState {
|
||||
None,
|
||||
@ -143,6 +159,15 @@ namespace System.Net
|
||||
ThrowOnError = true;
|
||||
ResetAuthorization ();
|
||||
}
|
||||
|
||||
#if SECURITY_DEP
|
||||
internal HttpWebRequest (Uri uri, IMonoTlsProvider tlsProvider, MonoTlsSettings settings = null)
|
||||
: this (uri)
|
||||
{
|
||||
this.tlsProvider = tlsProvider;
|
||||
this.tlsSettings = settings;
|
||||
}
|
||||
#endif
|
||||
|
||||
[Obsolete ("Serialization is obsoleted for this type", false)]
|
||||
protected HttpWebRequest (SerializationInfo serializationInfo, StreamingContext streamingContext)
|
||||
@ -240,20 +265,30 @@ namespace System.Net
|
||||
method != "TRACE";
|
||||
}
|
||||
}
|
||||
|
||||
internal IMonoTlsProvider TlsProvider {
|
||||
get { return tlsProvider; }
|
||||
}
|
||||
|
||||
#if SECURITY_DEP
|
||||
internal MonoTlsSettings TlsSettings {
|
||||
get { return tlsSettings; }
|
||||
}
|
||||
#endif
|
||||
|
||||
public X509CertificateCollection ClientCertificates {
|
||||
get {
|
||||
if (certificates == null)
|
||||
certificates = new X509CertificateCollection ();
|
||||
|
||||
return certificates;
|
||||
}
|
||||
[MonoTODO]
|
||||
set {
|
||||
throw GetMustImplement ();
|
||||
if (value == null)
|
||||
throw new ArgumentNullException ("value");
|
||||
certificates = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public string Connection {
|
||||
get { return webHeaders ["Connection"]; }
|
||||
set {
|
||||
@ -666,7 +701,26 @@ namespace System.Net
|
||||
internal bool ProxyQuery {
|
||||
get { return servicePoint.UsesProxy && !servicePoint.UseConnect; }
|
||||
}
|
||||
|
||||
|
||||
internal ServerCertValidationCallback ServerCertValidationCallback {
|
||||
get { return certValidationCallback; }
|
||||
}
|
||||
|
||||
public RemoteCertificateValidationCallback ServerCertificateValidationCallback {
|
||||
get {
|
||||
if (certValidationCallback == null)
|
||||
return null;
|
||||
return certValidationCallback.ValidationCallback;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value == null)
|
||||
certValidationCallback = null;
|
||||
else
|
||||
certValidationCallback = new ServerCertValidationCallback (value);
|
||||
}
|
||||
}
|
||||
|
||||
// Methods
|
||||
|
||||
internal ServicePoint GetServicePoint ()
|
||||
|
Reference in New Issue
Block a user