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

View file

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