Remove some unused fields

Change-Id: Id38833b329b0d661fb18e8a75b671379effe82a6
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/61166
Auto-Submit: David Benjamin <davidben@google.com>
Commit-Queue: Bob Beck <bbe@google.com>
Reviewed-by: Bob Beck <bbe@google.com>
diff --git a/crypto/x509/by_dir.c b/crypto/x509/by_dir.c
index ff9a9bdd..fb4de2d 100644
--- a/crypto/x509/by_dir.c
+++ b/crypto/x509/by_dir.c
@@ -81,7 +81,6 @@
 } BY_DIR_ENTRY;
 
 typedef struct lookup_dir_st {
-  BUF_MEM *buffer;
   STACK_OF(BY_DIR_ENTRY) *dirs;
 } BY_DIR;
 
@@ -141,10 +140,6 @@
   if ((a = (BY_DIR *)OPENSSL_malloc(sizeof(BY_DIR))) == NULL) {
     return 0;
   }
-  if ((a->buffer = BUF_MEM_new()) == NULL) {
-    OPENSSL_free(a);
-    return 0;
-  }
   a->dirs = NULL;
   lu->method_data = a;
   return 1;
@@ -175,7 +170,6 @@
   BY_DIR *a = lu->method_data;
   if (a != NULL) {
     sk_BY_DIR_ENTRY_pop_free(a->dirs, by_dir_entry_free);
-    BUF_MEM_free(a->buffer);
     OPENSSL_free(a);
   }
 }
diff --git a/crypto/x509/internal.h b/crypto/x509/internal.h
index 47b285a..408698b 100644
--- a/crypto/x509/internal.h
+++ b/crypto/x509/internal.h
@@ -275,7 +275,6 @@
 // function is then called to actually check the cert chain.
 struct x509_store_st {
   // The following is a cache of trusted certs
-  int cache;                    // if true, stash any hits
   STACK_OF(X509_OBJECT) *objs;  // Cache of all objects
   CRYPTO_MUTEX objs_lock;
 
diff --git a/crypto/x509/x509_lu.c b/crypto/x509/x509_lu.c
index 929afff..c1389cc 100644
--- a/crypto/x509/x509_lu.c
+++ b/crypto/x509/x509_lu.c
@@ -173,7 +173,6 @@
   if (ret->objs == NULL) {
     goto err;
   }
-  ret->cache = 1;
   ret->get_cert_methods = sk_X509_LOOKUP_new_null();
   if (ret->get_cert_methods == NULL) {
     goto err;