Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SslStream Constructor (Stream^, Boolean, RemoteCertificateValidationCallback^, LocalCertificateSelectionCallback^, EncryptionPolicy)

.NET Framework (current version)
 

Initializes a new instance of the SslStream class using the specified Stream

Namespace:   System.Net.Security
Assembly:  System (in System.dll)

public:
SslStream(
	Stream^ innerStream,
	bool leaveInnerStreamOpen,
	RemoteCertificateValidationCallback^ userCertificateValidationCallback,
	LocalCertificateSelectionCallback^ userCertificateSelectionCallback,
	EncryptionPolicy encryptionPolicy
)

Parameters

innerStream
Type: System.IO::Stream^

A Stream object used by the SslStream for sending and receiving data.

leaveInnerStreamOpen
Type: System::Boolean

A Boolean value that indicates the closure behavior of the Stream object used by the SslStream for sending and receiving data. This parameter indicates if the inner stream is left open.

userCertificateValidationCallback
Type: System.Net.Security::RemoteCertificateValidationCallback^

A RemoteCertificateValidationCallback delegate responsible for validating the certificate supplied by the remote party.

userCertificateSelectionCallback
Type: System.Net.Security::LocalCertificateSelectionCallback^

A LocalCertificateSelectionCallback delegate responsible for selecting the certificate used for authentication.

encryptionPolicy
Type: System.Net.Security::EncryptionPolicy

The EncryptionPolicy to use.

Exception Condition
ArgumentException

innerStream is not readable.

-or-

innerStream is not writable.

-or-

encryptionPolicy is not valid.

ArgumentNullException

innerStream is null.

-or-

innerStream is equal to Null.

The use of the Null cipher is required when the encryptionPolicy parameter is set to EncryptionPolicy::NoEncryption.

.NET Framework
Available since 4.0
Return to top
Show:
© 2017 Microsoft