gfe-relnote: Rename quic::ProofSource::SessionTicketCrypter to GetTicketCrypter. No behavior change. PiperOrigin-RevId: 308668421 Change-Id: I8f7e6a426e4d1131097c5ee6b0f6e2959ab81974
diff --git a/quic/core/crypto/proof_source.h b/quic/core/crypto/proof_source.h index 60829a9..9757099 100644 --- a/quic/core/crypto/proof_source.h +++ b/quic/core/crypto/proof_source.h
@@ -191,7 +191,7 @@ // TicketCrypter returned (if not nullptr) must be valid for the lifetime of // the ProofSource, and the caller does not take ownership of said // TicketCrypter. - virtual TicketCrypter* SessionTicketCrypter() = 0; + virtual TicketCrypter* GetTicketCrypter() = 0; }; } // namespace quic
diff --git a/quic/core/crypto/proof_source_x509.cc b/quic/core/crypto/proof_source_x509.cc index 6caf384..89c4c43 100644 --- a/quic/core/crypto/proof_source_x509.cc +++ b/quic/core/crypto/proof_source_x509.cc
@@ -77,7 +77,7 @@ callback->Run(/*ok=*/!signature.empty(), signature, nullptr); } -ProofSource::TicketCrypter* ProofSourceX509::SessionTicketCrypter() { +ProofSource::TicketCrypter* ProofSourceX509::GetTicketCrypter() { return nullptr; }
diff --git a/quic/core/crypto/proof_source_x509.h b/quic/core/crypto/proof_source_x509.h index 1fdb81b..f9a6796 100644 --- a/quic/core/crypto/proof_source_x509.h +++ b/quic/core/crypto/proof_source_x509.h
@@ -42,7 +42,7 @@ uint16_t signature_algorithm, quiche::QuicheStringPiece in, std::unique_ptr<SignatureCallback> callback) override; - TicketCrypter* SessionTicketCrypter() override; + TicketCrypter* GetTicketCrypter() override; // Adds a certificate chain to the verifier. Returns false if the chain is // not valid. Newer certificates will override older certificates with the
diff --git a/quic/core/crypto/tls_server_connection.cc b/quic/core/crypto/tls_server_connection.cc index b647ecc..7e5b366 100644 --- a/quic/core/crypto/tls_server_connection.cc +++ b/quic/core/crypto/tls_server_connection.cc
@@ -21,10 +21,10 @@ SSL_CTX_set_tlsext_servername_callback(ssl_ctx.get(), &SelectCertificateCallback); SSL_CTX_set_alpn_select_cb(ssl_ctx.get(), &SelectAlpnCallback, nullptr); - // We don't actually need the SessionTicketCrypter here, but we need to know + // We don't actually need the TicketCrypter here, but we need to know // whether it's set. if (GetQuicReloadableFlag(quic_enable_tls_resumption) && - proof_source->SessionTicketCrypter()) { + proof_source->GetTicketCrypter()) { SSL_CTX_set_ticket_aead_method(ssl_ctx.get(), &TlsServerConnection::kSessionTicketMethod); } else {
diff --git a/quic/core/quic_crypto_client_handshaker_test.cc b/quic/core/quic_crypto_client_handshaker_test.cc index 1e49f5f..a74d7e7 100644 --- a/quic/core/quic_crypto_client_handshaker_test.cc +++ b/quic/core/quic_crypto_client_handshaker_test.cc
@@ -100,7 +100,7 @@ callback->Run(true, "Dummy signature", /*details=*/nullptr); } - TicketCrypter* SessionTicketCrypter() override { return nullptr; } + TicketCrypter* GetTicketCrypter() override { return nullptr; } }; class Handshaker : public QuicCryptoClientHandshaker {
diff --git a/quic/core/tls_server_handshaker.cc b/quic/core/tls_server_handshaker.cc index 108bc5a..cef5efe 100644 --- a/quic/core/tls_server_handshaker.cc +++ b/quic/core/tls_server_handshaker.cc
@@ -417,20 +417,19 @@ } size_t TlsServerHandshaker::SessionTicketMaxOverhead() { - DCHECK(proof_source_->SessionTicketCrypter()); - return proof_source_->SessionTicketCrypter()->MaxOverhead(); + DCHECK(proof_source_->GetTicketCrypter()); + return proof_source_->GetTicketCrypter()->MaxOverhead(); } int TlsServerHandshaker::SessionTicketSeal(uint8_t* out, size_t* out_len, size_t max_out_len, quiche::QuicheStringPiece in) { - DCHECK(proof_source_->SessionTicketCrypter()); - std::vector<uint8_t> ticket = - proof_source_->SessionTicketCrypter()->Encrypt(in); + DCHECK(proof_source_->GetTicketCrypter()); + std::vector<uint8_t> ticket = proof_source_->GetTicketCrypter()->Encrypt(in); if (max_out_len < ticket.size()) { QUIC_BUG - << "SessionTicketCrypter returned " << ticket.size() + << "TicketCrypter returned " << ticket.size() << " bytes of ciphertext, which is larger than its max overhead of " << max_out_len; return 0; // failure @@ -445,11 +444,11 @@ size_t* out_len, size_t max_out_len, quiche::QuicheStringPiece in) { - DCHECK(proof_source_->SessionTicketCrypter()); + DCHECK(proof_source_->GetTicketCrypter()); if (!ticket_decryption_callback_) { ticket_decryption_callback_ = new DecryptCallback(this); - proof_source_->SessionTicketCrypter()->Decrypt( + proof_source_->GetTicketCrypter()->Decrypt( in, std::unique_ptr<DecryptCallback>(ticket_decryption_callback_)); // Decrypt can run the callback synchronously. In that case, the callback // will clear the ticket_decryption_callback_ pointer, and instead of
diff --git a/quic/qbone/qbone_session_test.cc b/quic/qbone/qbone_session_test.cc index 595a0ff..ae129bb 100644 --- a/quic/qbone/qbone_session_test.cc +++ b/quic/qbone/qbone_session_test.cc
@@ -112,7 +112,7 @@ server_address, hostname, signature_algorithm, in, std::move(callback)); } - TicketCrypter* SessionTicketCrypter() override { return nullptr; } + TicketCrypter* GetTicketCrypter() override { return nullptr; } private: std::unique_ptr<ProofSource> proof_source_;
diff --git a/quic/quartc/quartc_crypto_helpers.h b/quic/quartc/quartc_crypto_helpers.h index 31b39a7..8d4ec87 100644 --- a/quic/quartc/quartc_crypto_helpers.h +++ b/quic/quartc/quartc_crypto_helpers.h
@@ -61,7 +61,7 @@ quiche::QuicheStringPiece in, std::unique_ptr<SignatureCallback> callback) override; - TicketCrypter* SessionTicketCrypter() override { return nullptr; } + TicketCrypter* GetTicketCrypter() override { return nullptr; } }; // Used by QuicCryptoClientConfig to ignore the peer's credentials
diff --git a/quic/test_tools/failing_proof_source.h b/quic/test_tools/failing_proof_source.h index 69a3e7a..1ce7f72 100644 --- a/quic/test_tools/failing_proof_source.h +++ b/quic/test_tools/failing_proof_source.h
@@ -31,7 +31,7 @@ quiche::QuicheStringPiece in, std::unique_ptr<SignatureCallback> callback) override; - TicketCrypter* SessionTicketCrypter() override { return nullptr; } + TicketCrypter* GetTicketCrypter() override { return nullptr; } }; } // namespace test
diff --git a/quic/test_tools/fake_proof_source.cc b/quic/test_tools/fake_proof_source.cc index 3763bcc..35c81d5 100644 --- a/quic/test_tools/fake_proof_source.cc +++ b/quic/test_tools/fake_proof_source.cc
@@ -113,11 +113,11 @@ delegate_.get())); } -ProofSource::TicketCrypter* FakeProofSource::SessionTicketCrypter() { +ProofSource::TicketCrypter* FakeProofSource::GetTicketCrypter() { if (ticket_crypter_) { return ticket_crypter_.get(); } - return delegate_->SessionTicketCrypter(); + return delegate_->GetTicketCrypter(); } void FakeProofSource::SetTicketCrypter(
diff --git a/quic/test_tools/fake_proof_source.h b/quic/test_tools/fake_proof_source.h index c179f59..35e5c5e 100644 --- a/quic/test_tools/fake_proof_source.h +++ b/quic/test_tools/fake_proof_source.h
@@ -21,7 +21,7 @@ // asynchronously, and allow the caller to see that the call is pending and // resume the operation at the caller's choosing. FakeProofSource also allows // the caller to replace the TicketCrypter provided by -// FakeProofSource::SessionTicketCrypter. +// FakeProofSource::GetTicketCrypter. class FakeProofSource : public ProofSource { public: FakeProofSource(); @@ -49,7 +49,7 @@ uint16_t signature_algorithm, quiche::QuicheStringPiece in, std::unique_ptr<ProofSource::SignatureCallback> callback) override; - TicketCrypter* SessionTicketCrypter() override; + TicketCrypter* GetTicketCrypter() override; // Sets the TicketCrypter to use. If nullptr, the TicketCrypter from // ProofSourceForTesting will be returned instead.