diff --git a/components/esp_hw_support/test/digital_signature_test_cases_4096.h b/components/esp_hw_support/test/digital_signature_test_cases_4096.h index 1aa62760ba..af7705e22e 100644 --- a/components/esp_hw_support/test/digital_signature_test_cases_4096.h +++ b/components/esp_hw_support/test/digital_signature_test_cases_4096.h @@ -1,5 +1,10 @@ -/* File generated by gen_digital_signature_tests.py */ - +/* + * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + * + * File generated by gen_digital_signature_tests.py + */ #define NUM_HMAC_KEYS 3 static const uint8_t test_hmac_keys[NUM_HMAC_KEYS][32] = { diff --git a/components/esp_hw_support/test/gen_digital_signature_tests.py b/components/esp_hw_support/test/gen_digital_signature_tests.py index d9ceee5476..75682db418 100644 --- a/components/esp_hw_support/test/gen_digital_signature_tests.py +++ b/components/esp_hw_support/test/gen_digital_signature_tests.py @@ -1,5 +1,8 @@ #!/usr/bin/env python3 +# SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD +# SPDX-License-Identifier: Apache-2.0 +import datetime import hashlib import hmac import os @@ -52,7 +55,14 @@ hmac_keys = [os.urandom(32) for x in range(NUM_HMAC_KEYS)] messages = [random.randrange(0, 1 << 4096) for x in range(NUM_MESSAGES)] with open('digital_signature_test_cases.h', 'w') as f: - f.write('/* File generated by gen_digital_signature_tests.py */\n\n') + f.write('/*\n') + year = datetime.datetime.now().year + f.write(' * SPDX-FileCopyrightText: {year} Espressif Systems (Shanghai) CO LTD\n'.format(year=year)) + f.write(' *\n') + f.write(' * SPDX-License-Identifier: Apache-2.0\n') + f.write(' *\n') + f.write(' * File generated by gen_digital_signature_tests.py\n') + f.write(' */\n') # Write out HMAC keys f.write('#define NUM_HMAC_KEYS %d\n\n' % NUM_HMAC_KEYS)