Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/network/ssl/qasn1element.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||
2 | - | |||||||||||||
3 | - | |||||||||||||
4 | - | |||||||||||||
5 | typedef QMap<QByteArray, QByteArray> OidNameMap; | - | ||||||||||||
6 | static OidNameMap createOidMap() | - | ||||||||||||
7 | { | - | ||||||||||||
8 | OidNameMap oids; | - | ||||||||||||
9 | - | |||||||||||||
10 | oids.insert(oids.cend(), ([]() -> QByteArray { enum { Size = sizeof("0.9.2342.19200300.100.1.5") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "0.9.2342.19200300.100.1.5" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()), ([]() -> QByteArray { enum { Size = sizeof("favouriteDrink") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "favouriteDrink" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); returnreturn ba; Executed by:
executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()));return ba; Executed by:
| 1 | ||||||||||||
11 | oids.insert(oids.cend(), ([]() -> QByteArray { enum { Size = sizeof("1.2.840.113549.1.9.1") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "1.2.840.113549.1.9.1" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()), ([]() -> QByteArray { enum { Size = sizeof("emailAddress") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "emailAddress" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); returnreturn ba; Executed by:
executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()));return ba; Executed by:
| 1 | ||||||||||||
12 | oids.insert(oids.cend(), ([]() -> QByteArray { enum { Size = sizeof("1.3.6.1.5.5.7.1.1") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "1.3.6.1.5.5.7.1.1" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()), ([]() -> QByteArray { enum { Size = sizeof("authorityInfoAccess") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "authorityInfoAccess" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); returnreturn ba; Executed by:
executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()));return ba; Executed by:
| 1 | ||||||||||||
13 | oids.insert(oids.cend(), ([]() -> QByteArray { enum { Size = sizeof("1.3.6.1.5.5.7.48.1") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "1.3.6.1.5.5.7.48.1" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()), ([]() -> QByteArray { enum { Size = sizeof("OCSP") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "OCSP" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); returnreturn ba; Executed by:
executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()));return ba; Executed by:
| 1 | ||||||||||||
14 | oids.insert(oids.cend(), ([]() -> QByteArray { enum { Size = sizeof("1.3.6.1.5.5.7.48.2") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "1.3.6.1.5.5.7.48.2" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()), ([]() -> QByteArray { enum { Size = sizeof("caIssuers") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "caIssuers" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); returnreturn ba; Executed by:
executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()));return ba; Executed by:
| 1 | ||||||||||||
15 | oids.insert(oids.cend(), ([]() -> QByteArray { enum { Size = sizeof("2.5.29.14") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "2.5.29.14" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()), ([]() -> QByteArray { enum { Size = sizeof("subjectKeyIdentifier") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "subjectKeyIdentifier" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); returnreturn ba; Executed by:
executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()));return ba; Executed by:
| 1 | ||||||||||||
16 | oids.insert(oids.cend(), ([]() -> QByteArray { enum { Size = sizeof("2.5.29.15") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "2.5.29.15" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()), ([]() -> QByteArray { enum { Size = sizeof("keyUsage") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "keyUsage" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); returnreturn ba; Executed by:
executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()));return ba; Executed by:
| 1 | ||||||||||||
17 | oids.insert(oids.cend(), ([]() -> QByteArray { enum { Size = sizeof("2.5.29.17") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "2.5.29.17" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()), ([]() -> QByteArray { enum { Size = sizeof("subjectAltName") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "subjectAltName" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); returnreturn ba; Executed by:
executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()));return ba; Executed by:
| 1 | ||||||||||||
18 | oids.insert(oids.cend(), ([]() -> QByteArray { enum { Size = sizeof("2.5.29.19") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "2.5.29.19" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()), ([]() -> QByteArray { enum { Size = sizeof("basicConstraints") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "basicConstraints" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); returnreturn ba; Executed by:
executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()));return ba; Executed by:
| 1 | ||||||||||||
19 | oids.insert(oids.cend(), ([]() -> QByteArray { enum { Size = sizeof("2.5.29.35") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "2.5.29.35" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()), ([]() -> QByteArray { enum { Size = sizeof("authorityKeyIdentifier") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "authorityKeyIdentifier" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); returnreturn ba; Executed by:
executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()));return ba; Executed by:
| 1 | ||||||||||||
20 | oids.insert(oids.cend(), ([]() -> QByteArray { enum { Size = sizeof("2.5.4.10") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "2.5.4.10" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()), ([]() -> QByteArray { enum { Size = sizeof("O") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "O" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); returnreturn ba; Executed by:
executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()));return ba; Executed by:
| 1 | ||||||||||||
21 | oids.insert(oids.cend(), ([]() -> QByteArray { enum { Size = sizeof("2.5.4.11") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "2.5.4.11" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()), ([]() -> QByteArray { enum { Size = sizeof("OU") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "OU" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); returnreturn ba; Executed by:
executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()));return ba; Executed by:
| 1 | ||||||||||||
22 | oids.insert(oids.cend(), ([]() -> QByteArray { enum { Size = sizeof("2.5.4.12") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "2.5.4.12" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()), ([]() -> QByteArray { enum { Size = sizeof("title") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "title" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); returnreturn ba; Executed by:
executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()));return ba; Executed by:
| 1 | ||||||||||||
23 | oids.insert(oids.cend(), ([]() -> QByteArray { enum { Size = sizeof("2.5.4.13") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "2.5.4.13" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()), ([]() -> QByteArray { enum { Size = sizeof("description") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "description" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); returnreturn ba; Executed by:
executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()));return ba; Executed by:
| 1 | ||||||||||||
24 | oids.insert(oids.cend(), ([]() -> QByteArray { enum { Size = sizeof("2.5.4.17") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "2.5.4.17" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()), ([]() -> QByteArray { enum { Size = sizeof("postalCode") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "postalCode" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); returnreturn ba; Executed by:
executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()));return ba; Executed by:
| 1 | ||||||||||||
25 | oids.insert(oids.cend(), ([]() -> QByteArray { enum { Size = sizeof("2.5.4.3") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "2.5.4.3" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()), ([]() -> QByteArray { enum { Size = sizeof("CN") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "CN" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); returnreturn ba; Executed by:
executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()));return ba; Executed by:
| 1 | ||||||||||||
26 | oids.insert(oids.cend(), ([]() -> QByteArray { enum { Size = sizeof("2.5.4.4") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "2.5.4.4" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()), ([]() -> QByteArray { enum { Size = sizeof("SN") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "SN" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); returnreturn ba; Executed by:
executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()));return ba; Executed by:
| 1 | ||||||||||||
27 | oids.insert(oids.cend(), ([]() -> QByteArray { enum { Size = sizeof("2.5.4.41") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "2.5.4.41" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()), ([]() -> QByteArray { enum { Size = sizeof("name") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "name" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); returnreturn ba; Executed by:
executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()));return ba; Executed by:
| 1 | ||||||||||||
28 | oids.insert(oids.cend(), ([]() -> QByteArray { enum { Size = sizeof("2.5.4.42") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "2.5.4.42" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()), ([]() -> QByteArray { enum { Size = sizeof("GN") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "GN" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); returnreturn ba; Executed by:
executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()));return ba; Executed by:
| 1 | ||||||||||||
29 | oids.insert(oids.cend(), ([]() -> QByteArray { enum { Size = sizeof("2.5.4.43") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "2.5.4.43" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()), ([]() -> QByteArray { enum { Size = sizeof("initials") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "initials" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); returnreturn ba; Executed by:
executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()));return ba; Executed by:
| 1 | ||||||||||||
30 | oids.insert(oids.cend(), ([]() -> QByteArray { enum { Size = sizeof("2.5.4.46") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "2.5.4.46" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()), ([]() -> QByteArray { enum { Size = sizeof("dnQualifier") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "dnQualifier" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); returnreturn ba; Executed by:
executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()));return ba; Executed by:
| 1 | ||||||||||||
31 | oids.insert(oids.cend(), ([]() -> QByteArray { enum { Size = sizeof("2.5.4.5") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "2.5.4.5" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()), ([]() -> QByteArray { enum { Size = sizeof("serialNumber") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "serialNumber" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); returnreturn ba; Executed by:
executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()));return ba; Executed by:
| 1 | ||||||||||||
32 | oids.insert(oids.cend(), ([]() -> QByteArray { enum { Size = sizeof("2.5.4.6") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "2.5.4.6" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()), ([]() -> QByteArray { enum { Size = sizeof("C") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "C" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); returnreturn ba; Executed by:
executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()));return ba; Executed by:
| 1 | ||||||||||||
33 | oids.insert(oids.cend(), ([]() -> QByteArray { enum { Size = sizeof("2.5.4.7") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "2.5.4.7" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()), ([]() -> QByteArray { enum { Size = sizeof("L") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "L" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); returnreturn ba; Executed by:
executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()));return ba; Executed by:
| 1 | ||||||||||||
34 | oids.insert(oids.cend(), ([]() -> QByteArray { enum { Size = sizeof("2.5.4.8") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "2.5.4.8" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()), ([]() -> QByteArray { enum { Size = sizeof("ST") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "ST" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); returnreturn ba; Executed by:
executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()));return ba; Executed by:
| 1 | ||||||||||||
35 | oids.insert(oids.cend(), ([]() -> QByteArray { enum { Size = sizeof("2.5.4.9") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "2.5.4.9" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()), ([]() -> QByteArray { enum { Size = sizeof("street") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "street" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); returnreturn ba; Executed by:
executed 1 time by 1 test: ba;return ba; Executed by:
executed 1 time by 1 test: }()));return ba; Executed by:
| 1 | ||||||||||||
36 | return executed 1 time by 1 test: oids;return oids; Executed by:
executed 1 time by 1 test: return oids; Executed by:
| 1 | ||||||||||||
37 | } | - | ||||||||||||
38 | namespace { namespace Q_QGS_oidNameMap { typedef OidNameMap Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
executed 1 time by 1 test: }guard.store(QtGlobalStatic::Destroyed); Executed by:
executed 1 time by 1 test: }; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type (createOidMap()))) : value (createOidMap()) { guard.store(QtGlobalStatic::Initialized); } } holder; returnend of block Executed by:
executed 2 times by 1 test: &holder.value;return &holder.value; Executed by:
executed 2 times by 1 test: } } } static QGlobalStatic<OidNameMap, Q_QGS_oidNameMap::innerFunction, Q_QGS_oidNameMap::guard> oidNameMap;return &holder.value; Executed by:
| 0-2 | ||||||||||||
39 | - | |||||||||||||
40 | QAsn1Element::QAsn1Element(quint8 type, const QByteArray &value) | - | ||||||||||||
41 | : mType(type) | - | ||||||||||||
42 | , mValue(value) | - | ||||||||||||
43 | { | - | ||||||||||||
44 | } executed 56 times by 1 test: end of block Executed by:
| 56 | ||||||||||||
45 | - | |||||||||||||
46 | bool QAsn1Element::read(QDataStream &stream) | - | ||||||||||||
47 | { | - | ||||||||||||
48 | - | |||||||||||||
49 | quint8 tmpType; | - | ||||||||||||
50 | stream >> tmpType; | - | ||||||||||||
51 | if (!tmpType
| 2-22 | ||||||||||||
52 | return executed 2 times by 1 test: false;return false; Executed by:
executed 2 times by 1 test: return false; Executed by:
| 2 | ||||||||||||
53 | - | |||||||||||||
54 | - | |||||||||||||
55 | qint64 length = 0; | - | ||||||||||||
56 | quint8 first; | - | ||||||||||||
57 | stream >> first; | - | ||||||||||||
58 | if (first & 0x80
| 1-21 | ||||||||||||
59 | - | |||||||||||||
60 | const quint8 bytes = (first & 0x7f); | - | ||||||||||||
61 | if (bytes > 7
| 0-1 | ||||||||||||
62 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||
63 | - | |||||||||||||
64 | quint8 b; | - | ||||||||||||
65 | for (int i = 0; i < bytes
| 1 | ||||||||||||
66 | stream >> b; | - | ||||||||||||
67 | length = (length << 8) | b; | - | ||||||||||||
68 | } executed 1 time by 1 test: end of block Executed by:
| 1 | ||||||||||||
69 | } executed 1 time by 1 test: else {end of block Executed by:
| 1 | ||||||||||||
70 | - | |||||||||||||
71 | length = (first & 0x7f); | - | ||||||||||||
72 | } executed 21 times by 1 test: end of block Executed by:
| 21 | ||||||||||||
73 | - | |||||||||||||
74 | - | |||||||||||||
75 | QByteArray tmpValue; | - | ||||||||||||
76 | tmpValue.resize(length); | - | ||||||||||||
77 | int count = stream.readRawData(tmpValue.data(), tmpValue.size()); | - | ||||||||||||
78 | if (count != length
| 1-21 | ||||||||||||
79 | return executed 1 time by 1 test: false;return false; Executed by:
executed 1 time by 1 test: return false; Executed by:
| 1 | ||||||||||||
80 | - | |||||||||||||
81 | mType = tmpType; | - | ||||||||||||
82 | mValue.swap(tmpValue); | - | ||||||||||||
83 | return executed 21 times by 1 test: true;return true; Executed by:
executed 21 times by 1 test: return true; Executed by:
| 21 | ||||||||||||
84 | } | - | ||||||||||||
85 | - | |||||||||||||
86 | bool QAsn1Element::read(const QByteArray &data) | - | ||||||||||||
87 | { | - | ||||||||||||
88 | QDataStream stream(data); | - | ||||||||||||
89 | return executed 24 times by 1 test: read(stream);return read(stream); Executed by:
executed 24 times by 1 test: return read(stream); Executed by:
| 24 | ||||||||||||
90 | } | - | ||||||||||||
91 | - | |||||||||||||
92 | void QAsn1Element::write(QDataStream &stream) const | - | ||||||||||||
93 | { | - | ||||||||||||
94 | - | |||||||||||||
95 | stream << mType; | - | ||||||||||||
96 | - | |||||||||||||
97 | - | |||||||||||||
98 | qint64 length = mValue.size(); | - | ||||||||||||
99 | if (length >= 128
| 1-7 | ||||||||||||
100 | - | |||||||||||||
101 | quint8 encodedLength = 0x80; | - | ||||||||||||
102 | QByteArray ba; | - | ||||||||||||
103 | while (length
| 1 | ||||||||||||
104 | ba.prepend(quint8((length & 0xff))); | - | ||||||||||||
105 | length >>= 8; | - | ||||||||||||
106 | encodedLength += 1; | - | ||||||||||||
107 | } executed 1 time by 1 test: end of block Executed by:
| 1 | ||||||||||||
108 | stream << encodedLength; | - | ||||||||||||
109 | stream.writeRawData(ba.data(), ba.size()); | - | ||||||||||||
110 | } executed 1 time by 1 test: else {end of block Executed by:
| 1 | ||||||||||||
111 | - | |||||||||||||
112 | stream << quint8(length); | - | ||||||||||||
113 | } executed 7 times by 1 test: end of block Executed by:
| 7 | ||||||||||||
114 | - | |||||||||||||
115 | - | |||||||||||||
116 | stream.writeRawData(mValue.data(), mValue.size()); | - | ||||||||||||
117 | } executed 8 times by 1 test: end of block Executed by:
| 8 | ||||||||||||
118 | - | |||||||||||||
119 | QAsn1Element QAsn1Element::fromBool(bool val) | - | ||||||||||||
120 | { | - | ||||||||||||
121 | return executed 7 times by 1 test: QAsn1Element(QAsn1Element::BooleanType,return QAsn1Element(QAsn1Element::BooleanType, QByteArray(1, val ? 0xff : 0x00)); Executed by:
executed 7 times by 1 test: return QAsn1Element(QAsn1Element::BooleanType, QByteArray(1, val ? 0xff : 0x00)); Executed by:
| 7 | ||||||||||||
122 | QByteArray(1, val ? 0xff : 0x00)); executed 7 times by 1 test: return QAsn1Element(QAsn1Element::BooleanType, QByteArray(1, val ? 0xff : 0x00)); Executed by:
| 7 | ||||||||||||
123 | } | - | ||||||||||||
124 | - | |||||||||||||
125 | QAsn1Element QAsn1Element::fromInteger(unsigned int val) | - | ||||||||||||
126 | { | - | ||||||||||||
127 | QAsn1Element elem(QAsn1Element::IntegerType); | - | ||||||||||||
128 | while (val > 127
| 2-4 | ||||||||||||
129 | elem.mValue.prepend(val & 0xff); | - | ||||||||||||
130 | val >>= 8; | - | ||||||||||||
131 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||
132 | elem.mValue.prepend(val & 0x7f); | - | ||||||||||||
133 | return executed 4 times by 1 test: elem;return elem; Executed by:
executed 4 times by 1 test: return elem; Executed by:
| 4 | ||||||||||||
134 | } | - | ||||||||||||
135 | - | |||||||||||||
136 | QAsn1Element QAsn1Element::fromVector(const QVector<QAsn1Element> &items) | - | ||||||||||||
137 | { | - | ||||||||||||
138 | QAsn1Element seq; | - | ||||||||||||
139 | seq.mType = SequenceType; | - | ||||||||||||
140 | QDataStream stream(&seq.mValue, QIODevice::WriteOnly); | - | ||||||||||||
141 | for (QVector<QAsn1Element>::const_iterator it = items.cbegin(), end = items.cend(); it != end
| 0 | ||||||||||||
142 | it->write(stream); never executed: it->write(stream); | 0 | ||||||||||||
143 | return never executed: seq;return seq; never executed: return seq; | 0 | ||||||||||||
144 | } | - | ||||||||||||
145 | - | |||||||||||||
146 | QAsn1Element QAsn1Element::fromObjectId(const QByteArray &id) | - | ||||||||||||
147 | { | - | ||||||||||||
148 | QAsn1Element elem; | - | ||||||||||||
149 | elem.mType = ObjectIdentifierType; | - | ||||||||||||
150 | const QList<QByteArray> bits = id.split('.'); | - | ||||||||||||
151 | ((!(bits.size() > 2)) ? qt_assert("bits.size() > 2",__FILE__,196) : qt_noop()); | - | ||||||||||||
152 | elem.mValue += quint8((bits[0].toUInt() * 40 + bits[1].toUInt())); | - | ||||||||||||
153 | for (int i = 2; i < bits.size()
| 2-7 | ||||||||||||
154 | char buffer[std::numeric_limits<unsigned int>::digits / 7 + 2]; | - | ||||||||||||
155 | char *pBuffer = buffer + sizeof(buffer); | - | ||||||||||||
156 | *--pBuffer = '\0'; | - | ||||||||||||
157 | unsigned int node = bits[i].toUInt(); | - | ||||||||||||
158 | *--pBuffer = quint8((node & 0x7f)); | - | ||||||||||||
159 | node >>= 7; | - | ||||||||||||
160 | while (node
| 4-7 | ||||||||||||
161 | *--pBuffer = quint8(((node & 0x7f) | 0x80)); | - | ||||||||||||
162 | node >>= 7; | - | ||||||||||||
163 | } executed 4 times by 1 test: end of block Executed by:
| 4 | ||||||||||||
164 | elem.mValue += pBuffer; | - | ||||||||||||
165 | } executed 7 times by 1 test: end of block Executed by:
| 7 | ||||||||||||
166 | return executed 2 times by 1 test: elem;return elem; Executed by:
executed 2 times by 1 test: return elem; Executed by:
| 2 | ||||||||||||
167 | } | - | ||||||||||||
168 | - | |||||||||||||
169 | bool QAsn1Element::toBool(bool *ok) const | - | ||||||||||||
170 | { | - | ||||||||||||
171 | if (*
| 1-3 | ||||||||||||
172 | if (ok
| 0-1 | ||||||||||||
173 | * executed 1 time by 1 test: ok = true;*ok = true; Executed by:
executed 1 time by 1 test: *ok = true; Executed by:
| 1 | ||||||||||||
174 | return executed 1 time by 1 test: true;return true; Executed by:
executed 1 time by 1 test: return true; Executed by:
| 1 | ||||||||||||
175 | } else if (*
| 1-2 | ||||||||||||
176 | if (ok
| 0-1 | ||||||||||||
177 | * executed 1 time by 1 test: ok = true;*ok = true; Executed by:
executed 1 time by 1 test: *ok = true; Executed by:
| 1 | ||||||||||||
178 | return executed 1 time by 1 test: false;return false; Executed by:
executed 1 time by 1 test: return false; Executed by:
| 1 | ||||||||||||
179 | } else { | - | ||||||||||||
180 | if (ok
| 0-2 | ||||||||||||
181 | * executed 2 times by 1 test: ok = false;*ok = false; Executed by:
executed 2 times by 1 test: *ok = false; Executed by:
| 2 | ||||||||||||
182 | return executed 2 times by 1 test: false;return false; Executed by:
executed 2 times by 1 test: return false; Executed by:
| 2 | ||||||||||||
183 | } | - | ||||||||||||
184 | } | - | ||||||||||||
185 | - | |||||||||||||
186 | QDateTime QAsn1Element::toDateTime() const | - | ||||||||||||
187 | { | - | ||||||||||||
188 | if (mValue.endsWith('Z')
| 3-4 | ||||||||||||
189 | if (mType == UtcTimeType
| 1-2 | ||||||||||||
190 | return executed 1 time by 1 test: QDateTime(QDate(2000 + mValue.mid(0, 2).toInt(),return QDateTime(QDate(2000 + mValue.mid(0, 2).toInt(), mValue.mid(2, 2).toInt(), mValue.mid(4, 2).toInt()), QTime(mValue.mid(6, 2).toInt(), mValue.mid(8, 2).toInt(), mValue.mid(10, 2).toInt()), Qt::UTC); Executed by:
executed 1 time by 1 test: return QDateTime(QDate(2000 + mValue.mid(0, 2).toInt(), mValue.mid(2, 2).toInt(), mValue.mid(4, 2).toInt()), QTime(mValue.mid(6, 2).toInt(), mValue.mid(8, 2).toInt(), mValue.mid(10, 2).toInt()), Qt::UTC); Executed by:
| 1 | ||||||||||||
191 | mValue.mid(2, 2).toInt(), executed 1 time by 1 test: return QDateTime(QDate(2000 + mValue.mid(0, 2).toInt(), mValue.mid(2, 2).toInt(), mValue.mid(4, 2).toInt()), QTime(mValue.mid(6, 2).toInt(), mValue.mid(8, 2).toInt(), mValue.mid(10, 2).toInt()), Qt::UTC); Executed by:
| 1 | ||||||||||||
192 | mValue.mid(4, 2).toInt()), executed 1 time by 1 test: return QDateTime(QDate(2000 + mValue.mid(0, 2).toInt(), mValue.mid(2, 2).toInt(), mValue.mid(4, 2).toInt()), QTime(mValue.mid(6, 2).toInt(), mValue.mid(8, 2).toInt(), mValue.mid(10, 2).toInt()), Qt::UTC); Executed by:
| 1 | ||||||||||||
193 | QTime(mValue.mid(6, 2).toInt(), executed 1 time by 1 test: return QDateTime(QDate(2000 + mValue.mid(0, 2).toInt(), mValue.mid(2, 2).toInt(), mValue.mid(4, 2).toInt()), QTime(mValue.mid(6, 2).toInt(), mValue.mid(8, 2).toInt(), mValue.mid(10, 2).toInt()), Qt::UTC); Executed by:
| 1 | ||||||||||||
194 | mValue.mid(8, 2).toInt(), executed 1 time by 1 test: return QDateTime(QDate(2000 + mValue.mid(0, 2).toInt(), mValue.mid(2, 2).toInt(), mValue.mid(4, 2).toInt()), QTime(mValue.mid(6, 2).toInt(), mValue.mid(8, 2).toInt(), mValue.mid(10, 2).toInt()), Qt::UTC); Executed by:
| 1 | ||||||||||||
195 | mValue.mid(10, 2).toInt()), executed 1 time by 1 test: return QDateTime(QDate(2000 + mValue.mid(0, 2).toInt(), mValue.mid(2, 2).toInt(), mValue.mid(4, 2).toInt()), QTime(mValue.mid(6, 2).toInt(), mValue.mid(8, 2).toInt(), mValue.mid(10, 2).toInt()), Qt::UTC); Executed by:
| 1 | ||||||||||||
196 | Qt::UTC); executed 1 time by 1 test: return QDateTime(QDate(2000 + mValue.mid(0, 2).toInt(), mValue.mid(2, 2).toInt(), mValue.mid(4, 2).toInt()), QTime(mValue.mid(6, 2).toInt(), mValue.mid(8, 2).toInt(), mValue.mid(10, 2).toInt()), Qt::UTC); Executed by:
| 1 | ||||||||||||
197 | else if (mType == GeneralizedTimeType
| 1-2 | ||||||||||||
198 | return executed 1 time by 1 test: QDateTime(QDate(mValue.mid(0, 4).toInt(),return QDateTime(QDate(mValue.mid(0, 4).toInt(), mValue.mid(4, 2).toInt(), mValue.mid(6, 2).toInt()), QTime(mValue.mid(8, 2).toInt(), mValue.mid(10, 2).toInt(), mValue.mid(12, 2).toInt()), Qt::UTC); Executed by:
executed 1 time by 1 test: return QDateTime(QDate(mValue.mid(0, 4).toInt(), mValue.mid(4, 2).toInt(), mValue.mid(6, 2).toInt()), QTime(mValue.mid(8, 2).toInt(), mValue.mid(10, 2).toInt(), mValue.mid(12, 2).toInt()), Qt::UTC); Executed by:
| 1 | ||||||||||||
199 | mValue.mid(4, 2).toInt(), executed 1 time by 1 test: return QDateTime(QDate(mValue.mid(0, 4).toInt(), mValue.mid(4, 2).toInt(), mValue.mid(6, 2).toInt()), QTime(mValue.mid(8, 2).toInt(), mValue.mid(10, 2).toInt(), mValue.mid(12, 2).toInt()), Qt::UTC); Executed by:
| 1 | ||||||||||||
200 | mValue.mid(6, 2).toInt()), executed 1 time by 1 test: return QDateTime(QDate(mValue.mid(0, 4).toInt(), mValue.mid(4, 2).toInt(), mValue.mid(6, 2).toInt()), QTime(mValue.mid(8, 2).toInt(), mValue.mid(10, 2).toInt(), mValue.mid(12, 2).toInt()), Qt::UTC); Executed by:
| 1 | ||||||||||||
201 | QTime(mValue.mid(8, 2).toInt(), executed 1 time by 1 test: return QDateTime(QDate(mValue.mid(0, 4).toInt(), mValue.mid(4, 2).toInt(), mValue.mid(6, 2).toInt()), QTime(mValue.mid(8, 2).toInt(), mValue.mid(10, 2).toInt(), mValue.mid(12, 2).toInt()), Qt::UTC); Executed by:
| 1 | ||||||||||||
202 | mValue.mid(10, 2).toInt(), executed 1 time by 1 test: return QDateTime(QDate(mValue.mid(0, 4).toInt(), mValue.mid(4, 2).toInt(), mValue.mid(6, 2).toInt()), QTime(mValue.mid(8, 2).toInt(), mValue.mid(10, 2).toInt(), mValue.mid(12, 2).toInt()), Qt::UTC); Executed by:
| 1 | ||||||||||||
203 | mValue.mid(12, 2).toInt()), executed 1 time by 1 test: return QDateTime(QDate(mValue.mid(0, 4).toInt(), mValue.mid(4, 2).toInt(), mValue.mid(6, 2).toInt()), QTime(mValue.mid(8, 2).toInt(), mValue.mid(10, 2).toInt(), mValue.mid(12, 2).toInt()), Qt::UTC); Executed by:
| 1 | ||||||||||||
204 | Qt::UTC); executed 1 time by 1 test: return QDateTime(QDate(mValue.mid(0, 4).toInt(), mValue.mid(4, 2).toInt(), mValue.mid(6, 2).toInt()), QTime(mValue.mid(8, 2).toInt(), mValue.mid(10, 2).toInt(), mValue.mid(12, 2).toInt()), Qt::UTC); Executed by:
| 1 | ||||||||||||
205 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||
206 | return executed 5 times by 1 test: QDateTime();return QDateTime(); Executed by:
executed 5 times by 1 test: return QDateTime(); Executed by:
| 5 | ||||||||||||
207 | } | - | ||||||||||||
208 | - | |||||||||||||
209 | QMultiMap<QByteArray, QString> QAsn1Element::toInfo() const | - | ||||||||||||
210 | { | - | ||||||||||||
211 | QMultiMap<QByteArray, QString> info; | - | ||||||||||||
212 | QAsn1Element elem; | - | ||||||||||||
213 | QDataStream issuerStream(mValue); | - | ||||||||||||
214 | while (elem.read(issuerStream)
| 0 | ||||||||||||
215 | QAsn1Element issuerElem; | - | ||||||||||||
216 | QDataStream setStream(elem.mValue); | - | ||||||||||||
217 | if (issuerElem.read(setStream)
| 0 | ||||||||||||
218 | QVector<QAsn1Element> elems = issuerElem.toVector(); | - | ||||||||||||
219 | if (elems.size() == 2
| 0 | ||||||||||||
220 | const QByteArray key = elems.front().toObjectName(); | - | ||||||||||||
221 | if (!key.isEmpty()
| 0 | ||||||||||||
222 | info.insert(key, elems.back().toString()); never executed: info.insert(key, elems.back().toString()); | 0 | ||||||||||||
223 | } never executed: end of block | 0 | ||||||||||||
224 | } never executed: end of block | 0 | ||||||||||||
225 | } never executed: end of block | 0 | ||||||||||||
226 | return never executed: info;return info; never executed: return info; | 0 | ||||||||||||
227 | } | - | ||||||||||||
228 | - | |||||||||||||
229 | qint64 QAsn1Element::toInteger(bool *ok) const | - | ||||||||||||
230 | { | - | ||||||||||||
231 | if (mType != QAsn1Element::IntegerType
| 0-4 | ||||||||||||
232 | if (ok
| 0 | ||||||||||||
233 | * never executed: ok = false;*ok = false; never executed: *ok = false; | 0 | ||||||||||||
234 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||
235 | } | - | ||||||||||||
236 | - | |||||||||||||
237 | - | |||||||||||||
238 | if (mValue.at(0) & 0x80
| 0-4 | ||||||||||||
239 | if (ok
| 0 | ||||||||||||
240 | * never executed: ok = false;*ok = false; never executed: *ok = false; | 0 | ||||||||||||
241 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||
242 | } | - | ||||||||||||
243 | - | |||||||||||||
244 | qint64 value = mValue.at(0) & 0x7f; | - | ||||||||||||
245 | for (int i = 1; i < mValue.size()
| 2-4 | ||||||||||||
246 | value = (value << 8) | quint8(mValue.at(i)); executed 2 times by 1 test: value = (value << 8) | quint8(mValue.at(i)); Executed by:
| 2 | ||||||||||||
247 | - | |||||||||||||
248 | if (ok
| 0-4 | ||||||||||||
249 | * executed 4 times by 1 test: ok = true;*ok = true; Executed by:
executed 4 times by 1 test: *ok = true; Executed by:
| 4 | ||||||||||||
250 | return executed 4 times by 1 test: value;return value; Executed by:
executed 4 times by 1 test: return value; Executed by:
| 4 | ||||||||||||
251 | } | - | ||||||||||||
252 | - | |||||||||||||
253 | QVector<QAsn1Element> QAsn1Element::toVector() const | - | ||||||||||||
254 | { | - | ||||||||||||
255 | QVector<QAsn1Element> items; | - | ||||||||||||
256 | if (mType == SequenceType
| 0 | ||||||||||||
257 | QAsn1Element elem; | - | ||||||||||||
258 | QDataStream stream(mValue); | - | ||||||||||||
259 | while (elem.read(stream)
| 0 | ||||||||||||
260 | items << elem; never executed: items << elem; | 0 | ||||||||||||
261 | } never executed: end of block | 0 | ||||||||||||
262 | return never executed: items;return items; never executed: return items; | 0 | ||||||||||||
263 | } | - | ||||||||||||
264 | - | |||||||||||||
265 | QByteArray QAsn1Element::toObjectId() const | - | ||||||||||||
266 | { | - | ||||||||||||
267 | QByteArray key; | - | ||||||||||||
268 | if (mType == ObjectIdentifierType
| 0-6 | ||||||||||||
269 | quint8 b = mValue.at(0); | - | ||||||||||||
270 | key += QByteArray::number(b / 40) + '.' + QByteArray::number (b % 40); | - | ||||||||||||
271 | unsigned int val = 0; | - | ||||||||||||
272 | for (int i = 1; i < mValue.size()
| 6-33 | ||||||||||||
273 | b = mValue.at(i); | - | ||||||||||||
274 | val = (val << 7) | (b & 0x7f); | - | ||||||||||||
275 | if (!(b & 0x80)
| 12-21 | ||||||||||||
276 | key += '.' + QByteArray::number(val); | - | ||||||||||||
277 | val = 0; | - | ||||||||||||
278 | } executed 21 times by 1 test: end of block Executed by:
| 21 | ||||||||||||
279 | } executed 33 times by 1 test: end of block Executed by:
| 33 | ||||||||||||
280 | } executed 6 times by 1 test: end of block Executed by:
| 6 | ||||||||||||
281 | return executed 6 times by 1 test: key;return key; Executed by:
executed 6 times by 1 test: return key; Executed by:
| 6 | ||||||||||||
282 | } | - | ||||||||||||
283 | - | |||||||||||||
284 | QByteArray QAsn1Element::toObjectName() const | - | ||||||||||||
285 | { | - | ||||||||||||
286 | QByteArray key = toObjectId(); | - | ||||||||||||
287 | return executed 2 times by 1 test: oidNameMap->value(key, key);return oidNameMap->value(key, key); Executed by:
executed 2 times by 1 test: return oidNameMap->value(key, key); Executed by:
| 2 | ||||||||||||
288 | } | - | ||||||||||||
289 | - | |||||||||||||
290 | QString QAsn1Element::toString() const | - | ||||||||||||
291 | { | - | ||||||||||||
292 | - | |||||||||||||
293 | if (qstrlen(mValue) < uint(mValue.size())
| 6 | ||||||||||||
294 | return executed 6 times by 1 test: QString();return QString(); Executed by:
executed 6 times by 1 test: return QString(); Executed by:
| 6 | ||||||||||||
295 | - | |||||||||||||
296 | if (mType == PrintableStringType
| 1-5 | ||||||||||||
297 | || mType == Rfc822NameType
| 1-3 | ||||||||||||
298 | || mType == UniformResourceIdentifierType
| 1 | ||||||||||||
299 | return executed 5 times by 1 test: QString::fromLatin1(mValue, mValue.size());return QString::fromLatin1(mValue, mValue.size()); Executed by:
executed 5 times by 1 test: return QString::fromLatin1(mValue, mValue.size()); Executed by:
| 5 | ||||||||||||
300 | if (mType == Utf8StringType
| 0-1 | ||||||||||||
301 | return executed 1 time by 1 test: QString::fromUtf8(mValue, mValue.size());return QString::fromUtf8(mValue, mValue.size()); Executed by:
executed 1 time by 1 test: return QString::fromUtf8(mValue, mValue.size()); Executed by:
| 1 | ||||||||||||
302 | - | |||||||||||||
303 | return never executed: QString();return QString(); never executed: return QString(); | 0 | ||||||||||||
304 | } | - | ||||||||||||
305 | - | |||||||||||||
306 | - | |||||||||||||
Switch to Source code | Preprocessed file |