| Line | Source | Count |
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | | - |
| 6 | | - |
| 7 | | - |
| 8 | | - |
| 9 | void QSslKeyPrivate::clear(bool deep) | - |
| 10 | { | - |
| 11 | isNull = true; | - |
| 12 | if (!QSslSocket::supportsSsl()| TRUE | never evaluated | | FALSE | evaluated 28524 times by 25 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
- tst_networkselftest - unknown status
- tst_qabstractnetworkcache - unknown status
- tst_qhttpnetworkconnection - unknown status
- tst_qnetworkaccessmanager_and_qprogressdialog - unknown status
- tst_qnetworkdiskcache - unknown status
- tst_qnetworkproxyfactory - unknown status
- tst_qsslcertificate - unknown status
- tst_qsslellipticcurve - unknown status
- tst_qsslerror - unknown status
- tst_qsslkey - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlinputsource - unknown status
- tst_spdy - unknown status
|
) | 0-28524 |
| 13 | return; never executed: return; | 0 |
| 14 | if (algorithm == QSsl::Rsa| TRUE | evaluated 760 times by 4 testsEvaluated by:- tst_QNetworkReply
- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
- tst_qsslsocket - unknown status
| | FALSE | evaluated 27764 times by 25 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
- tst_networkselftest - unknown status
- tst_qabstractnetworkcache - unknown status
- tst_qhttpnetworkconnection - unknown status
- tst_qnetworkaccessmanager_and_qprogressdialog - unknown status
- tst_qnetworkdiskcache - unknown status
- tst_qnetworkproxyfactory - unknown status
- tst_qsslcertificate - unknown status
- tst_qsslellipticcurve - unknown status
- tst_qsslerror - unknown status
- tst_qsslkey - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlinputsource - unknown status
- tst_spdy - unknown status
|
&& rsa| TRUE | evaluated 374 times by 4 testsEvaluated by:- tst_QNetworkReply
- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
- tst_qsslsocket - unknown status
| | FALSE | evaluated 386 times by 4 testsEvaluated by:- tst_QNetworkReply
- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
- tst_qsslsocket - unknown status
|
) { | 374-27764 |
| 15 | if (deep| TRUE | evaluated 374 times by 4 testsEvaluated by:- tst_QNetworkReply
- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
- tst_qsslsocket - unknown status
| | FALSE | never evaluated |
) | 0-374 |
| 16 | q_RSA_free(rsa);executed 374 times by 4 tests: q_RSA_free(rsa);Executed by:- tst_QNetworkReply
- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
- tst_qsslsocket - unknown status
| 374 |
| 17 | rsa = 0; | - |
| 18 | }executed 374 times by 4 tests: end of blockExecuted by:- tst_QNetworkReply
- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
- tst_qsslsocket - unknown status
| 374 |
| 19 | if (algorithm == QSsl::Dsa| TRUE | evaluated 323 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| | FALSE | evaluated 28201 times by 25 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
- tst_networkselftest - unknown status
- tst_qabstractnetworkcache - unknown status
- tst_qhttpnetworkconnection - unknown status
- tst_qnetworkaccessmanager_and_qprogressdialog - unknown status
- tst_qnetworkdiskcache - unknown status
- tst_qnetworkproxyfactory - unknown status
- tst_qsslcertificate - unknown status
- tst_qsslellipticcurve - unknown status
- tst_qsslerror - unknown status
- tst_qsslkey - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlinputsource - unknown status
- tst_spdy - unknown status
|
&& dsa| TRUE | evaluated 162 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| | FALSE | evaluated 161 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
|
) { | 161-28201 |
| 20 | if (deep| TRUE | evaluated 162 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| | FALSE | never evaluated |
) | 0-162 |
| 21 | q_DSA_free(dsa);executed 162 times by 2 tests: q_DSA_free(dsa);Executed by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| 162 |
| 22 | dsa = 0; | - |
| 23 | }executed 162 times by 2 tests: end of blockExecuted by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| 162 |
| 24 | | - |
| 25 | if (algorithm == QSsl::Ec| TRUE | evaluated 243 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| | FALSE | evaluated 28281 times by 25 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
- tst_networkselftest - unknown status
- tst_qabstractnetworkcache - unknown status
- tst_qhttpnetworkconnection - unknown status
- tst_qnetworkaccessmanager_and_qprogressdialog - unknown status
- tst_qnetworkdiskcache - unknown status
- tst_qnetworkproxyfactory - unknown status
- tst_qsslcertificate - unknown status
- tst_qsslellipticcurve - unknown status
- tst_qsslerror - unknown status
- tst_qsslkey - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlinputsource - unknown status
- tst_spdy - unknown status
|
&& ec| TRUE | evaluated 122 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| | FALSE | evaluated 121 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
|
) { | 121-28281 |
| 26 | if (deep| TRUE | evaluated 122 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| | FALSE | never evaluated |
) | 0-122 |
| 27 | q_EC_KEY_free(ec);executed 122 times by 2 tests: q_EC_KEY_free(ec);Executed by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| 122 |
| 28 | ec = 0; | - |
| 29 | }executed 122 times by 2 tests: end of blockExecuted by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| 122 |
| 30 | | - |
| 31 | if (algorithm == QSsl::Opaque| TRUE | evaluated 27198 times by 25 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
- tst_networkselftest - unknown status
- tst_qabstractnetworkcache - unknown status
- tst_qhttpnetworkconnection - unknown status
- tst_qnetworkaccessmanager_and_qprogressdialog - unknown status
- tst_qnetworkdiskcache - unknown status
- tst_qnetworkproxyfactory - unknown status
- tst_qsslcertificate - unknown status
- tst_qsslellipticcurve - unknown status
- tst_qsslerror - unknown status
- tst_qsslkey - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlinputsource - unknown status
- tst_spdy - unknown status
| | FALSE | evaluated 1326 times by 4 testsEvaluated by:- tst_QNetworkReply
- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
- tst_qsslsocket - unknown status
|
&& opaque| TRUE | evaluated 5 times by 1 testEvaluated by:- tst_qsslsocket - unknown status
| | FALSE | evaluated 27193 times by 25 testsEvaluated by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
- tst_networkselftest - unknown status
- tst_qabstractnetworkcache - unknown status
- tst_qhttpnetworkconnection - unknown status
- tst_qnetworkaccessmanager_and_qprogressdialog - unknown status
- tst_qnetworkdiskcache - unknown status
- tst_qnetworkproxyfactory - unknown status
- tst_qsslcertificate - unknown status
- tst_qsslellipticcurve - unknown status
- tst_qsslerror - unknown status
- tst_qsslkey - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlinputsource - unknown status
- tst_spdy - unknown status
|
) { | 5-27198 |
| 32 | if (deep| TRUE | evaluated 5 times by 1 testEvaluated by:- tst_qsslsocket - unknown status
| | FALSE | never evaluated |
) | 0-5 |
| 33 | q_EVP_PKEY_free(opaque);executed 5 times by 1 test: q_EVP_PKEY_free(opaque);Executed by:- tst_qsslsocket - unknown status
| 5 |
| 34 | opaque = 0; | - |
| 35 | }executed 5 times by 1 test: end of blockExecuted by:- tst_qsslsocket - unknown status
| 5 |
| 36 | }executed 28524 times by 25 tests: end of blockExecuted by:- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
- tst_networkselftest - unknown status
- tst_qabstractnetworkcache - unknown status
- tst_qhttpnetworkconnection - unknown status
- tst_qnetworkaccessmanager_and_qprogressdialog - unknown status
- tst_qnetworkdiskcache - unknown status
- tst_qnetworkproxyfactory - unknown status
- tst_qsslcertificate - unknown status
- tst_qsslellipticcurve - unknown status
- tst_qsslerror - unknown status
- tst_qsslkey - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
- tst_qxmlinputsource - unknown status
- tst_spdy - unknown status
| 28524 |
| 37 | | - |
| 38 | bool QSslKeyPrivate::fromEVP_PKEY(EVP_PKEY *pkey) | - |
| 39 | { | - |
| 40 | if (pkey->type == 6| TRUE | evaluated 1 time by 1 testEvaluated by:- tst_qsslcertificate - unknown status
| | FALSE | never evaluated |
) { | 0-1 |
| 41 | isNull = false; | - |
| 42 | algorithm = QSsl::Rsa; | - |
| 43 | type = QSsl::PrivateKey; | - |
| 44 | | - |
| 45 | rsa = q_RSA_new(); | - |
| 46 | memcpy(rsa, q_EVP_PKEY_get1_RSA(pkey), sizeof(RSA)); | - |
| 47 | | - |
| 48 | returnexecuted 1 time by 1 test: return true;Executed by:- tst_qsslcertificate - unknown status
true;executed 1 time by 1 test: return true;Executed by:- tst_qsslcertificate - unknown status
| 1 |
| 49 | } | - |
| 50 | else if (pkey->type == 116| TRUE | never evaluated | | FALSE | never evaluated |
) { | 0 |
| 51 | isNull = false; | - |
| 52 | algorithm = QSsl::Dsa; | - |
| 53 | type = QSsl::PrivateKey; | - |
| 54 | | - |
| 55 | dsa = q_DSA_new(); | - |
| 56 | memcpy(dsa, q_EVP_PKEY_get1_DSA(pkey), sizeof(DSA)); | - |
| 57 | | - |
| 58 | return never executed: return true; true;never executed: return true; | 0 |
| 59 | } | - |
| 60 | | - |
| 61 | else if (pkey->type == 408| TRUE | never evaluated | | FALSE | never evaluated |
) { | 0 |
| 62 | isNull = false; | - |
| 63 | algorithm = QSsl::Ec; | - |
| 64 | type = QSsl::PrivateKey; | - |
| 65 | ec = q_EC_KEY_dup(q_EVP_PKEY_get1_EC_KEY(pkey)); | - |
| 66 | | - |
| 67 | return never executed: return true; true;never executed: return true; | 0 |
| 68 | } | - |
| 69 | | - |
| 70 | else { | - |
| 71 | | - |
| 72 | | - |
| 73 | | - |
| 74 | | - |
| 75 | } never executed: end of block | 0 |
| 76 | | - |
| 77 | return never executed: return false; false;never executed: return false; | 0 |
| 78 | } | - |
| 79 | | - |
| 80 | void QSslKeyPrivate::decodeDer(const QByteArray &der, bool deepClear) | - |
| 81 | { | - |
| 82 | QMap<QByteArray, QByteArray> headers; | - |
| 83 | decodePem(pemFromDer(der, headers), QByteArray(), deepClear); | - |
| 84 | }executed 226 times by 2 tests: end of blockExecuted by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| 226 |
| 85 | | - |
| 86 | void QSslKeyPrivate::decodePem(const QByteArray &pem, const QByteArray &passPhrase, | - |
| 87 | bool deepClear) | - |
| 88 | { | - |
| 89 | if (pem.isEmpty()| TRUE | never evaluated | | FALSE | evaluated 659 times by 4 testsEvaluated by:- tst_QNetworkReply
- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
- tst_qsslsocket - unknown status
|
) | 0-659 |
| 90 | return; never executed: return; | 0 |
| 91 | | - |
| 92 | clear(deepClear); | - |
| 93 | | - |
| 94 | if (!QSslSocket::supportsSsl()| TRUE | never evaluated | | FALSE | evaluated 659 times by 4 testsEvaluated by:- tst_QNetworkReply
- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
- tst_qsslsocket - unknown status
|
) | 0-659 |
| 95 | return; never executed: return; | 0 |
| 96 | | - |
| 97 | BIO *bio = q_BIO_new_mem_buf(const_cast<char *>(pem.data()), pem.size()); | - |
| 98 | if (!bio| TRUE | never evaluated | | FALSE | evaluated 659 times by 4 testsEvaluated by:- tst_QNetworkReply
- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
- tst_qsslsocket - unknown status
|
) | 0-659 |
| 99 | return; never executed: return; | 0 |
| 100 | | - |
| 101 | void *phrase = const_cast<char *>(passPhrase.constData()); | - |
| 102 | | - |
| 103 | if (algorithm == QSsl::Rsa| TRUE | evaluated 377 times by 4 testsEvaluated by:- tst_QNetworkReply
- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
- tst_qsslsocket - unknown status
| | FALSE | evaluated 282 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
|
) { | 282-377 |
| 104 | RSA *result = (| TRUE | evaluated 116 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| | FALSE | evaluated 261 times by 4 testsEvaluated by:- tst_QNetworkReply
- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
- tst_qsslsocket - unknown status
|
type == QSsl::PublicKey)| TRUE | evaluated 116 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| | FALSE | evaluated 261 times by 4 testsEvaluated by:- tst_QNetworkReply
- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
- tst_qsslsocket - unknown status
|
| 116-261 |
| 105 | ? q_PEM_read_bio_RSA_PUBKEY(bio, &rsa, 0, phrase) | - |
| 106 | : q_PEM_read_bio_RSAPrivateKey(bio, &rsa, 0, phrase); | - |
| 107 | if (rsa| TRUE | evaluated 368 times by 4 testsEvaluated by:- tst_QNetworkReply
- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
- tst_qsslsocket - unknown status
| | FALSE | evaluated 9 times by 1 testEvaluated by:- tst_qsslkey - unknown status
|
&& rsa == result| TRUE | evaluated 368 times by 4 testsEvaluated by:- tst_QNetworkReply
- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
- tst_qsslsocket - unknown status
| | FALSE | never evaluated |
) | 0-368 |
| 108 | isNull = false;executed 368 times by 4 tests: isNull = false;Executed by:- tst_QNetworkReply
- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
- tst_qsslsocket - unknown status
| 368 |
| 109 | }executed 377 times by 4 tests: end of blockExecuted by:- tst_QNetworkReply
- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
- tst_qsslsocket - unknown status
else if (algorithm == QSsl::Dsa| TRUE | evaluated 161 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| | FALSE | evaluated 121 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
|
) { | 121-377 |
| 110 | DSA *result = (| TRUE | evaluated 65 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| | FALSE | evaluated 96 times by 1 testEvaluated by:- tst_qsslkey - unknown status
|
type == QSsl::PublicKey)| TRUE | evaluated 65 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| | FALSE | evaluated 96 times by 1 testEvaluated by:- tst_qsslkey - unknown status
|
| 65-96 |
| 111 | ? q_PEM_read_bio_DSA_PUBKEY(bio, &dsa, 0, phrase) | - |
| 112 | : q_PEM_read_bio_DSAPrivateKey(bio, &dsa, 0, phrase); | - |
| 113 | if (dsa| TRUE | evaluated 161 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| | FALSE | never evaluated |
&& dsa == result| TRUE | evaluated 161 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| | FALSE | never evaluated |
) | 0-161 |
| 114 | isNull = false;executed 161 times by 2 tests: isNull = false;Executed by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| 161 |
| 115 | | - |
| 116 | }executed 161 times by 2 tests: end of blockExecuted by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
else if (algorithm == QSsl::Ec| TRUE | evaluated 121 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| | FALSE | never evaluated |
) { | 0-161 |
| 117 | EC_KEY *result = (| TRUE | evaluated 49 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| | FALSE | evaluated 72 times by 1 testEvaluated by:- tst_qsslkey - unknown status
|
type == QSsl::PublicKey)| TRUE | evaluated 49 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| | FALSE | evaluated 72 times by 1 testEvaluated by:- tst_qsslkey - unknown status
|
| 49-72 |
| 118 | ? q_PEM_read_bio_EC_PUBKEY(bio, &ec, 0, phrase) | - |
| 119 | : q_PEM_read_bio_ECPrivateKey(bio, &ec, 0, phrase); | - |
| 120 | if (ec| TRUE | evaluated 121 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| | FALSE | never evaluated |
&& ec == result| TRUE | evaluated 121 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| | FALSE | never evaluated |
) | 0-121 |
| 121 | isNull = false;executed 121 times by 2 tests: isNull = false;Executed by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| 121 |
| 122 | | - |
| 123 | }executed 121 times by 2 tests: end of blockExecuted by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| 121 |
| 124 | | - |
| 125 | q_BIO_free(bio); | - |
| 126 | }executed 659 times by 4 tests: end of blockExecuted by:- tst_QNetworkReply
- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
- tst_qsslsocket - unknown status
| 659 |
| 127 | | - |
| 128 | int QSslKeyPrivate::length() const | - |
| 129 | { | - |
| 130 | if (isNull| TRUE | evaluated 1 time by 1 testEvaluated by:- tst_qsslkey - unknown status
| | FALSE | evaluated 744 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
|
|| algorithm == QSsl::Opaque| TRUE | never evaluated | | FALSE | evaluated 744 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
|
) | 0-744 |
| 131 | returnexecuted 1 time by 1 test: return -1;Executed by:- tst_qsslkey - unknown status
-1;executed 1 time by 1 test: return -1;Executed by:- tst_qsslkey - unknown status
| 1 |
| 132 | | - |
| 133 | switch (algorithm) { | - |
| 134 | caseexecuted 376 times by 2 tests: case QSsl::Rsa:Executed by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
QSsl::Rsa:executed 376 times by 2 tests: case QSsl::Rsa:Executed by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
returnexecuted 376 times by 2 tests: return q_BN_num_bits(rsa->n);Executed by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
q_BN_num_bits(rsa->n);executed 376 times by 2 tests: return q_BN_num_bits(rsa->n);Executed by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| 376 |
| 135 | caseexecuted 210 times by 2 tests: case QSsl::Dsa:Executed by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
QSsl::Dsa:executed 210 times by 2 tests: case QSsl::Dsa:Executed by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
returnexecuted 210 times by 2 tests: return q_BN_num_bits(dsa->p);Executed by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
q_BN_num_bits(dsa->p);executed 210 times by 2 tests: return q_BN_num_bits(dsa->p);Executed by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| 210 |
| 136 | | - |
| 137 | caseexecuted 158 times by 2 tests: case QSsl::Ec:Executed by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
QSsl::Ec:executed 158 times by 2 tests: case QSsl::Ec:Executed by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
returnexecuted 158 times by 2 tests: return q_EC_GROUP_get_degree(q_EC_KEY_get0_group(ec));Executed by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
q_EC_GROUP_get_degree(q_EC_KEY_get0_group(ec));executed 158 times by 2 tests: return q_EC_GROUP_get_degree(q_EC_KEY_get0_group(ec));Executed by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| 158 |
| 138 | | - |
| 139 | default never executed: default: :never executed: default: returnnever executed: return -1; -1;never executed: return -1; | 0 |
| 140 | } | - |
| 141 | } | - |
| 142 | | - |
| 143 | QByteArray QSslKeyPrivate::toPem(const QByteArray &passPhrase) const | - |
| 144 | { | - |
| 145 | if (!QSslSocket::supportsSsl()| TRUE | never evaluated | | FALSE | evaluated 1752 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
|
|| isNull| TRUE | never evaluated | | FALSE | evaluated 1752 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
|
|| algorithm == QSsl::Opaque| TRUE | never evaluated | | FALSE | evaluated 1752 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
|
) | 0-1752 |
| 146 | return never executed: return QByteArray(); QByteArray();never executed: return QByteArray(); | 0 |
| 147 | | - |
| 148 | BIO *bio = q_BIO_new(q_BIO_s_mem()); | - |
| 149 | if (!bio| TRUE | never evaluated | | FALSE | evaluated 1752 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
|
) | 0-1752 |
| 150 | return never executed: return QByteArray(); QByteArray();never executed: return QByteArray(); | 0 |
| 151 | | - |
| 152 | bool fail = false; | - |
| 153 | | - |
| 154 | if (algorithm == QSsl::Rsa| TRUE | evaluated 880 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| | FALSE | evaluated 872 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
|
) { | 872-880 |
| 155 | if (type == QSsl::PublicKey| TRUE | evaluated 416 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| | FALSE | evaluated 464 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
|
) { | 416-464 |
| 156 | if (!q_PEM_write_bio_RSA_PUBKEY(bio, rsa)| TRUE | never evaluated | | FALSE | evaluated 416 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
|
) | 0-416 |
| 157 | fail = true; never executed: fail = true; | 0 |
| 158 | }executed 416 times by 2 tests: end of blockExecuted by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
else { | 416 |
| 159 | if (!q_PEM_write_bio_RSAPrivateKey(| TRUE | never evaluated | | FALSE | evaluated 464 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
|
| 0-464 |
| 160 | bio, rsa,| TRUE | never evaluated | | FALSE | evaluated 464 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
|
| 0-464 |
| 161 | | 0-464 |
| 162 | passPhrase.isEmpty() ? (const EVP_CIPHER *)0 : q_EVP_des_ede3_cbc(),| TRUE | never evaluated | | FALSE | evaluated 464 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
|
| 0-464 |
| 163 | const_cast<uchar *>((const uchar *)passPhrase.data()), passPhrase.size(), 0, 0)| TRUE | never evaluated | | FALSE | evaluated 464 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
|
) { | 0-464 |
| 164 | fail = true; | - |
| 165 | } never executed: end of block | 0 |
| 166 | }executed 464 times by 2 tests: end of blockExecuted by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| 464 |
| 167 | } else if (algorithm == QSsl::Dsa| TRUE | evaluated 498 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| | FALSE | evaluated 374 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
|
) { | 374-498 |
| 168 | if (type == QSsl::PublicKey| TRUE | evaluated 234 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| | FALSE | evaluated 264 times by 1 testEvaluated by:- tst_qsslkey - unknown status
|
) { | 234-264 |
| 169 | if (!q_PEM_write_bio_DSA_PUBKEY(bio, dsa)| TRUE | never evaluated | | FALSE | evaluated 234 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
|
) | 0-234 |
| 170 | fail = true; never executed: fail = true; | 0 |
| 171 | }executed 234 times by 2 tests: end of blockExecuted by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
else { | 234 |
| 172 | if (!q_PEM_write_bio_DSAPrivateKey(| TRUE | never evaluated | | FALSE | evaluated 264 times by 1 testEvaluated by:- tst_qsslkey - unknown status
|
| 0-264 |
| 173 | bio, dsa,| TRUE | never evaluated | | FALSE | evaluated 264 times by 1 testEvaluated by:- tst_qsslkey - unknown status
|
| 0-264 |
| 174 | | 0-264 |
| 175 | passPhrase.isEmpty() ? (const EVP_CIPHER *)0 : q_EVP_des_ede3_cbc(),| TRUE | never evaluated | | FALSE | evaluated 264 times by 1 testEvaluated by:- tst_qsslkey - unknown status
|
| 0-264 |
| 176 | const_cast<uchar *>((const uchar *)passPhrase.data()), passPhrase.size(), 0, 0)| TRUE | never evaluated | | FALSE | evaluated 264 times by 1 testEvaluated by:- tst_qsslkey - unknown status
|
) { | 0-264 |
| 177 | fail = true; | - |
| 178 | } never executed: end of block | 0 |
| 179 | }executed 264 times by 1 test: end of blockExecuted by:- tst_qsslkey - unknown status
| 264 |
| 180 | | - |
| 181 | } else if (algorithm == QSsl::Ec| TRUE | evaluated 374 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| | FALSE | never evaluated |
) { | 0-374 |
| 182 | if (type == QSsl::PublicKey| TRUE | evaluated 176 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| | FALSE | evaluated 198 times by 1 testEvaluated by:- tst_qsslkey - unknown status
|
) { | 176-198 |
| 183 | if (!q_PEM_write_bio_EC_PUBKEY(bio, ec)| TRUE | never evaluated | | FALSE | evaluated 176 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
|
) | 0-176 |
| 184 | fail = true; never executed: fail = true; | 0 |
| 185 | }executed 176 times by 2 tests: end of blockExecuted by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
else { | 176 |
| 186 | if (!q_PEM_write_bio_ECPrivateKey(| TRUE | never evaluated | | FALSE | evaluated 198 times by 1 testEvaluated by:- tst_qsslkey - unknown status
|
| 0-198 |
| 187 | bio, ec,| TRUE | never evaluated | | FALSE | evaluated 198 times by 1 testEvaluated by:- tst_qsslkey - unknown status
|
| 0-198 |
| 188 | | 0-198 |
| 189 | passPhrase.isEmpty() ? (const EVP_CIPHER *)0 : q_EVP_des_ede3_cbc(),| TRUE | never evaluated | | FALSE | evaluated 198 times by 1 testEvaluated by:- tst_qsslkey - unknown status
|
| 0-198 |
| 190 | const_cast<uchar *>((const uchar *)passPhrase.data()), passPhrase.size(), 0, 0)| TRUE | never evaluated | | FALSE | evaluated 198 times by 1 testEvaluated by:- tst_qsslkey - unknown status
|
) { | 0-198 |
| 191 | fail = true; | - |
| 192 | } never executed: end of block | 0 |
| 193 | }executed 198 times by 1 test: end of blockExecuted by:- tst_qsslkey - unknown status
| 198 |
| 194 | | - |
| 195 | } else { | - |
| 196 | fail = true; | - |
| 197 | } never executed: end of block | 0 |
| 198 | | - |
| 199 | QByteArray pem; | - |
| 200 | if (!fail| TRUE | evaluated 1752 times by 2 testsEvaluated by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| | FALSE | never evaluated |
) { | 0-1752 |
| 201 | char *data; | - |
| 202 | long size = (int)q_BIO_ctrl(bio,3,0,(char *)&data); | - |
| 203 | pem = QByteArray(data, size); | - |
| 204 | }executed 1752 times by 2 tests: end of blockExecuted by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| 1752 |
| 205 | q_BIO_free(bio); | - |
| 206 | returnexecuted 1752 times by 2 tests: return pem;Executed by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
pem;executed 1752 times by 2 tests: return pem;Executed by:- tst_qsslcertificate - unknown status
- tst_qsslkey - unknown status
| 1752 |
| 207 | } | - |
| 208 | | - |
| 209 | Qt::HANDLE QSslKeyPrivate::handle() const | - |
| 210 | { | - |
| 211 | switch (algorithm) { | - |
| 212 | caseexecuted 4 times by 1 test: case QSsl::Opaque:Executed by:- tst_qsslsocket - unknown status
QSsl::Opaque:executed 4 times by 1 test: case QSsl::Opaque:Executed by:- tst_qsslsocket - unknown status
| 4 |
| 213 | returnexecuted 4 times by 1 test: return Qt::HANDLE(opaque);Executed by:- tst_qsslsocket - unknown status
Qt::HANDLE(opaque);executed 4 times by 1 test: return Qt::HANDLE(opaque);Executed by:- tst_qsslsocket - unknown status
| 4 |
| 214 | caseexecuted 89 times by 2 tests: case QSsl::Rsa:Executed by:- tst_QNetworkReply
- tst_qsslsocket - unknown status
QSsl::Rsa:executed 89 times by 2 tests: case QSsl::Rsa:Executed by:- tst_QNetworkReply
- tst_qsslsocket - unknown status
| 89 |
| 215 | returnexecuted 89 times by 2 tests: return Qt::HANDLE(rsa);Executed by:- tst_QNetworkReply
- tst_qsslsocket - unknown status
Qt::HANDLE(rsa);executed 89 times by 2 tests: return Qt::HANDLE(rsa);Executed by:- tst_QNetworkReply
- tst_qsslsocket - unknown status
| 89 |
| 216 | case never executed: case QSsl::Dsa: QSsl::Dsa:never executed: case QSsl::Dsa: | 0 |
| 217 | return never executed: return Qt::HANDLE(dsa); Qt::HANDLE(dsa);never executed: return Qt::HANDLE(dsa); | 0 |
| 218 | | - |
| 219 | case never executed: case QSsl::Ec: QSsl::Ec:never executed: case QSsl::Ec: | 0 |
| 220 | return never executed: return Qt::HANDLE(ec); Qt::HANDLE(ec);never executed: return Qt::HANDLE(ec); | 0 |
| 221 | | - |
| 222 | default never executed: default: :never executed: default: | 0 |
| 223 | return never executed: return Qt::HANDLE(__null); Qt::HANDLE(__null);never executed: return Qt::HANDLE(__null); | 0 |
| 224 | } | - |
| 225 | } | - |
| 226 | | - |
| 227 | static QByteArray doCrypt(QSslKeyPrivate::Cipher cipher, const QByteArray &data, const QByteArray &key, const QByteArray &iv, int enc) | - |
| 228 | { | - |
| 229 | EVP_CIPHER_CTX ctx; | - |
| 230 | const EVP_CIPHER* type = 0; | - |
| 231 | int i = 0, len = 0; | - |
| 232 | | - |
| 233 | switch (cipher) { | - |
| 234 | caseexecuted 18 times by 1 test: case QSslKeyPrivate::DesCbc:Executed by:- tst_qsslkey - unknown status
QSslKeyPrivate::DesCbc:executed 18 times by 1 test: case QSslKeyPrivate::DesCbc:Executed by:- tst_qsslkey - unknown status
| 18 |
| 235 | type = q_EVP_des_cbc(); | - |
| 236 | break;executed 18 times by 1 test: break;Executed by:- tst_qsslkey - unknown status
| 18 |
| 237 | caseexecuted 4 times by 1 test: case QSslKeyPrivate::DesEde3Cbc:Executed by:- tst_qsslkey - unknown status
QSslKeyPrivate::DesEde3Cbc:executed 4 times by 1 test: case QSslKeyPrivate::DesEde3Cbc:Executed by:- tst_qsslkey - unknown status
| 4 |
| 238 | type = q_EVP_des_ede3_cbc(); | - |
| 239 | break;executed 4 times by 1 test: break;Executed by:- tst_qsslkey - unknown status
| 4 |
| 240 | caseexecuted 12 times by 1 test: case QSslKeyPrivate::Rc2Cbc:Executed by:- tst_qsslkey - unknown status
QSslKeyPrivate::Rc2Cbc:executed 12 times by 1 test: case QSslKeyPrivate::Rc2Cbc:Executed by:- tst_qsslkey - unknown status
| 12 |
| 241 | type = q_EVP_rc2_cbc(); | - |
| 242 | break;executed 12 times by 1 test: break;Executed by:- tst_qsslkey - unknown status
| 12 |
| 243 | } | - |
| 244 | | - |
| 245 | QByteArray output; | - |
| 246 | output.resize(data.size() + 32); | - |
| 247 | q_EVP_CIPHER_CTX_init(&ctx); | - |
| 248 | q_EVP_CipherInit(&ctx, type, __null, __null, enc); | - |
| 249 | q_EVP_CIPHER_CTX_set_key_length(&ctx, key.size()); | - |
| 250 | if (cipher == QSslKeyPrivate::Rc2Cbc| TRUE | evaluated 12 times by 1 testEvaluated by:- tst_qsslkey - unknown status
| | FALSE | evaluated 22 times by 1 testEvaluated by:- tst_qsslkey - unknown status
|
) | 12-22 |
| 251 | q_EVP_CIPHER_CTX_ctrl(&ctx, 0x3, 8 * key.size(), __null);executed 12 times by 1 test: q_EVP_CIPHER_CTX_ctrl(&ctx, 0x3, 8 * key.size(), __null);Executed by:- tst_qsslkey - unknown status
| 12 |
| 252 | q_EVP_CipherInit(&ctx, __null, | - |
| 253 | reinterpret_cast<const unsigned char *>(key.constData()), | - |
| 254 | reinterpret_cast<const unsigned char *>(iv.constData()), enc); | - |
| 255 | q_EVP_CipherUpdate(&ctx, | - |
| 256 | reinterpret_cast<unsigned char *>(output.data()), &len, | - |
| 257 | reinterpret_cast<const unsigned char *>(data.constData()), data.size()); | - |
| 258 | q_EVP_CipherFinal(&ctx, | - |
| 259 | reinterpret_cast<unsigned char *>(output.data()) + len, &i); | - |
| 260 | len += i; | - |
| 261 | q_EVP_CIPHER_CTX_cleanup(&ctx); | - |
| 262 | | - |
| 263 | returnexecuted 34 times by 1 test: return output.left(len);Executed by:- tst_qsslkey - unknown status
output.left(len);executed 34 times by 1 test: return output.left(len);Executed by:- tst_qsslkey - unknown status
| 34 |
| 264 | } | - |
| 265 | | - |
| 266 | QByteArray QSslKeyPrivate::decrypt(Cipher cipher, const QByteArray &data, const QByteArray &key, const QByteArray &iv) | - |
| 267 | { | - |
| 268 | returnexecuted 17 times by 1 test: return doCrypt(cipher, data, key, iv, 0);Executed by:- tst_qsslkey - unknown status
doCrypt(cipher, data, key, iv, 0);executed 17 times by 1 test: return doCrypt(cipher, data, key, iv, 0);Executed by:- tst_qsslkey - unknown status
| 17 |
| 269 | } | - |
| 270 | | - |
| 271 | QByteArray QSslKeyPrivate::encrypt(Cipher cipher, const QByteArray &data, const QByteArray &key, const QByteArray &iv) | - |
| 272 | { | - |
| 273 | returnexecuted 17 times by 1 test: return doCrypt(cipher, data, key, iv, 1);Executed by:- tst_qsslkey - unknown status
doCrypt(cipher, data, key, iv, 1);executed 17 times by 1 test: return doCrypt(cipher, data, key, iv, 1);Executed by:- tst_qsslkey - unknown status
| 17 |
| 274 | } | - |
| 275 | | - |
| 276 | | - |
| | |