Skip to content

openconnect: Make FSID passphrase + empty private key combination work.

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

Merge request reports