| 589 | |
| 590 | |
| 591 | def configure_libvirt_tls(tls_enabled=False, cfo=None): |
| 592 | save = False |
| 593 | if not cfo: |
| 594 | cfo = configFileOps("/etc/libvirt/qemu.conf") |
| 595 | save = True |
| 596 | |
| 597 | if tls_enabled: |
| 598 | cfo.addEntry("vnc_tls", "1") |
| 599 | cfo.addEntry("vnc_tls_x509_verify", "1") |
| 600 | cfo.addEntry("vnc_tls_x509_cert_dir", "\"/etc/pki/libvirt-vnc\"") |
| 601 | else: |
| 602 | cfo.addEntry("vnc_tls", "0") |
| 603 | |
| 604 | if save: |
| 605 | cfo.save() |
| 606 | |
| 607 | def configureLibvirtConfig(tls_enabled = True, cfg = None): |
| 608 | cfo = configFileOps("/etc/libvirt/libvirtd.conf", cfg) |