Ejemplo n.º 1
0
        public void EndSwitchingSecurityParameters(bool client)
        {
            SecurityParameters temp;

            if (client)
            {
                temp = read;
                // we now read with the new, negotiated, security parameters
                read = current;
            }
            else
            {
                temp = write;
                // we now write with the new, negotiated, security parameters
                write = current;
            }
            // so we clear the old one (last reference)
            if (temp != null)
            {
                temp.Clear();
            }
            negotiating = temp;
            // and are now ready for a future renegotiation
        }
Ejemplo n.º 2
0
		public void EndSwitchingSecurityParameters (bool client)
		{
			SecurityParameters temp;
			if (client) {
				temp = read;
				// we now read with the new, negotiated, security parameters
				read = current;
			} else {
				temp = write;
				// we now write with the new, negotiated, security parameters
				write = current;
			}
			// so we clear the old one (last reference)
			if (temp != null)
				temp.Clear ();
			negotiating = temp;
			// and are now ready for a future renegotiation
		}
Ejemplo n.º 3
0
		public void StartSwitchingSecurityParameters (bool client)
		{
			if (client) {
				// everything we write from now on is encrypted
				write = negotiating;
				// but we still read with the older cipher until we 
				// receive the ChangeCipherSpec message
				read = current;
			} else {
				// everything we read from now on is encrypted
				read = negotiating;
				// but we still write with the older cipher until we 
				// receive the ChangeCipherSpec message
				write = current;
			}
			current = negotiating;
		}