MCPcopy Create free account
hub / github.com/mozilla/cipherscan / parse

Method parse

cscan/messages.py:185–194  ·  view source on GitHub ↗

Deserialise certificate status message from binary data.

(self, parser)

Source from the content-addressed store, hash-verified

183 self.response = None
184
185 def parse(self, parser):
186 """Deserialise certificate status message from binary data."""
187 parser.startLengthCheck(3)
188 self.status_type = parser.get(1)
189 if self.status_type == 1: # FIXME, create registry
190 self.response = parser.getVarBytes(3)
191 else:
192 raise SyntaxError() # FIXME, use sane-er type
193 parser.stopLengthCheck()
194 return self
195
196 def __format__(self, formatstr):
197 """Return human-readable representation of certificate status."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected