-#if 0
- /* Later ... */
- if (key && !x509) {
- qscCert = QSslCertificate(key);
- if (! qscCert.isNull()) {
- logthis("Using certificate from key.");
- }
- }
-
- if (! qscCert.isNull()) {
- QSsl::KeyAlgorithm alg = qscCert.publicKey().algorithm();
- /* Fetch algorith from cert */
- if (! key.isEmpty()) {
- /* get key */
- qskKey = QSslKey(key, alg, QSsl::Pem, QSsl::PrivateKey, pass);
- if (qskKey.isNull()) {
- logthis("Failed to parse key.");
- }
- }
-
- if (! crt.isEmpty() && qskKey.isNull()) {
- /* get key from certificate */
- qskKey = QSslKey(crt, alg, QSsl::Pem, QSsl::PrivateKey, pass);
- if (! qskKey.isNull()) {
- logthis("Using key from certificate.");
- }
- }