def _process_subject(self, input, output, indent=0):
# trace = sys.stdout
while not input.eof():
tag = input.peek()
if tag[1] == ASN1.TypePrimitive:
tag, value = input.read()
if tag[0] == ASN1.PrintableString:
value = string.upper(value)
output.write(value, tag[0], tag[1], tag[2])
#trace.write(' ' * indent)
#trace.write('[%s] %s (value %s)' %
# (strclass(tag[2]), strid(tag[0]), repr(value)))
#trace.write('\n')
elif tag[1] == ASN1.TypeConstructed:
#trace.write(' ' * indent)
#trace.write('[%s] %s:\n' % (strclass(tag[2]), strid(tag[0])))
input.enter()
output.enter(tag[0], tag[2])
self._process_subject(input, output, indent+2)
output.leave()
input.leave()
#----------------------------------------------------------------------
# IOS TrustStore.sqlite3 handling
#----------------------------------------------------------------------
评论列表
文章目录