albatross tls: re-allow root in leaf certificate (i.e. root) to fix log and info commands via tls

this is an interaction of 057dbbf147 (allow multiple labels in leaf certificates) and a579a8e143 (print root as "." instead of "")
This commit is contained in:
Hannes Mehnert 2019-11-11 22:30:53 +01:00
parent ff067255b0
commit 13e731b78e
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ let read fd =
let rec loop () =
Vmm_tls_lwt.read_tls fd >>= function
| Error `Eof ->
Logs.warn (fun m -> m "eof from server");
Logs.debug (fun m -> m "eof from server");
Lwt.return (Ok ())
| Error _ -> Lwt.return (Error (`Msg ("read failure")))
| Ok wire ->

View File

@ -80,7 +80,7 @@ let handle chain =
name rest >>= fun name' ->
(* and subject common name of leaf certificate -- allowing dots in CN -- as postfix *)
(cert_name leaf >>= function
| None -> Ok name'
| None | Some "." -> Ok name'
| Some x ->
Vmm_core.Name.of_string x >>| fun post ->
Vmm_core.Name.concat name' post) >>= fun name ->