Commit graph

4 commits

Author SHA1 Message Date
Manuel Pégourié-Gonnard d7d0b0118c Add test case for root with max_pathlen=0
This was already working but not tested so far

(Test case from previous commit still failing.)

Test certificates generated with:

programs/pkey/gen_key type=ec ec_curve=secp256r1 filename=cert91.key
programs/pkey/gen_key type=ec ec_curve=secp256r1 filename=cert92.key

programs/x509/cert_write serial=91 output_file=cert91.crt is_ca=1 \
    issuer_key=cert91.key issuer_name="CN=Root 9,O=mbed TLS,C=UK" \
    selfsign=1 max_pathlen=0
programs/x509/cert_write serial=92 output_file=cert92.crt \
    issuer_key=cert91.key issuer_name="CN=Root 9,O=mbed TLS,C=UK" \
    subject_key=cert92.key subject_name="CN=EE 92,O=mbed TLS,C=UK"
2015-12-03 09:49:57 +01:00
Manuel Pégourié-Gonnard cec3289659 Add test case for first intermediate max_pathlen=0
!!! This test case is currently failing !!!
(See fix in next-next commit.)

Test certificates generated with the following script:
(using mbed TLS 2.2 as 1.2 does not hove those programs)

programs/pkey/gen_key type=rsa filename=cert81.key
programs/pkey/gen_key type=rsa filename=cert82.key
programs/pkey/gen_key type=rsa filename=cert83.key

programs/x509/cert_write serial=81 output_file=cert81.crt is_ca=1 \
    issuer_key=cert81.key issuer_name="CN=Root 8,O=mbed TLS,C=UK" \
    selfsign=1
programs/x509/cert_write serial=82 output_file=cert82.crt is_ca=1 \
    issuer_key=cert81.key issuer_name="CN=Root 8,O=mbed TLS,C=UK" \
    subject_key=cert82.key subject_name="CN=Int 82,O=mbed TLS,C=UK" \
    max_pathlen=0
programs/x509/cert_write serial=83 output_file=cert83.crt \
    issuer_key=cert82.key issuer_name="CN=Int 82,O=mbed TLS,C=UK" \
    subject_key=cert83.key subject_name="CN=EE 83,O=mbed TLS,C=UK"
2015-12-02 12:04:49 +01:00
Manuel Pégourié-Gonnard ab003740b4 Additional corner cases for testing pathlen constrains
backport of 3d98a7e
2015-11-02 06:10:24 +09:00
Manuel Pégourié-Gonnard 03ae1bc3f2 Added test case for pathlen constrains in intermediate certificates 2015-11-02 06:09:57 +09:00