| Line | Source Code | Coverage |
|---|
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | | - |
| 6 | class QSslErrorPrivate | - |
| 7 | { | - |
| 8 | public: | - |
| 9 | QSslError::SslError error; | - |
| 10 | QSslCertificate certificate; | - |
| 11 | }; | - |
| 12 | QSslError::QSslError() | - |
| 13 | : d(new QSslErrorPrivate) | - |
| 14 | { | - |
| 15 | d->error = QSslError::NoError; | - |
| 16 | d->certificate = QSslCertificate(); | - |
| 17 | } executed: }Execution Count:98 | 98 |
| 18 | | - |
| 19 | | - |
| 20 | | - |
| 21 | | - |
| 22 | | - |
| 23 | | - |
| 24 | QSslError::QSslError(SslError error) | - |
| 25 | : d(new QSslErrorPrivate) | - |
| 26 | { | - |
| 27 | d->error = error; | - |
| 28 | d->certificate = QSslCertificate(); | - |
| 29 | } executed: }Execution Count:4 | 4 |
| 30 | | - |
| 31 | | - |
| 32 | | - |
| 33 | | - |
| 34 | | - |
| 35 | | - |
| 36 | | - |
| 37 | QSslError::QSslError(SslError error, const QSslCertificate &certificate) | - |
| 38 | : d(new QSslErrorPrivate) | - |
| 39 | { | - |
| 40 | d->error = error; | - |
| 41 | d->certificate = certificate; | - |
| 42 | } executed: }Execution Count:108 | 108 |
| 43 | | - |
| 44 | | - |
| 45 | | - |
| 46 | | - |
| 47 | QSslError::QSslError(const QSslError &other) | - |
| 48 | : d(new QSslErrorPrivate) | - |
| 49 | { | - |
| 50 | *d.data() = *other.d.data(); | - |
| 51 | } executed: }Execution Count:81 | 81 |
| 52 | | - |
| 53 | | - |
| 54 | | - |
| 55 | | - |
| 56 | QSslError::~QSslError() | - |
| 57 | { | - |
| 58 | } | - |
| 59 | | - |
| 60 | | - |
| 61 | | - |
| 62 | | - |
| 63 | | - |
| 64 | | - |
| 65 | QSslError &QSslError::operator=(const QSslError &other) | - |
| 66 | { | - |
| 67 | *d.data() = *other.d.data(); | - |
| 68 | return *this; executed: return *this;Execution Count:97 | 97 |
| 69 | } | - |
| 70 | bool QSslError::operator==(const QSslError &other) const | - |
| 71 | { | - |
| 72 | return d->error == other.d->error | 18 |
| 73 | && d->certificate == other.d->certificate; executed: return d->error == other.d->error && d->certificate == other.d->certificate;Execution Count:18 | 18 |
| 74 | } | - |
| 75 | QSslError::SslError QSslError::error() const | - |
| 76 | { | - |
| 77 | return d->error; executed: return d->error;Execution Count:1 | 1 |
| 78 | } | - |
| 79 | | - |
| 80 | | - |
| 81 | | - |
| 82 | | - |
| 83 | | - |
| 84 | | - |
| 85 | QString QSslError::errorString() const | - |
| 86 | { | - |
| 87 | QString errStr; | - |
| 88 | switch (d->error) { | - |
| 89 | case NoError: | - |
| 90 | errStr = QSslSocket::tr("No error"); | - |
| 91 | break; | 0 |
| 92 | case UnableToGetIssuerCertificate: | - |
| 93 | errStr = QSslSocket::tr("The issuer certificate could not be found"); | - |
| 94 | break; | 0 |
| 95 | case UnableToDecryptCertificateSignature: | - |
| 96 | errStr = QSslSocket::tr("The certificate signature could not be decrypted"); | - |
| 97 | break; | 0 |
| 98 | case UnableToDecodeIssuerPublicKey: | - |
| 99 | errStr = QSslSocket::tr("The public key in the certificate could not be read"); | - |
| 100 | break; | 0 |
| 101 | case CertificateSignatureFailed: | - |
| 102 | errStr = QSslSocket::tr("The signature of the certificate is invalid"); | - |
| 103 | break; | 0 |
| 104 | case CertificateNotYetValid: | - |
| 105 | errStr = QSslSocket::tr("The certificate is not yet valid"); | - |
| 106 | break; | 0 |
| 107 | case CertificateExpired: | - |
| 108 | errStr = QSslSocket::tr("The certificate has expired"); | - |
| 109 | break; executed: break;Execution Count:2 | 2 |
| 110 | case InvalidNotBeforeField: | - |
| 111 | errStr = QSslSocket::tr("The certificate's notBefore field contains an invalid time"); | - |
| 112 | break; | 0 |
| 113 | case InvalidNotAfterField: | - |
| 114 | errStr = QSslSocket::tr("The certificate's notAfter field contains an invalid time"); | - |
| 115 | break; | 0 |
| 116 | case SelfSignedCertificate: | - |
| 117 | errStr = QSslSocket::tr("The certificate is self-signed, and untrusted"); | - |
| 118 | break; executed: break;Execution Count:11 | 11 |
| 119 | case SelfSignedCertificateInChain: | - |
| 120 | errStr = QSslSocket::tr("The root certificate of the certificate chain is self-signed, and untrusted"); | - |
| 121 | break; | 0 |
| 122 | case UnableToGetLocalIssuerCertificate: | - |
| 123 | errStr = QSslSocket::tr("The issuer certificate of a locally looked up certificate could not be found"); | - |
| 124 | break; executed: break;Execution Count:2 | 2 |
| 125 | case UnableToVerifyFirstCertificate: | - |
| 126 | errStr = QSslSocket::tr("No certificates could be verified"); | - |
| 127 | break; executed: break;Execution Count:2 | 2 |
| 128 | case InvalidCaCertificate: | - |
| 129 | errStr = QSslSocket::tr("One of the CA certificates is invalid"); | - |
| 130 | break; executed: break;Execution Count:1 | 1 |
| 131 | case PathLengthExceeded: | - |
| 132 | errStr = QSslSocket::tr("The basicConstraints path length parameter has been exceeded"); | - |
| 133 | break; | 0 |
| 134 | case InvalidPurpose: | - |
| 135 | errStr = QSslSocket::tr("The supplied certificate is unsuitable for this purpose"); | - |
| 136 | break; | 0 |
| 137 | case CertificateUntrusted: | - |
| 138 | errStr = QSslSocket::tr("The root CA certificate is not trusted for this purpose"); | - |
| 139 | break; | 0 |
| 140 | case CertificateRejected: | - |
| 141 | errStr = QSslSocket::tr("The root CA certificate is marked to reject the specified purpose"); | - |
| 142 | break; | 0 |
| 143 | case SubjectIssuerMismatch: | - |
| 144 | errStr = QSslSocket::tr("The current candidate issuer certificate was rejected because its" | - |
| 145 | " subject name did not match the issuer name of the current certificate"); | - |
| 146 | break; | 0 |
| 147 | case AuthorityIssuerSerialNumberMismatch: | - |
| 148 | errStr = QSslSocket::tr("The current candidate issuer certificate was rejected because" | - |
| 149 | " its issuer name and serial number was present and did not match the" | - |
| 150 | " authority key identifier of the current certificate"); | - |
| 151 | break; | 0 |
| 152 | case NoPeerCertificate: | - |
| 153 | errStr = QSslSocket::tr("The peer did not present any certificate"); | - |
| 154 | break; | 0 |
| 155 | case HostNameMismatch: | - |
| 156 | errStr = QSslSocket::tr("The host name did not match any of the valid hosts" | - |
| 157 | " for this certificate"); | - |
| 158 | break; executed: break;Execution Count:1 | 1 |
| 159 | case NoSslSupport: | - |
| 160 | break; | 0 |
| 161 | case CertificateBlacklisted: | - |
| 162 | errStr = QSslSocket::tr("The peer certificate is blacklisted"); | - |
| 163 | break; | 0 |
| 164 | default: | - |
| 165 | errStr = QSslSocket::tr("Unknown error"); | - |
| 166 | break; executed: break;Execution Count:2 | 2 |
| 167 | } | - |
| 168 | | - |
| 169 | return errStr; executed: return errStr;Execution Count:21 | 21 |
| 170 | } | - |
| 171 | | - |
| 172 | | - |
| 173 | | - |
| 174 | | - |
| 175 | | - |
| 176 | | - |
| 177 | | - |
| 178 | QSslCertificate QSslError::certificate() const | - |
| 179 | { | - |
| 180 | return d->certificate; never executed: return d->certificate; | 0 |
| 181 | } | - |
| 182 | | - |
| 183 | | - |
| 184 | | - |
| 185 | QDebug operator<<(QDebug debug, const QSslError &error) | - |
| 186 | { | - |
| 187 | debug << error.errorString(); | - |
| 188 | return debug; executed: return debug;Execution Count:4 | 4 |
| 189 | } | - |
| 190 | QDebug operator<<(QDebug debug, const QSslError::SslError &error) | - |
| 191 | { | - |
| 192 | debug << QSslError(error).errorString(); | - |
| 193 | return debug; never executed: return debug; | 0 |
| 194 | } | - |
| 195 | | - |
| 196 | | - |
| 197 | | - |
| 198 | | - |
| | |