• D
    ui: convert VNC server to use QCryptoTLSSession · 3e305e4a
    Daniel P. Berrange 提交于
    Switch VNC server over to using the QCryptoTLSSession object
    for the TLS session. This removes the direct use of gnutls
    from the VNC server code. It also removes most knowledge
    about TLS certificate handling from the VNC server code.
    This has the nice effect that all the CONFIG_VNC_TLS
    conditionals go away and the user gets an actual error
    message when requesting TLS instead of it being silently
    ignored.
    
    With this change, the existing configuration options for
    enabling TLS with -vnc are deprecated.
    
    Old syntax for anon-DH credentials:
    
      -vnc hostname:0,tls
    
    New syntax:
    
      -object tls-creds-anon,id=tls0,endpoint=server \
      -vnc hostname:0,tls-creds=tls0
    
    Old syntax for x509 credentials, no client certs:
    
      -vnc hostname:0,tls,x509=/path/to/certs
    
    New syntax:
    
      -object tls-creds-x509,id=tls0,dir=/path/to/certs,endpoint=server,verify-peer=no \
      -vnc hostname:0,tls-creds=tls0
    
    Old syntax for x509 credentials, requiring client certs:
    
      -vnc hostname:0,tls,x509verify=/path/to/certs
    
    New syntax:
    
      -object tls-creds-x509,id=tls0,dir=/path/to/certs,endpoint=server,verify-peer=yes \
      -vnc hostname:0,tls-creds=tls0
    
    This aligns VNC with the way TLS credentials are to be
    configured in the future for chardev, nbd and migration
    backends. It also has the benefit that the same TLS
    credentials can be shared across multiple VNC server
    instances, if desired.
    
    If someone uses the deprecated syntax, it will internally
    result in the creation of a 'tls-creds' object with an ID
    based on the VNC server ID. This allows backwards compat
    with the CLI syntax, while still deleting all the original
    TLS code from the VNC server.
    Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
    3e305e4a
qemu-options.hx 138.3 KB