Remove ocsp_revocation_status.h and ocsp_verify_result.h
This also rolls up the remaining content of
ocsp_verify_result.cc into the include file and removes the
file.
This can land now as chrome is no longer using these includes.
Change-Id: I6f8749344a2e04bfb05073f0d80c58081ebc543f
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/76069
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: Bob Beck <bbe@google.com>
Auto-Submit: Bob Beck <bbe@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
diff --git a/build.json b/build.json
index 43ee66f..1ac48f2 100644
--- a/build.json
+++ b/build.json
@@ -599,7 +599,6 @@
"pki/ip_util.cc",
"pki/name_constraints.cc",
"pki/ocsp.cc",
- "pki/ocsp_verify_result.cc",
"pki/parse_certificate.cc",
"pki/parse_name.cc",
"pki/parse_values.cc",
@@ -647,8 +646,6 @@
"pki/name_constraints.h",
"pki/nist_pkits_unittest.h",
"pki/ocsp.h",
- "pki/ocsp_revocation_status.h",
- "pki/ocsp_verify_result.h",
"pki/parse_certificate.h",
"pki/parse_name.h",
"pki/parse_values.h",
diff --git a/gen/sources.bzl b/gen/sources.bzl
index 8573c68..082ac46 100644
--- a/gen/sources.bzl
+++ b/gen/sources.bzl
@@ -1115,7 +1115,6 @@
"pki/ip_util.cc",
"pki/name_constraints.cc",
"pki/ocsp.cc",
- "pki/ocsp_verify_result.cc",
"pki/parse_certificate.cc",
"pki/parse_name.cc",
"pki/parse_values.cc",
@@ -1164,8 +1163,6 @@
"pki/name_constraints.h",
"pki/nist_pkits_unittest.h",
"pki/ocsp.h",
- "pki/ocsp_revocation_status.h",
- "pki/ocsp_verify_result.h",
"pki/parse_certificate.h",
"pki/parse_name.h",
"pki/parse_values.h",
diff --git a/gen/sources.cmake b/gen/sources.cmake
index a82f560..5f4afc8 100644
--- a/gen/sources.cmake
+++ b/gen/sources.cmake
@@ -1151,7 +1151,6 @@
pki/ip_util.cc
pki/name_constraints.cc
pki/ocsp.cc
- pki/ocsp_verify_result.cc
pki/parse_certificate.cc
pki/parse_name.cc
pki/parse_values.cc
@@ -1204,8 +1203,6 @@
pki/name_constraints.h
pki/nist_pkits_unittest.h
pki/ocsp.h
- pki/ocsp_revocation_status.h
- pki/ocsp_verify_result.h
pki/parse_certificate.h
pki/parse_name.h
pki/parse_values.h
diff --git a/gen/sources.gni b/gen/sources.gni
index 0073426..1cc825f 100644
--- a/gen/sources.gni
+++ b/gen/sources.gni
@@ -1115,7 +1115,6 @@
"pki/ip_util.cc",
"pki/name_constraints.cc",
"pki/ocsp.cc",
- "pki/ocsp_verify_result.cc",
"pki/parse_certificate.cc",
"pki/parse_name.cc",
"pki/parse_values.cc",
@@ -1164,8 +1163,6 @@
"pki/name_constraints.h",
"pki/nist_pkits_unittest.h",
"pki/ocsp.h",
- "pki/ocsp_revocation_status.h",
- "pki/ocsp_verify_result.h",
"pki/parse_certificate.h",
"pki/parse_name.h",
"pki/parse_values.h",
diff --git a/gen/sources.json b/gen/sources.json
index 98f71e4..239b0a8 100644
--- a/gen/sources.json
+++ b/gen/sources.json
@@ -1098,7 +1098,6 @@
"pki/ip_util.cc",
"pki/name_constraints.cc",
"pki/ocsp.cc",
- "pki/ocsp_verify_result.cc",
"pki/parse_certificate.cc",
"pki/parse_name.cc",
"pki/parse_values.cc",
@@ -1145,8 +1144,6 @@
"pki/name_constraints.h",
"pki/nist_pkits_unittest.h",
"pki/ocsp.h",
- "pki/ocsp_revocation_status.h",
- "pki/ocsp_verify_result.h",
"pki/parse_certificate.h",
"pki/parse_name.h",
"pki/parse_values.h",
diff --git a/include/openssl/pki/ocsp.h b/include/openssl/pki/ocsp.h
index 9afef65..4500804 100644
--- a/include/openssl/pki/ocsp.h
+++ b/include/openssl/pki/ocsp.h
@@ -38,7 +38,17 @@
// and indicating a non-revoked status, will have |response_status = PROVIDED|
// and |revocation_status = GOOD|.
struct OPENSSL_EXPORT OCSPVerifyResult {
- bool operator==(const OCSPVerifyResult &other) const;
+ bool operator==(const OCSPVerifyResult &other) const {
+ if (response_status != other.response_status) {
+ return false;
+ }
+
+ if (response_status == PROVIDED) {
+ // |revocation_status| is only defined when |response_status| is PROVIDED.
+ return revocation_status == other.revocation_status;
+ }
+ return true;
+ }
// This value is histogrammed in Chrome, so do not re-order or change values,
// and add new values at the end.
diff --git a/pki/ocsp_revocation_status.h b/pki/ocsp_revocation_status.h
deleted file mode 100644
index c94d531..0000000
--- a/pki/ocsp_revocation_status.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2016 The Chromium Authors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// https://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef BSSL_PKI_OCSP_REVOCATION_STATUS_H_
-#define BSSL_PKI_OCSP_REVOCATION_STATUS_H_
-
-#include <openssl/pki/ocsp.h>
-
-#endif // BSSL_PKI_OCSP_REVOCATION_STATUS_H_
diff --git a/pki/ocsp_verify_result.cc b/pki/ocsp_verify_result.cc
deleted file mode 100644
index 90e40f2..0000000
--- a/pki/ocsp_verify_result.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2016 The Chromium Authors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// https://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include <openssl/pki/ocsp.h>
-
-BSSL_NAMESPACE_BEGIN
-
-bool OCSPVerifyResult::operator==(const OCSPVerifyResult &other) const {
- if (response_status != other.response_status) {
- return false;
- }
-
- if (response_status == PROVIDED) {
- // |revocation_status| is only defined when |response_status| is PROVIDED.
- return revocation_status == other.revocation_status;
- }
- return true;
-}
-
-BSSL_NAMESPACE_END
diff --git a/pki/ocsp_verify_result.h b/pki/ocsp_verify_result.h
deleted file mode 100644
index baea4ad..0000000
--- a/pki/ocsp_verify_result.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2016 The Chromium Authors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// https://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef BSSL_PKI_OCSP_VERIFY_RESULT_H_
-#define BSSL_PKI_OCSP_VERIFY_RESULT_H_
-
-#include <openssl/pki/ocsp.h>
-
-#endif // BSSL_PKI_OCSP_VERIFY_RESULT_H_