---
cases:
  - note: cryptox509parsecertificates/PEM, chain, b64
    query: data.generated.p = x
    modules:
      - |
        package generated

        certs := "[encoded data, 6324 characters]"

        p := __local2__ if {
        	__local4__ = data.generated.certs
        	crypto.x509.parse_certificates(__local4__, __local3__)
        	__local0__ = __local3__
        	__local2__ = [__local1__ | __local1__ = __local0__[_].Subject.CommonName]
        }
    data: {}
    want_result:
      - x:
          - openpolicyagent.org
          - Let's Encrypt Authority X3
          - DST Root CA X3
