AttributeError
Python 3.11.2: /usr/bin/python3
Fri Sep 26 17:38:18 2025

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /home/chn/eid/dfri-eid/nginx-test-issuer/cgi-bin/gencert.py in <module>
    118 Test your new certificate on <a href="https://verifier.eid.hal.se/">verifier.eid.hal.se</a>!
    119 <hr>
=>  120 Issuer information: {repr(read_issuer_name())}<br>
    121 Issuer certificate: <a href="../issuingca.crt.pem">issuingca.crt.pem</a><br>
    122 Revocation list: <a href="../revokelist.crl.pem">revokelist.crl.pem</a><br>
Issuer undefined, information undefined, builtin repr = <built-in function repr>, read_issuer_name = <function read_issuer_name>, br undefined
 /home/chn/eid/dfri-eid/nginx-test-issuer/cgi-bin/gencert.py in read_issuer_name()
     58 def read_issuer_name():
     59     cacert = read_server_cert()
=>   60     return cacert.subject.get_attributes_for_oid(NameOID.COMMON_NAME).value
     61 
     62 def doit(base64pubkey, personnummer):
cacert = <Certificate(subject=<Name(CN=my-issuer-name)>, ...)>, cacert.subject = <Name(CN=my-issuer-name)>, cacert.subject.get_attributes_for_oid = <bound method Name.get_attributes_for_oid of <Name(CN=my-issuer-name)>>, global NameOID = <class 'cryptography.hazmat._oid.NameOID'>, NameOID.COMMON_NAME = <ObjectIdentifier(oid=2.5.4.3, name=commonName)>, ).value undefined

AttributeError: 'list' object has no attribute 'value'
      add_note = <built-in method add_note of AttributeError object>
      args = ("'list' object has no attribute 'value'",)
      name = 'value'
      obj = [<NameAttribute(oid=<ObjectIdentifier(oid=2.5.4.3, name=commonName)>, value='my-issuer-name')>]
      with_traceback = <built-in method with_traceback of AttributeError object>