def serialize_revoked(g):
    for (common_name, path, buf, cert, signed, expired, revoked, reason) in g(limit=5):
        (yield dict(serial=('%x' % cert.serial_number), common_name=common_name, signed=signed, expired=expired, revoked=revoked, reason=reason, sha256sum=hashlib.sha256(buf).hexdigest()))
def serialize_revoked(g):
    for (common_name, path, buf, cert, signed, expired, revoked, reason) in g(limit=5):
        (yield dict(serial=('%x' % cert.serial_number), common_name=common_name, signed=signed, expired=expired, revoked=revoked, reason=reason, sha256sum=hashlib.sha256(buf).hexdigest()))