C# Class Org.BouncyCastle.Crypto.Tls.TlsProtocol

Show file Open project: gkardava/WinPass Class Usage Examples

Protected Properties

Property Type Description
mAllowCertificateStatus bool
mBlocking bool
mClientExtensions IDictionary
mConnectionState short
mExpectSessionTicket bool
mInputBuffers Org.BouncyCastle.Crypto.Tls.ByteQueueStream
mOfferedCipherSuites int[]
mOfferedCompressionMethods byte[]
mOutputBuffer Org.BouncyCastle.Crypto.Tls.ByteQueueStream
mPeerCertificate Certificate
mReceivedChangeCipherSpec bool
mResumedSession bool
mSecureRandom Org.BouncyCastle.Security.SecureRandom
mSecureRenegotiation bool
mSecurityParameters SecurityParameters
mServerExtensions IDictionary
mSessionParameters Org.BouncyCastle.Crypto.Tls.SessionParameters
mTlsSession TlsSession

Private Properties

Property Type Description
ProcessAlert void
ProcessApplicationData void
ProcessChangeCipherSpec void
ProcessHandshake void

Public Methods

Method Description
Close ( ) : void
GetAvailableInputBytes ( ) : int
GetAvailableOutputBytes ( ) : int
OfferInput ( byte input ) : void
OfferOutput ( byte buffer, int offset, int length ) : void
ReadInput ( byte buffer, int offset, int length ) : int
ReadOutput ( byte buffer, int offset, int length ) : int
TlsProtocol ( SecureRandom secureRandom ) : System
TlsProtocol ( Stream stream, SecureRandom secureRandom ) : System
TlsProtocol ( Stream input, Stream output, SecureRandom secureRandom ) : System

Protected Methods

Method Description
ApplicationDataAvailable ( ) : int
ApplyMaxFragmentLengthExtension ( ) : void
AssertEmpty ( MemoryStream buf ) : void
BlockForHandshake ( ) : void
CheckReceivedChangeCipherSpec ( bool expected ) : void
CleanupHandshake ( ) : void
CompleteHandshake ( ) : void
CreateRandomBlock ( bool useGmtUnixTime, IRandomGenerator randomGenerator ) : byte[]
CreateRenegotiationInfo ( byte renegotiated_connection ) : byte[]
CreateVerifyData ( bool isServer ) : byte[]
EstablishMasterSecret ( TlsContext context, TlsKeyExchange keyExchange ) : void
FailWithError ( byte alertLevel, byte alertDescription, string message, Exception cause ) : void
Flush ( ) : void
GetCurrentPrfHash ( TlsContext context, TlsHandshakeHash handshakeHash, byte sslSender ) : byte[]
GetPrfAlgorithm ( TlsContext context, int ciphersuite ) : int
HandleChangeCipherSpecMessage ( ) : void
HandleClose ( bool user_canceled ) : void
HandleHandshakeMessage ( byte type, byte buf ) : void
HandleWarningMessage ( byte description ) : void
InvalidateSession ( ) : void
ProcessFinishedMessage ( MemoryStream buf ) : void
ProcessMaxFragmentLengthExtension ( IDictionary clientExtensions, IDictionary serverExtensions, byte alertDescription ) : short
ProcessRecord ( byte protocol, byte buf, int offset, int len ) : void
RaiseAlert ( byte alertLevel, byte alertDescription, string message, Exception cause ) : void
RaiseWarning ( byte alertDescription, string message ) : void
ReadApplicationData ( byte buf, int offset, int len ) : int
ReadExtensions ( MemoryStream input ) : IDictionary
ReadSupplementalDataMessage ( MemoryStream input ) : IList
RefuseRenegotiation ( ) : void
SafeReadRecord ( ) : void
SafeWriteRecord ( byte type, byte buf, int offset, int len ) : void
SendCertificateMessage ( Certificate certificate ) : void
SendChangeCipherSpecMessage ( ) : void
SendFinishedMessage ( ) : void
SendSupplementalDataMessage ( IList supplementalData ) : void
SetAppDataSplitMode ( int appDataSplitMode ) : void
WriteData ( byte buf, int offset, int len ) : void
WriteExtensions ( Stream output, IDictionary extensions ) : void
WriteHandshakeMessage ( byte buf, int off, int len ) : void
WriteSelectedExtensions ( Stream output, IDictionary extensions, bool selectEmpty ) : void
WriteSupplementalData ( Stream output, IList supplementalData ) : void

Private Methods

Method Description
ProcessAlert ( ) : void
ProcessApplicationData ( ) : void
ProcessChangeCipherSpec ( byte buf, int off, int len ) : void
ProcessHandshake ( ) : void

Method Details

ApplicationDataAvailable() protected method

protected ApplicationDataAvailable ( ) : int
return int

ApplyMaxFragmentLengthExtension() protected method

protected ApplyMaxFragmentLengthExtension ( ) : void
return void

AssertEmpty() protected static method

protected static AssertEmpty ( MemoryStream buf ) : void
buf System.IO.MemoryStream
return void

BlockForHandshake() protected method

protected BlockForHandshake ( ) : void
return void

CheckReceivedChangeCipherSpec() protected method

protected CheckReceivedChangeCipherSpec ( bool expected ) : void
expected bool
return void

CleanupHandshake() protected method

protected CleanupHandshake ( ) : void
return void

Close() public method

public Close ( ) : void
return void

CompleteHandshake() protected method

protected CompleteHandshake ( ) : void
return void

CreateRandomBlock() protected static method

protected static CreateRandomBlock ( bool useGmtUnixTime, IRandomGenerator randomGenerator ) : byte[]
useGmtUnixTime bool
randomGenerator IRandomGenerator
return byte[]

CreateRenegotiationInfo() protected static method

protected static CreateRenegotiationInfo ( byte renegotiated_connection ) : byte[]
renegotiated_connection byte
return byte[]

CreateVerifyData() protected method

protected CreateVerifyData ( bool isServer ) : byte[]
isServer bool
return byte[]

EstablishMasterSecret() protected static method

protected static EstablishMasterSecret ( TlsContext context, TlsKeyExchange keyExchange ) : void
context TlsContext
keyExchange TlsKeyExchange
return void

FailWithError() protected method

protected FailWithError ( byte alertLevel, byte alertDescription, string message, Exception cause ) : void
alertLevel byte
alertDescription byte
message string
cause System.Exception
return void

Flush() protected method

protected Flush ( ) : void
return void

GetAvailableInputBytes() public method

public GetAvailableInputBytes ( ) : int
return int

GetAvailableOutputBytes() public method

public GetAvailableOutputBytes ( ) : int
return int

GetCurrentPrfHash() protected static method

protected static GetCurrentPrfHash ( TlsContext context, TlsHandshakeHash handshakeHash, byte sslSender ) : byte[]
context TlsContext
handshakeHash TlsHandshakeHash
sslSender byte
return byte[]

GetPrfAlgorithm() protected static method

protected static GetPrfAlgorithm ( TlsContext context, int ciphersuite ) : int
context TlsContext
ciphersuite int
return int

HandleChangeCipherSpecMessage() protected method

protected HandleChangeCipherSpecMessage ( ) : void
return void

HandleClose() protected method

protected HandleClose ( bool user_canceled ) : void
user_canceled bool
return void

HandleHandshakeMessage() protected abstract method

protected abstract HandleHandshakeMessage ( byte type, byte buf ) : void
type byte
buf byte
return void

HandleWarningMessage() protected method

protected HandleWarningMessage ( byte description ) : void
description byte
return void

InvalidateSession() protected method

protected InvalidateSession ( ) : void
return void

OfferInput() public method

public OfferInput ( byte input ) : void
input byte
return void

OfferOutput() public method

public OfferOutput ( byte buffer, int offset, int length ) : void
buffer byte
offset int
length int
return void

ProcessFinishedMessage() protected method

protected ProcessFinishedMessage ( MemoryStream buf ) : void
buf System.IO.MemoryStream
return void

ProcessMaxFragmentLengthExtension() protected method

protected ProcessMaxFragmentLengthExtension ( IDictionary clientExtensions, IDictionary serverExtensions, byte alertDescription ) : short
clientExtensions IDictionary
serverExtensions IDictionary
alertDescription byte
return short

ProcessRecord() protected method

protected ProcessRecord ( byte protocol, byte buf, int offset, int len ) : void
protocol byte
buf byte
offset int
len int
return void

RaiseAlert() protected method

protected RaiseAlert ( byte alertLevel, byte alertDescription, string message, Exception cause ) : void
alertLevel byte
alertDescription byte
message string
cause System.Exception
return void

RaiseWarning() protected method

protected RaiseWarning ( byte alertDescription, string message ) : void
alertDescription byte
message string
return void

ReadApplicationData() protected method

protected ReadApplicationData ( byte buf, int offset, int len ) : int
buf byte
offset int
len int
return int

ReadExtensions() protected static method

protected static ReadExtensions ( MemoryStream input ) : IDictionary
input System.IO.MemoryStream
return IDictionary

ReadInput() public method

public ReadInput ( byte buffer, int offset, int length ) : int
buffer byte
offset int
length int
return int

ReadOutput() public method

public ReadOutput ( byte buffer, int offset, int length ) : int
buffer byte
offset int
length int
return int

ReadSupplementalDataMessage() protected static method

protected static ReadSupplementalDataMessage ( MemoryStream input ) : IList
input System.IO.MemoryStream
return IList

RefuseRenegotiation() protected method

protected RefuseRenegotiation ( ) : void
return void

SafeReadRecord() protected method

protected SafeReadRecord ( ) : void
return void

SafeWriteRecord() protected method

protected SafeWriteRecord ( byte type, byte buf, int offset, int len ) : void
type byte
buf byte
offset int
len int
return void

SendCertificateMessage() protected method

protected SendCertificateMessage ( Certificate certificate ) : void
certificate Certificate
return void

SendChangeCipherSpecMessage() protected method

protected SendChangeCipherSpecMessage ( ) : void
return void

SendFinishedMessage() protected method

protected SendFinishedMessage ( ) : void
return void

SendSupplementalDataMessage() protected method

protected SendSupplementalDataMessage ( IList supplementalData ) : void
supplementalData IList
return void

SetAppDataSplitMode() protected method

protected SetAppDataSplitMode ( int appDataSplitMode ) : void
appDataSplitMode int
return void

TlsProtocol() public method

public TlsProtocol ( SecureRandom secureRandom ) : System
secureRandom Org.BouncyCastle.Security.SecureRandom
return System

TlsProtocol() public method

public TlsProtocol ( Stream stream, SecureRandom secureRandom ) : System
stream Stream
secureRandom Org.BouncyCastle.Security.SecureRandom
return System

TlsProtocol() public method

public TlsProtocol ( Stream input, Stream output, SecureRandom secureRandom ) : System
input Stream
output Stream
secureRandom Org.BouncyCastle.Security.SecureRandom
return System

WriteData() protected method

protected WriteData ( byte buf, int offset, int len ) : void
buf byte
offset int
len int
return void

WriteExtensions() protected static method

protected static WriteExtensions ( Stream output, IDictionary extensions ) : void
output Stream
extensions IDictionary
return void

WriteHandshakeMessage() protected method

protected WriteHandshakeMessage ( byte buf, int off, int len ) : void
buf byte
off int
len int
return void

WriteSelectedExtensions() protected static method

protected static WriteSelectedExtensions ( Stream output, IDictionary extensions, bool selectEmpty ) : void
output Stream
extensions IDictionary
selectEmpty bool
return void

WriteSupplementalData() protected static method

protected static WriteSupplementalData ( Stream output, IList supplementalData ) : void
output Stream
supplementalData IList
return void

Property Details

mAllowCertificateStatus protected property

protected bool mAllowCertificateStatus
return bool

mBlocking protected property

protected bool mBlocking
return bool

mClientExtensions protected property

protected IDictionary mClientExtensions
return IDictionary

mConnectionState protected property

protected short mConnectionState
return short

mExpectSessionTicket protected property

protected bool mExpectSessionTicket
return bool

mInputBuffers protected property

protected ByteQueueStream,Org.BouncyCastle.Crypto.Tls mInputBuffers
return Org.BouncyCastle.Crypto.Tls.ByteQueueStream

mOfferedCipherSuites protected property

protected int[] mOfferedCipherSuites
return int[]

mOfferedCompressionMethods protected property

protected byte[] mOfferedCompressionMethods
return byte[]

mOutputBuffer protected property

protected ByteQueueStream,Org.BouncyCastle.Crypto.Tls mOutputBuffer
return Org.BouncyCastle.Crypto.Tls.ByteQueueStream

mPeerCertificate protected property

protected Certificate,Org.BouncyCastle.Crypto.Tls mPeerCertificate
return Certificate

mReceivedChangeCipherSpec protected property

protected bool mReceivedChangeCipherSpec
return bool

mResumedSession protected property

protected bool mResumedSession
return bool

mSecureRandom protected property

protected SecureRandom,Org.BouncyCastle.Security mSecureRandom
return Org.BouncyCastle.Security.SecureRandom

mSecureRenegotiation protected property

protected bool mSecureRenegotiation
return bool

mSecurityParameters protected property

protected SecurityParameters,Org.BouncyCastle.Crypto.Tls mSecurityParameters
return SecurityParameters

mServerExtensions protected property

protected IDictionary mServerExtensions
return IDictionary

mSessionParameters protected property

protected SessionParameters,Org.BouncyCastle.Crypto.Tls mSessionParameters
return Org.BouncyCastle.Crypto.Tls.SessionParameters

mTlsSession protected property

protected TlsSession mTlsSession
return TlsSession