File tree 2 files changed +16
-46
lines changed
2 files changed +16
-46
lines changed Original file line number Diff line number Diff line change 2
2
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
3
3
# for complete details.
4
4
5
- from cryptography .hazmat .primitives import hashes
5
+ from cryptography import x509
6
+ from cryptography .hazmat .primitives import hashes , serialization
6
7
from cryptography .hazmat .primitives .asymmetric .types import PrivateKeyTypes
7
8
from cryptography .x509 import ocsp
8
9
9
- class OCSPRequest : ...
10
+ class OCSPRequest :
11
+ @property
12
+ def issuer_key_hash (self ) -> bytes : ...
13
+ @property
14
+ def issuer_name_hash (self ) -> bytes : ...
15
+ @property
16
+ def hash_algorithm (self ) -> hashes .HashAlgorithm : ...
17
+ @property
18
+ def serial_number (self ) -> int : ...
19
+ def public_bytes (self , encoding : serialization .Encoding ) -> bytes : ...
20
+ @property
21
+ def extensions (self ) -> x509 .Extensions : ...
22
+
10
23
class OCSPResponse : ...
11
24
class OCSPSingleResponse : ...
12
25
Original file line number Diff line number Diff line change @@ -127,49 +127,6 @@ def __init__(
127
127
self ._revocation_reason = revocation_reason
128
128
129
129
130
- class OCSPRequest (metaclass = abc .ABCMeta ):
131
- @property
132
- @abc .abstractmethod
133
- def issuer_key_hash (self ) -> bytes :
134
- """
135
- The hash of the issuer public key
136
- """
137
-
138
- @property
139
- @abc .abstractmethod
140
- def issuer_name_hash (self ) -> bytes :
141
- """
142
- The hash of the issuer name
143
- """
144
-
145
- @property
146
- @abc .abstractmethod
147
- def hash_algorithm (self ) -> hashes .HashAlgorithm :
148
- """
149
- The hash algorithm used in the issuer name and key hashes
150
- """
151
-
152
- @property
153
- @abc .abstractmethod
154
- def serial_number (self ) -> int :
155
- """
156
- The serial number of the cert whose status is being checked
157
- """
158
-
159
- @abc .abstractmethod
160
- def public_bytes (self , encoding : serialization .Encoding ) -> bytes :
161
- """
162
- Serializes the request to DER
163
- """
164
-
165
- @property
166
- @abc .abstractmethod
167
- def extensions (self ) -> x509 .Extensions :
168
- """
169
- The list of request extensions. Not single request extensions.
170
- """
171
-
172
-
173
130
class OCSPSingleResponse (metaclass = abc .ABCMeta ):
174
131
@property
175
132
@abc .abstractmethod
@@ -460,7 +417,7 @@ def public_bytes(self, encoding: serialization.Encoding) -> bytes:
460
417
"""
461
418
462
419
463
- OCSPRequest . register ( ocsp .OCSPRequest )
420
+ OCSPRequest = ocsp .OCSPRequest
464
421
OCSPResponse .register (ocsp .OCSPResponse )
465
422
OCSPSingleResponse .register (ocsp .OCSPSingleResponse )
466
423
You can’t perform that action at this time.
0 commit comments