@@ -134,6 +134,11 @@ def get_signature(self, message):
134134
135135 Returns:
136136 bytes: the message signature
137+
138+ Raises:
139+ ExpiredContextError
140+ MissingContextError
141+ BadQoPError
137142 """
138143
139144 # TODO(directxman12): check flags?
@@ -154,6 +159,16 @@ def verify_signature(self, message, mic):
154159
155160 Raises:
156161 BadMICError: the signature was not valid
162+
163+ Raises:
164+ InvalidTokenError
165+ BadMICError
166+ DuplicateTokenError
167+ ExpiredTokenError
168+ TokenTooLateError
169+ TokenTooEarlyError
170+ ExpiredContextError
171+ MissingContextError
157172 """
158173
159174 return rmessage .verify_mic (self , message , mic )
@@ -171,6 +186,11 @@ def wrap(self, message, encrypt):
171186 Returns:
172187 WrapResult: the wrapped message and details about it
173188 (e.g. whether encryption was used succesfully)
189+
190+ Raises:
191+ ExpiredContextError
192+ MissingContextError
193+ BadQoPError
174194 """
175195
176196 return rmessage .wrap (self , message , encrypt )
@@ -187,6 +207,16 @@ def unwrap(self, message):
187207 Returns:
188208 UnwrapResult: the unwrapped message and details about it
189209 (e.g. wheter encryption was used)
210+
211+ Raises:
212+ InvalidTokenError
213+ BadMICError
214+ DuplicateTokenError
215+ ExpiredTokenError
216+ TokenTooLateError
217+ TokenTooEarlyError
218+ ExpiredContextError
219+ MissingContextError
190220 """
191221
192222 return rmessage .unwrap (self , message )
@@ -208,6 +238,9 @@ def encrypt(self, message):
208238
209239 Raises:
210240 EncryptionNotUsed: the encryption could not be used
241+ ExpiredContextError
242+ MissingContextError
243+ BadQoPError
211244 """
212245
213246 res = self .wrap (message , encrypt = True )
@@ -233,6 +266,14 @@ def decrypt(self, message):
233266
234267 Raises:
235268 EncryptionNotUsed: encryption was expected, but not used
269+ InvalidTokenError
270+ BadMICError
271+ DuplicateTokenError
272+ ExpiredTokenError
273+ TokenTooLateError
274+ TokenTooEarlyError
275+ ExpiredContextError
276+ MissingContextError
236277 """
237278
238279 res = self .unwrap (message )
@@ -260,6 +301,11 @@ def get_wrap_size_limit(self, desired_output_size,
260301
261302 Returns:
262303 int: the maximum input message size
304+
305+ Raises:
306+ MissingContextError
307+ ExpiredContextError
308+ BadQoPError
263309 """
264310
265311 return rmessage .wrap_size_limit (self , desired_output_size ,
@@ -273,6 +319,10 @@ def process_token(self, token):
273319
274320 Args:
275321 token (bytes): the token to process
322+
323+ Raises:
324+ InvalidTokenError
325+ MissingContextError
276326 """
277327
278328 rsec_contexts .process_context_token (self , token )
@@ -285,6 +335,11 @@ def export(self):
285335
286336 Returns:
287337 bytes: the exported security context
338+
339+ Raises:
340+ ExpiredContextError
341+ MissingContextError
342+ OperationUnavailableError
288343 """
289344
290345 return rsec_contexts .export_sec_context (self )
@@ -315,6 +370,9 @@ def _inquire(self, **kwargs):
315370 Returns:
316371 InquireContextResult: the results of the inquiry, with unused
317372 fields set to None
373+
374+ Raises:
375+ MissingContextError
318376 """
319377 if not kwargs :
320378 default_val = True
@@ -395,6 +453,20 @@ def step(self, token=None):
395453
396454 Returns:
397455 bytes: the output token to send to the other participant
456+
457+ Raises:
458+ InvalidTokenError
459+ InvalidCredentialsError
460+ MissingCredentialsError
461+ ExpiredCredentialsError
462+ BadChannelBindingsError
463+ BadMICError
464+ ExpiredTokenError: (initiate only)
465+ DuplicateTokenError
466+ MissingContextError
467+ BadNameTypeError: (initiate only)
468+ BadNameError: (initiate only)
469+ BadMechanismError
398470 """
399471
400472 if self .usage == 'accept' :
0 commit comments