ca: add comments
ca: refactor certificates
ca: refactor authorization
ca: refactor authorization