mbedtls/tests
Jerry Yu 59f392cd4d upgrade server9-bad-saltlen.crt
Upgrade scripts
```python
import subprocess
from asn1crypto import pem, x509,core

output_filename="server9-bad-saltlen.crt"
tmp_filename="server9-bad-saltlen.crt.tmp"
tmp1_filename="server9-bad-saltlen.crt.tmp1"

subprocess.check_call(rf''' openssl x509 -req -extfile server5.crt.openssl.v3_ext \
        -passin "pass:PolarSSLTest" -CA test-ca.crt -CAkey test-ca.key \
        -set_serial 24 -days 3650 \
        -sigopt rsa_padding_mode:pss -sigopt rsa_pss_saltlen:max \
        -sigopt rsa_mgf1_md:sha256 -sha256 \
        -in server9.csr -out {output_filename}
''',shell=True)

with open(output_filename,'rb') as f:
    _,_,der_bytes=pem.unarmor(f.read())
    target_certificate=x509.Certificate.load(der_bytes)

with open(tmp_filename,'wb') as f:
    f.write(target_certificate['tbs_certificate'].dump())

subprocess.check_call(rf'openssl dgst -sign test-ca.key -passin "pass:PolarSSLTest" \
                        -sigopt rsa_padding_mode:pss -sigopt rsa_pss_saltlen:32 \
                        -sigopt rsa_mgf1_md:sha256 -out {tmp1_filename} {tmp_filename}',
                        shell=True)

with open(tmp1_filename,'rb') as f:
    signature_value= core.OctetBitString(f.read())

with open(output_filename,'wb') as f:
    target_certificate['signature_value']=signature_value
    f.write(pem.armor('CERTIFICATE',target_certificate.dump()))
```

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-07-04 17:30:21 +08:00
..
.jenkins
configs Explicitly disable all DTLS options in tls13-only.h 2023-03-01 19:49:58 +01:00
data_files upgrade server9-bad-saltlen.crt 2023-07-04 17:30:21 +08:00
docker/bionic Point to docker images used in the CI 2022-12-15 10:08:26 +01:00
git-scripts Fix typographical errors in .md files found by cspell 2022-07-29 13:44:01 +01:00
include Merge pull request #7627 from mprse/ffdh_tls13_v2 2023-07-03 10:12:33 +02:00
opt-testcases Change ffdh testing strategy 2023-06-28 13:31:38 +02:00
scripts Merge pull request #7851 from daverodgman/fix-unused-aes 2023-07-03 16:49:00 +01:00
src Merge pull request #7627 from mprse/ffdh_tls13_v2 2023-07-03 10:12:33 +02:00
suites Merge pull request #7702 from silabs-Kusumit/PBKDF2_out_of_range_input_cost 2023-07-03 09:58:22 +01:00
.gitignore Ignore *.o everywhere 2023-05-12 13:58:05 +02:00
CMakeLists.txt Fix build errors in CMake 2023-03-13 19:20:42 +08:00
compat-in-docker.sh Use OPENSSL everywhere, not OPENSSL_CMD 2022-12-19 11:42:12 +01:00
compat.sh Update some comments 2023-02-23 16:03:56 +08:00
context-info.sh
Descriptions.txt
make-in-docker.sh Point to docker images used in the CI 2022-12-15 10:08:26 +01:00
Makefile Fix build errors in CMake 2023-03-13 19:20:42 +08:00
ssl-opt-in-docker.sh Use OPENSSL everywhere, not OPENSSL_CMD 2022-12-19 11:42:12 +01:00
ssl-opt.sh Change ffdh testing strategy 2023-06-28 13:31:38 +02:00