|
4 | 4 |
|
5 | 5 | from __future__ import annotations
|
6 | 6 |
|
7 |
| -import abc |
8 | 7 | import datetime
|
9 | 8 | import typing
|
10 | 9 |
|
@@ -127,102 +126,9 @@ def __init__(
|
127 | 126 | self._revocation_reason = revocation_reason
|
128 | 127 |
|
129 | 128 |
|
130 |
| -class OCSPSingleResponse(metaclass=abc.ABCMeta): |
131 |
| - @property |
132 |
| - @abc.abstractmethod |
133 |
| - def certificate_status(self) -> OCSPCertStatus: |
134 |
| - """ |
135 |
| - The status of the certificate (an element from the OCSPCertStatus enum) |
136 |
| - """ |
137 |
| - |
138 |
| - @property |
139 |
| - @abc.abstractmethod |
140 |
| - def revocation_time(self) -> datetime.datetime | None: |
141 |
| - """ |
142 |
| - The date of when the certificate was revoked or None if not |
143 |
| - revoked. |
144 |
| - """ |
145 |
| - |
146 |
| - @property |
147 |
| - @abc.abstractmethod |
148 |
| - def revocation_time_utc(self) -> datetime.datetime | None: |
149 |
| - """ |
150 |
| - The date of when the certificate was revoked or None if not |
151 |
| - revoked. Represented as a non-naive UTC datetime. |
152 |
| - """ |
153 |
| - |
154 |
| - @property |
155 |
| - @abc.abstractmethod |
156 |
| - def revocation_reason(self) -> x509.ReasonFlags | None: |
157 |
| - """ |
158 |
| - The reason the certificate was revoked or None if not specified or |
159 |
| - not revoked. |
160 |
| - """ |
161 |
| - |
162 |
| - @property |
163 |
| - @abc.abstractmethod |
164 |
| - def this_update(self) -> datetime.datetime: |
165 |
| - """ |
166 |
| - The most recent time at which the status being indicated is known by |
167 |
| - the responder to have been correct |
168 |
| - """ |
169 |
| - |
170 |
| - @property |
171 |
| - @abc.abstractmethod |
172 |
| - def this_update_utc(self) -> datetime.datetime: |
173 |
| - """ |
174 |
| - The most recent time at which the status being indicated is known by |
175 |
| - the responder to have been correct. Represented as a non-naive UTC |
176 |
| - datetime. |
177 |
| - """ |
178 |
| - |
179 |
| - @property |
180 |
| - @abc.abstractmethod |
181 |
| - def next_update(self) -> datetime.datetime | None: |
182 |
| - """ |
183 |
| - The time when newer information will be available |
184 |
| - """ |
185 |
| - |
186 |
| - @property |
187 |
| - @abc.abstractmethod |
188 |
| - def next_update_utc(self) -> datetime.datetime | None: |
189 |
| - """ |
190 |
| - The time when newer information will be available. Represented as a |
191 |
| - non-naive UTC datetime. |
192 |
| - """ |
193 |
| - |
194 |
| - @property |
195 |
| - @abc.abstractmethod |
196 |
| - def issuer_key_hash(self) -> bytes: |
197 |
| - """ |
198 |
| - The hash of the issuer public key |
199 |
| - """ |
200 |
| - |
201 |
| - @property |
202 |
| - @abc.abstractmethod |
203 |
| - def issuer_name_hash(self) -> bytes: |
204 |
| - """ |
205 |
| - The hash of the issuer name |
206 |
| - """ |
207 |
| - |
208 |
| - @property |
209 |
| - @abc.abstractmethod |
210 |
| - def hash_algorithm(self) -> hashes.HashAlgorithm: |
211 |
| - """ |
212 |
| - The hash algorithm used in the issuer name and key hashes |
213 |
| - """ |
214 |
| - |
215 |
| - @property |
216 |
| - @abc.abstractmethod |
217 |
| - def serial_number(self) -> int: |
218 |
| - """ |
219 |
| - The serial number of the cert whose status is being checked |
220 |
| - """ |
221 |
| - |
222 |
| - |
223 | 129 | OCSPRequest = ocsp.OCSPRequest
|
224 | 130 | OCSPResponse = ocsp.OCSPResponse
|
225 |
| -OCSPSingleResponse.register(ocsp.OCSPSingleResponse) |
| 131 | +OCSPSingleResponse = ocsp.OCSPSingleResponse |
226 | 132 |
|
227 | 133 |
|
228 | 134 | class OCSPRequestBuilder:
|
|
0 commit comments