From 7fa88a49d43addde4a3dc0855d805ad2bc38e083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Brudn=C3=BD?= Date: Mon, 21 Jun 2021 10:56:19 +0200 Subject: [PATCH] esp32s2: update copyright notice in signature test --- .../test/digital_signature_test_cases_4096.h | 9 +++++++-- .../test/gen_digital_signature_tests.py | 12 +++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) 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)