Ejemplo n.º 1
0
        private void con_RemoteConnectionAuthenticated(ConnectionData data, System.Security.Authentication.SslProtocols protocol,
                                                       System.Security.Cryptography.X509Certificates.X509Certificate2 remoteCertificate,
                                                       System.Security.Authentication.CipherAlgorithmType cipherAlgorithmType, int cipherAlgorithmStrength,
                                                       System.Security.Authentication.HashAlgorithmType hashAlgorithmType, int hashAlgorithmStrength,
                                                       System.Security.Authentication.ExchangeAlgorithmType exchangeAlgorithmType, int exchangeAlgorithmStrength)
        {
            ForwardingConnection con = data.Connection;

            AddLogEntry(logServer, con.ConId, "Remote connection authenticated. Protocol: " + protocol.ToString() + ", Cipher: " + cipherAlgorithmType.ToString()
                        + " (" + cipherAlgorithmStrength + " Bit), "
                        + "Hash: " + hashAlgorithmType.ToString() + " (" + hashAlgorithmStrength + " Bit), Exchange: " + exchangeAlgorithmType
                        + " (" + exchangeAlgorithmStrength + " Bit)\r\n"
                        + "Certiticate Subject: " + remoteCertificate.Subject + "\r\n"
                        + "Certificate Issuer: " + remoteCertificate.Issuer + "\r\n"
                        + "Valid: Not before " + new DateTimeOffset(remoteCertificate.NotBefore).ToString()
                        + ", not after " + new DateTimeOffset(remoteCertificate.NotAfter).ToString() + "\r\n"
                        + "Fingerprint: " + remoteCertificate.Thumbprint);
        }
Ejemplo n.º 2
0
        private void con_LocalConnectionAuthenticated(ConnectionData data, System.Security.Authentication.SslProtocols protocol,
                                                      System.Security.Authentication.CipherAlgorithmType cipherAlgorithmType, int cipherAlgorithmStrength,
                                                      System.Security.Authentication.HashAlgorithmType hashAlgorithmType, int hashAlgorithmStrength,
                                                      System.Security.Authentication.ExchangeAlgorithmType exchangeAlgorithmType, int exchangeAlgorithmStrength)
        {
            ForwardingConnection con = data.Connection;

            AddLogEntry(logClient, con.ConId, "Local connection authenticated. Protocol: " + protocol.ToString() + ", Cipher: " + cipherAlgorithmType.ToString()
                        + " (" + cipherAlgorithmStrength + " Bit), "
                        + "Hash: " + hashAlgorithmType.ToString() + " (" + hashAlgorithmStrength + " Bit), Exchange: " + exchangeAlgorithmType
                        + " (" + exchangeAlgorithmStrength + " Bit)");

            AddLogEntry(logServer, con.ConId, "Connecting...");
        }