|
|
|
@ -4,7 +4,7 @@
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* The MIT License
|
|
|
|
* The MIT License
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Copyright (c) 2012-2013 sta.blockhead
|
|
|
|
* Copyright (c) 2012-2014 sta.blockhead
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
|
|
@ -30,41 +30,40 @@ using System;
|
|
|
|
using System.Net.Security;
|
|
|
|
using System.Net.Security;
|
|
|
|
using System.Net.Sockets;
|
|
|
|
using System.Net.Sockets;
|
|
|
|
|
|
|
|
|
|
|
|
namespace WebSocketSharp.Net.Security {
|
|
|
|
namespace WebSocketSharp.Net.Security
|
|
|
|
|
|
|
|
{
|
|
|
|
internal class SslStream : System.Net.Security.SslStream
|
|
|
|
internal class SslStream : System.Net.Security.SslStream
|
|
|
|
{
|
|
|
|
{
|
|
|
|
#region Public Constructors
|
|
|
|
#region Public Constructors
|
|
|
|
|
|
|
|
|
|
|
|
public SslStream(NetworkStream innerStream)
|
|
|
|
public SslStream (NetworkStream innerStream)
|
|
|
|
: base(innerStream)
|
|
|
|
: base (innerStream)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public SslStream(NetworkStream innerStream, bool leaveInnerStreamOpen)
|
|
|
|
public SslStream (NetworkStream innerStream, bool leaveInnerStreamOpen)
|
|
|
|
: base(innerStream, leaveInnerStreamOpen)
|
|
|
|
: base (innerStream, leaveInnerStreamOpen)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public SslStream(
|
|
|
|
public SslStream (
|
|
|
|
NetworkStream innerStream,
|
|
|
|
NetworkStream innerStream,
|
|
|
|
bool leaveInnerStreamOpen,
|
|
|
|
bool leaveInnerStreamOpen,
|
|
|
|
RemoteCertificateValidationCallback userCertificateValidationCallback
|
|
|
|
RemoteCertificateValidationCallback userCertificateValidationCallback)
|
|
|
|
) : base(innerStream, leaveInnerStreamOpen, userCertificateValidationCallback)
|
|
|
|
: base (innerStream, leaveInnerStreamOpen, userCertificateValidationCallback)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public SslStream(
|
|
|
|
public SslStream (
|
|
|
|
NetworkStream innerStream,
|
|
|
|
NetworkStream innerStream,
|
|
|
|
bool leaveInnerStreamOpen,
|
|
|
|
bool leaveInnerStreamOpen,
|
|
|
|
RemoteCertificateValidationCallback userCertificateValidationCallback,
|
|
|
|
RemoteCertificateValidationCallback userCertificateValidationCallback,
|
|
|
|
LocalCertificateSelectionCallback userCertificateSelectionCallback
|
|
|
|
LocalCertificateSelectionCallback userCertificateSelectionCallback)
|
|
|
|
) : base(
|
|
|
|
: base (
|
|
|
|
innerStream,
|
|
|
|
innerStream,
|
|
|
|
leaveInnerStreamOpen,
|
|
|
|
leaveInnerStreamOpen,
|
|
|
|
userCertificateValidationCallback,
|
|
|
|
userCertificateValidationCallback,
|
|
|
|
userCertificateSelectionCallback
|
|
|
|
userCertificateSelectionCallback)
|
|
|
|
)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -74,7 +73,7 @@ namespace WebSocketSharp.Net.Security {
|
|
|
|
|
|
|
|
|
|
|
|
public bool DataAvailable {
|
|
|
|
public bool DataAvailable {
|
|
|
|
get {
|
|
|
|
get {
|
|
|
|
return ((NetworkStream)InnerStream).DataAvailable;
|
|
|
|
return ((NetworkStream) InnerStream).DataAvailable;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|