diff options
Diffstat (limited to 'chromium/net/test/revocation_builder.h')
-rw-r--r-- | chromium/net/test/revocation_builder.h | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/chromium/net/test/revocation_builder.h b/chromium/net/test/revocation_builder.h index 6f0b7c8d0ed..e98d47572b7 100644 --- a/chromium/net/test/revocation_builder.h +++ b/chromium/net/test/revocation_builder.h @@ -9,8 +9,10 @@ #include <vector> #include "base/time/time.h" -#include "net/cert/internal/ocsp.h" #include "net/cert/ocsp_revocation_status.h" +#include "net/cert/pki/ocsp.h" +#include "net/cert/pki/signature_algorithm.h" +#include "third_party/abseil-cpp/absl/types/optional.h" #include "third_party/boringssl/src/include/openssl/evp.h" namespace net { @@ -45,18 +47,23 @@ std::string BuildOCSPResponse( base::Time produced_at, const std::vector<OCSPBuilderSingleResponse>& responses); -// Creates an OCSPResponse signed by |responder_key| with |tbs_response_data| as -// the to-be-signed ResponseData. -std::string BuildOCSPResponseWithResponseData(EVP_PKEY* responder_key, - const std::string& response_data); +// Creates an OCSPResponse signed by |responder_key| with |tbs_response_data| +// as the to-be-signed ResponseData. If |signature_algorithm| is nullopt, a +// default algorithm will be chosen based on the key type. +std::string BuildOCSPResponseWithResponseData( + EVP_PKEY* responder_key, + const std::string& response_data, + absl::optional<SignatureAlgorithm> signature_algorithm = absl::nullopt); // Creates a CRL issued by |crl_issuer_subject| and signed by |crl_issuer_key|, -// marking |revoked_serials| as revoked. +// marking |revoked_serials| as revoked. If |signature_algorithm| is nullopt, a +// default algorithm will be chosen based on the key type. // Returns the DER-encoded CRL. -std::string BuildCrl(const std::string& crl_issuer_subject, - EVP_PKEY* crl_issuer_key, - const std::vector<uint64_t>& revoked_serials, - DigestAlgorithm digest); +std::string BuildCrl( + const std::string& crl_issuer_subject, + EVP_PKEY* crl_issuer_key, + const std::vector<uint64_t>& revoked_serials, + absl::optional<SignatureAlgorithm> signature_algorithm = absl::nullopt); } // namespace net |