Skip to content

Commit dadd40b

Browse files
author
Christian Lindig
committed
fixup! CA-404640 XSI-1781 accept in PEM key/cert in any order
Signed-off-by: Christian Lindig <[email protected]>
1 parent 5c61c07 commit dadd40b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ocaml/gencert/pem.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ let pem =
8585
match List.partition (function Key _ -> true | Cert _ -> false) bs with
8686
| [Key k], Cert c :: xs ->
8787
return {private_key= k; host_cert= c; other_certs= List.map strip xs}
88+
| [_], [] ->
89+
fail "PEM is lacking a certificate"
8890
| [], _ ->
8991
fail "PEM is missing a private key"
9092
| _ :: _, _ ->

0 commit comments

Comments
 (0)