Congratulations to our 2022 Qt Champions!

How to get information about the client certificate?

  • I have code:
    @QSslSocket * serverSocket = new QSslSocket();
    if(serverSocket->waitForEncrypted()) {

    In this case I use a const key and certificate. I would like to receive information about the client's certificate and install it on the basis of different keys and certificates for the connection.

    In the documentation, I found that there is a method serverSocket->peerCertificate(). But I can not get information about the client certificate with this method. Help please.

Log in to reply