Exemplo n.º 1
0
 private void RaiseEventPeerSecureChannelException(SecureChannelException ex)
 {
     _syncCxt.Post(PeerSecureChannelExceptionCallback, ex);
 }
Exemplo n.º 2
0
 private void _network_VirtualPeerSecureChannelException(BitChatNetwork sender, SecureChannelException ex)
 {
     if (PeerSecureChannelException != null)
         RaiseEventPeerSecureChannelException(ex);
 }
Exemplo n.º 3
0
        private void _chat_PeerSecureChannelException(BitChat sender, SecureChannelException ex)
        {
            string peerInfo;

            if (ex.PeerCertificate == null)
                peerInfo = "[" + ex.PeerEP.ToString() + "]";
            else
                peerInfo = ex.PeerCertificate.IssuedTo.Name + " <" + ex.PeerCertificate.IssuedTo.EmailAddress.Address + "> [" + ex.PeerEP.ToString() + "]";

            string desc;

            if (ex.Code == SecureChannelCode.RemoteError)
                desc = "RemoteError: " + (ex.InnerException as SecureChannelException).Code.ToString();
            else
                desc = ex.Code.ToString();

            AddMessage(new ChatMessageInfoItem("Secure channel with peer '" + peerInfo + "' encountered '" + desc + "' exception.", DateTime.Now));
        }