Skip to content

Instantly share code, notes, and snippets.

@qknight
Created November 26, 2014 13:50
Show Gist options
  • Save qknight/7ec790524f0092d11755 to your computer and use it in GitHub Desktop.
Save qknight/7ec790524f0092d11755 to your computer and use it in GitHub Desktop.
QList<QSslCertificate> newCaList = QSslSocket::systemCaCertificates();
QFile certFile ( "/home/joachim/Desktop/projects/mirall/server.crt" );
Q_ASSERT ( certFile.open ( QIODevice::ReadOnly ) );
QSslCertificate cert ( &certFile, QSsl::Pem );
newCaList.push_back ( cert );
QSslSocket::setDefaultCaCertificates ( newCaList );
qDebug() << "============== BEGIN complete list of all CAs aaa============";
foreach ( QSslCertificate c, QSslSocket::systemCaCertificates() )
qDebug() << __FUNCTION__ << " fluxi23 " << c;
qDebug() << "============== END complete list of all CAs aaa============";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment