Skip to content

Instantly share code, notes, and snippets.

@paulsc
Created October 20, 2022 12:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulsc/ae4d78c033196a44fff351a0257a8dfa to your computer and use it in GitHub Desktop.
Save paulsc/ae4d78c033196a44fff351a0257a8dfa to your computer and use it in GitHub Desktop.
sequence = DerSequence()
sequence.decode(_digest_algorithm_identifier)
_digest_algorithm_identifier = sequence[0]
object_id = DerObjectId()
object_id.decode(_digest_algorithm_identifier)
digest_algorithm_identifier = object_id.value
if digest_algorithm_identifier != '2.16.840.1.101.3.4.2.1':
raise Exception('invalid digest algorithm identifier')
_null = sequence[1]
null = DerNull()
null.decode(_null)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment