Skip to content

Commit 44031b5

Browse files
author
Christian Lindig
committed
CP-307865 add unit tests for SHA512
Signed-off-by: Christian Lindig <[email protected]>
1 parent ce0d919 commit 44031b5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

ocaml/gencert/test_lib.ml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ let valid_leaf_certificates =
5050
, "2020-02-01T00:00:00Z"
5151
, `SHA256
5252
)
53+
; ( "Valid, SHA512, matches key"
54+
, "pkey_rsa_2048"
55+
, "2020-02-01T00:00:00Z"
56+
, `SHA512
57+
)
5358
]
5459

5560
(* ( description, leaf_private_key, expected_private_key, time_of_validation,
@@ -80,6 +85,14 @@ let invalid_leaf_certificates =
8085
, server_certificate_key_mismatch
8186
, []
8287
)
88+
; ( "Valid, SHA512, keys do not match"
89+
, "pkey_rsa_2048"
90+
, "pkey_rsa_4096"
91+
, "2020-02-01T00:00:00Z"
92+
, `SHA512
93+
, server_certificate_key_mismatch
94+
, []
95+
)
8396
; ( "Valid, SHA1, matching keys"
8497
, "pkey_rsa_2048"
8598
, "pkey_rsa_2048"

0 commit comments

Comments
 (0)