예제 #1
0
 internal static void CheckVersion(byte[] readVersion, TlsProtocolHandler handler)
 {
     if ((readVersion[0] != 3) || (readVersion[1] != 1))
     {
         throw new TlsFatalAlert(AlertDescription.protocol_version);
     }
 }
예제 #2
0
        internal static void CheckVersion(Stream inStr, TlsProtocolHandler handler)
        {
            int i1 = inStr.ReadByte();
            int i2 = inStr.ReadByte();

            if ((i1 != 3) || (i2 != 1))
            {
                throw new TlsFatalAlert(AlertDescription.protocol_version);
            }
        }
예제 #3
0
 internal RecordStream(
     TlsProtocolHandler handler,
     Stream inStr,
     Stream outStr)
 {
     this.handler          = handler;
     this.inStr            = inStr;
     this.outStr           = outStr;
     this.hash             = new CombinedHash();
     this.readCompression  = new TlsNullCompression();
     this.writeCompression = this.readCompression;
     this.readCipher       = new TlsNullCipher();
     this.writeCipher      = this.readCipher;
 }
예제 #4
0
 internal TlsStream(
     TlsProtocolHandler handler)
 {
     this.handler = handler;
 }