This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM6442: Error reading extended section v3_ca" occurs.

Part Number: AM6442

Dear All,

I am trying to create a debug certificate according to the Secure Debug User Guide, but I am having trouble with errors.
https://software-dl.ti.com/tisci/esd/latest/6_topic_user_guides/secure_debug.html#id4
The X509 configuration file is x509template.txt from mcu_plus_sdk_am64x_08_06_00_45.
I used Python 3.11.4 and OpenSSL 1.1.1m 14 Dec 2021.
+++++
openssl req -new -x509 -key custMpk.pem -nodes -outform der -out debug_unlock_cert.der -config x509template.txt -sha512
Error Loading extension section v3_ca
2164:error:2206C064:X509 V3 routines:s2i_ASN1_INTEGER:bn dec2bn error:crypto\x509v3\v3_utl.c:229:
2164:error:0D0B30B4:asn1 encoding routines:asn1_str2type:illegal integer:crypto\asn1\asn1_gen.c:625:string=TEST_CERT_TYPE
2164:error:22074074:X509 V3 routines:v3_generic_extension:extension value error:crypto\x509v3\v3_conf.c:246:value=SEQUENCE:boot_seq
+++++

Best regards,Shinji

  • Hi Shinji-san,

    Have you correctly populated the fields in the X509 debug certificate template according to the TISCI guide?

    Regards,

    Prashant

  • Shinji-san,

    Please note the `x509template.txt` in MCU+ SDK is not specifically meant for Secure Debug. Please refer to the following for the exact certificate template.

    https://software-dl.ti.com/tisci/esd/latest/6_topic_user_guides/secure_debug.html#x509-configuration-template

    You can modify the `x509template.txt` to remove extra extensions keeping only the `swrev` & `debug` extensions. Attaching a reference debug certificate

     [ req ]
     distinguished_name     = req_distinguished_name
     x509_extensions        = v3_ca
     prompt                 = no
    
     dirstring_type = nobmp
    
     [ req_distinguished_name ]
     C                      = US
     ST                     = SC
     L                      = New York
     O                      = Texas Instruments., Inc.
     OU                     = DSP
     CN                     = Albert
     emailAddress           = Albert@gt.ti.com
    
     [ v3_ca ]
    
      basicConstraints = CA:true
      1.3.6.1.4.1.294.1.3=ASN1:SEQUENCE:swrv
      1.3.6.1.4.1.294.1.8=ASN1:SEQUENCE:debug
    
     [ swrv ]
     swrv = INTEGER:1
    
     [ debug ]
     debugUID = FORMAT:HEX,OCT:0000000000000000000000000000000000000000000000000000000000000000
     debugType = INTEGER:0x4
     coreDbgEn = INTEGER:0
     coreDbgSecEn = INTEGER:0
    

    The fields in the `debug` extensions would need to be correctly populated.

    Regards,

    Prashant