public SslConnection(SslConnectionFactory factory, Connection connection) : base((Socket)null) { this.fFactory = factory; this.fInnerConnection = connection; this.fInnerConnection.BufferedAsync = false; this.fInnerConnection.AsyncDisconnect += InnerConnection_AsyncDisconnect; this.fInnerConnection.AsyncHaveIncompleteData += InnerConnection_AsyncHaveIncompleteData; }
public SslConnection(SslConnectionFactory factory, Connection connection) : base((Socket)null) { fFactory = factory; fInnerConnection = connection; fInnerConnection.BufferedAsync = false; fInnerConnection.AsyncDisconnect += new EventHandler(InnerConnection_AsyncDisconnect); fInnerConnection.AsyncHaveIncompleteData += new EventHandler(InnerConnection_AsyncHaveIncompleteData); }
private void LoadCertificateFromStore() { // Initial data cleanup, just in case String lThumbprint = this.CertificateThumbprint.Replace("\u200e", "").Replace("\u200f", "").Replace(" ", ""); X509Certificate2 lCertificate = SslConnectionFactory.LoadCertificateFromStore(lThumbprint, StoreLocation.CurrentUser) ?? SslConnectionFactory.LoadCertificateFromStore(lThumbprint, StoreLocation.LocalMachine); if (lCertificate == null) { throw new CryptographicException("Cannot find certificate with provided thumbprint: " + this.CertificateThumbprint); } this.Certificate = lCertificate; }