]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Importing SslBump feature from Squid3 ssl-bump branch:
authorrousskov <>
Tue, 12 Feb 2008 05:29:28 +0000 (05:29 +0000)
committerrousskov <>
Tue, 12 Feb 2008 05:29:28 +0000 (05:29 +0000)
        Use newly added ACLChecklist::fd() method to get to the file
        descriptor, to get to the SSL structure.

src/ACLCertificate.cc

index bf4c9e6c6714c0b3986049b16d5586b910d3faa5..e3966c9589cbbb5f9e3017800e2cb5415cc0d368 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ACLCertificate.cc,v 1.3 2008/01/20 19:46:35 serassio Exp $
+ * $Id: ACLCertificate.cc,v 1.4 2008/02/11 22:29:28 rousskov Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -55,7 +55,9 @@ ACLStrategised<SSL *> ACLCertificate::CARegistryEntry_(new ACLCertificateData (s
 int
 ACLCertificateStrategy::match (ACLData<MatchType> * &data, ACLChecklist *checklist)
 {
-    SSL *ssl = fd_table[checklist->conn()->fd].ssl;
+    const int fd = checklist->fd();
+    const bool goodDescriptor = 0 <= fd && fd <= Biggest_FD;
+    SSL *ssl = goodDescriptor ? fd_table[fd].ssl : 0;
     return data->match (ssl);
 }