• Raphael Kubo da Costa's avatar
    openconnect: Make FSID passphrase + empty private key combination work. · a76f4d4b
    Raphael Kubo da Costa authored
    It should be possible to usen FSID-protected key passphrase with a user
    certificate and no private key.
    
    This was not working as expected because we were always calling
    openconnect_set_client_cert() with QByteArray::data(). The latter will pass
    an empty string rather than nullptr if it is empty, which can be the case
    for `key` if it is not set. This causes openconnect_set_client_cert() to use
    that empty string rather than handle the null argument case, and we would be
    unexpectedly prompted for a key password when trying to connect.
    
    Avoid running into this by explicitly passing `nullptr` when we have an
    empty `key`.
    
    BUG: 443770
    a76f4d4b