mirror of
https://github.com/cuberite/polarssl.git
synced 2025-10-03 10:34:16 -04:00
Add negative test cases for OID parsing
Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
parent
376e8df9d6
commit
e91cbcfb2c
@ -131,3 +131,30 @@ oid_from_numeric_string:"2.49.0.0.826.0":0:"81010000863A00"
|
|||||||
|
|
||||||
OID from numeric string - multi-byte first subidentifier
|
OID from numeric string - multi-byte first subidentifier
|
||||||
oid_from_numeric_string:"2.999":0:"8837"
|
oid_from_numeric_string:"2.999":0:"8837"
|
||||||
|
|
||||||
|
OID from numeric string - empty string input
|
||||||
|
oid_from_numeric_string:"":MBEDTLS_ERR_ASN1_INVALID_DATA:""
|
||||||
|
|
||||||
|
OID from numeric string - first component not a number
|
||||||
|
oid_from_numeric_string:"abc.1.2":MBEDTLS_ERR_ASN1_INVALID_DATA:""
|
||||||
|
|
||||||
|
OID from numeric string - second component not a number
|
||||||
|
oid_from_numeric_string:"1.abc.2":MBEDTLS_ERR_ASN1_INVALID_DATA:""
|
||||||
|
|
||||||
|
OID from numeric string - first component too large
|
||||||
|
oid_from_numeric_string:"3.1":MBEDTLS_ERR_ASN1_INVALID_DATA:""
|
||||||
|
|
||||||
|
OID from numeric string - first component < 2, second > 39
|
||||||
|
oid_from_numeric_string:"1.40":MBEDTLS_ERR_ASN1_INVALID_DATA:""
|
||||||
|
|
||||||
|
OID from numeric string - third component not a number
|
||||||
|
oid_from_numeric_string:"1.2.abc":MBEDTLS_ERR_ASN1_INVALID_DATA:""
|
||||||
|
|
||||||
|
OID from numeric string - non-'.' separator between first and second
|
||||||
|
oid_from_numeric_string:"1/2.3.4":MBEDTLS_ERR_ASN1_INVALID_DATA:""
|
||||||
|
|
||||||
|
OID from numeric string - non-'.' separator between second and third
|
||||||
|
oid_from_numeric_string:"1.2/3.4":MBEDTLS_ERR_ASN1_INVALID_DATA:""
|
||||||
|
|
||||||
|
OID from numeric string - non-'.' separator between third and fourth
|
||||||
|
oid_from_numeric_string:"1.2.3/4":MBEDTLS_ERR_ASN1_INVALID_DATA:""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user