X509Extension documentation says it takes a "value (bytes) – The value of the extension.", which reads as it if takes the raw bytes of the extension. (The relevant field in X.509 is even called extnValue.) However, it seems to actually pass it into OpenSSL's ad-hoc string-based config-file syntax for specifying extensions.
https://www.pyopenssl.org/en/stable/api/crypto.html#x509extension-objects
X509Extensiondocumentation says it takes a "value (bytes) – The value of the extension.", which reads as it if takes the raw bytes of the extension. (The relevant field in X.509 is even calledextnValue.) However, it seems to actually pass it into OpenSSL's ad-hoc string-based config-file syntax for specifying extensions.https://www.pyopenssl.org/en/stable/api/crypto.html#x509extension-objects