Brunet.Security.PeerSec.PeerSecOverlord.HandleControlCookie C# (CSharp) Метод

HandleControlCookie() защищенный Метод

1b) Receive a Cookie which responds with a CookieResponse
protected HandleControlCookie ( PeerSecAssociation sa, MemBlock calc_cookie, SecurityControlMessage scm, SecurityControlMessage scm_reply, ISender return_path, ISender low_level_sender ) : void
sa PeerSecAssociation A security association that we wish to perform the /// specified control operation on.
calc_cookie MemBlock Cookie value for the association sender.
scm SecurityControlMessage The received SecurityControlMessage.
scm_reply SecurityControlMessage A prepared reply message (with headers and such.
return_path ISender Where to send the result.
low_level_sender ISender We expect the return_path to not be an edge or /// some other type of "low level" sender, so this contains the parsed out value.
Результат void
    protected void HandleControlCookie(PeerSecAssociation sa,
        MemBlock calc_cookie, SecurityControlMessage scm,
        SecurityControlMessage scm_reply, ISender return_path,
        ISender low_level_sender)
    {
      ProtocolLog.WriteIf(ProtocolLog.Security, String.Format(
            "{0}, Received Cookie from: {1}, In-Cookie: {2}",
            GetHashCode(), low_level_sender, scm.LocalCookie));
      scm_reply.Type = SecurityControlMessage.MessageType.CookieResponse;
      scm_reply.RemoteCookie = scm.LocalCookie;
      scm_reply.LocalCookie = calc_cookie;
      if(SecurityPolicy.GetPolicy(scm.SPI).PreExchangedKeys) {
        scm_reply.CAs = new List<MemBlock>(0);
      } else {
        scm_reply.CAs = _ch.SupportedCAs;
      }
      ICopyable to_send = new CopyList(SecureControl, scm_reply.Packet);
      return_path.Send(to_send);
      ProtocolLog.WriteIf(ProtocolLog.Security, String.Format(
            "{0}, Successful Cookie from: {1}, Out-Cookie: {2}",
            GetHashCode(), low_level_sender, calc_cookie));
    }