[MTCs] remove deprecated MTCAnchor constructor Bug: 452986180 Change-Id: I3b72973fecc2d7feafda12e5c7f08cc6dc8e189c Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/101927 Presubmit-BoringSSL-Verified: boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Matt Mueller <mattm@google.com> Commit-Queue: Matt Mueller <mattm@google.com> Commit-Queue: David Benjamin <davidben@google.com> Reviewed-by: David Benjamin <davidben@google.com>
diff --git a/pki/trust_store.cc b/pki/trust_store.cc index 661eed8..94435e3 100644 --- a/pki/trust_store.cc +++ b/pki/trust_store.cc
@@ -200,19 +200,6 @@ CreateSyntheticCert(ca_id); } -MTCAnchor::MTCAnchor( - Span<const uint8_t> ca_id, SignatureAlgorithm ca_signature_algorithm, - UniquePtr<CRYPTO_BUFFER> ca_key, - std::map<uint16_t, std::vector<TrustedSubtree>> trusted_subtrees) - : ca_id_(ca_id.begin(), ca_id.end()), - ca_signature_algorithm_(ca_signature_algorithm), - ca_key_(std::move(ca_key)) { - for (auto& [log_number, subtrees] : trusted_subtrees) { - trusted_subtrees_.push_back({log_number, std::move(subtrees)}); - } - CreateSyntheticCert(ca_id); -} - bool MTCAnchor::IsValid() const { if (!synthetic_cert_) { return false;
diff --git a/pki/trust_store.h b/pki/trust_store.h index 8d80a0a..0a58f63 100644 --- a/pki/trust_store.h +++ b/pki/trust_store.h
@@ -166,18 +166,6 @@ UniquePtr<CRYPTO_BUFFER> ca_key, std::vector<LogTrustedSubtrees> log_trusted_subtrees); - // TODO(mattm): this constructor is deprecated, remove it once the - // chromium-side has been updated to use the new one. - // Create an MTCAnchor with spec version kPlants04 for a trusted CA with - // `ca_id` containing the DER encoding of the relative OID of the CA's ID. - // `ca_signature_algorithm` and `ca_key` configure the CA cosigner key. - // `ca_key` should be a DER-encoded SubjectPublicKeyInfo. - // The `trusted_subtrees` must be sorted by their subtree ranges. - MTCAnchor(Span<const uint8_t> ca_id, - SignatureAlgorithm ca_signature_algorithm, - UniquePtr<CRYPTO_BUFFER> ca_key, - std::map<uint16_t, std::vector<TrustedSubtree>> trusted_subtrees); - // Returns whether this MTCAnchor represents a valid anchor. This function // exists because the c'tor inputs could be invalid. bool IsValid() const;