File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1491,7 +1491,7 @@ let install_server_certificate ~__context ~host ~certificate ~private_key
14911491 replace_host_certificate ~__context ~type': `host ~host write_cert_fs
14921492
14931493let _new_host_cert ~dbg ~path : X509.Certificate. t =
1494- let name , ip =
1494+ let ip_as_string , ip =
14951495 match Networking_info. get_management_ip_addr ~dbg with
14961496 | None ->
14971497 let msg = Printf. sprintf " %s: failed to get management IP" __LOC__ in
@@ -1501,8 +1501,9 @@ let _new_host_cert ~dbg ~path : X509.Certificate.t =
15011501 ip
15021502 in
15031503 let dns_names = Networking_info. dns_names () in
1504+ let cn = match dns_names with [] -> ip_as_string | dns :: _ -> dns in
15041505 let ips = [ip] in
1505- Gencertlib.Selfcert. host ~name ~dns_names ~ips path
1506+ Gencertlib.Selfcert. host ~name: cn ~dns_names ~ips path
15061507
15071508let reset_server_certificate ~__context ~host =
15081509 let dbg = Context. string_of_task __context in
You can’t perform that action at this time.
0 commit comments