OpenCoverage

qasn1element.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/network/ssl/qasn1element.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5typedef QMap<QByteArray, QByteArray> OidNameMap;-
6static 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: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()), ([]() -> 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); return
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()));
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: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()), ([]() -> 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); return
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()));
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: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()), ([]() -> 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); return
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()));
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: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()), ([]() -> 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); return
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()));
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: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()), ([]() -> 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); return
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()));
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: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()), ([]() -> 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); return
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()));
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: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()), ([]() -> 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); return
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()));
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: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()), ([]() -> 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); return
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()));
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: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()), ([]() -> 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); return
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()));
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: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()), ([]() -> 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); return
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()));
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: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()), ([]() -> 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); return
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()));
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: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()), ([]() -> 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); return
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()));
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: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()), ([]() -> 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); return
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()));
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: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()), ([]() -> 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); return
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()));
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: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()), ([]() -> 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); return
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()));
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: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()), ([]() -> 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); return
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()));
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: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()), ([]() -> 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); return
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()));
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: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()), ([]() -> 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); return
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()));
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: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()), ([]() -> 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); return
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()));
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: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()), ([]() -> 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); return
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()));
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: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()), ([]() -> 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); return
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()));
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: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()), ([]() -> 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); return
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()));
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: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()), ([]() -> 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); return
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()));
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: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()), ([]() -> 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); return
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()));
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: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()), ([]() -> 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); return
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()));
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: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()), ([]() -> 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); return
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
ba;
executed 1 time by 1 test: return ba;
Executed by:
  • tst_qasn1element - unknown status
}()));
1
36 return
executed 1 time by 1 test: return oids;
Executed by:
  • tst_qasn1element - unknown status
oids;
executed 1 time by 1 test: return oids;
Executed by:
  • tst_qasn1element - unknown status
1
37}-
38namespace { 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
guard.load() =...c::InitializedDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEnever evaluated
) guard.store(QtGlobalStatic::Destroyed);
executed 1 time by 1 test: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_qasn1element - unknown status
}
executed 1 time by 1 test: end of block
Executed by:
  • tst_qasn1element - unknown status
}; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type (createOidMap()))) : value (createOidMap()) { guard.store(QtGlobalStatic::Initialized); } } holder; return
executed 2 times by 1 test: return &holder.value;
Executed by:
  • tst_qasn1element - unknown status
&holder.value;
executed 2 times by 1 test: return &holder.value;
Executed by:
  • tst_qasn1element - unknown status
} } } static QGlobalStatic<OidNameMap, Q_QGS_oidNameMap::innerFunction, Q_QGS_oidNameMap::guard> oidNameMap;
0-2
39-
40QAsn1Element::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:
  • tst_qasn1element - unknown status
56
45-
46bool QAsn1Element::read(QDataStream &stream)-
47{-
48-
49 quint8 tmpType;-
50 stream >> tmpType;-
51 if (!tmpType
!tmpTypeDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEevaluated 22 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
)
2-22
52 return
executed 2 times by 1 test: return false;
Executed by:
  • tst_qasn1element - unknown status
false;
executed 2 times by 1 test: return false;
Executed by:
  • tst_qasn1element - unknown status
2
53-
54-
55 qint64 length = 0;-
56 quint8 first;-
57 stream >> first;-
58 if (first & 0x80
first & 0x80Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEevaluated 21 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
) {
1-21
59-
60 const quint8 bytes = (first & 0x7f);-
61 if (bytes > 7
bytes > 7Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
)
0-1
62 return
never executed: return false;
false;
never executed: return false;
0
63-
64 quint8 b;-
65 for (int i = 0; i < bytes
i < bytesDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
; i++) {
1
66 stream >> b;-
67 length = (length << 8) | b;-
68 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_qasn1element - unknown status
1
69 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_qasn1element - unknown status
else {
1
70-
71 length = (first & 0x7f);-
72 }
executed 21 times by 1 test: end of block
Executed by:
  • tst_qasn1element - unknown status
21
73-
74-
75 QByteArray tmpValue;-
76 tmpValue.resize(length);-
77 int count = stream.readRawData(tmpValue.data(), tmpValue.size());-
78 if (count != length
count != lengthDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEevaluated 21 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
)
1-21
79 return
executed 1 time by 1 test: return false;
Executed by:
  • tst_qasn1element - unknown status
false;
executed 1 time by 1 test: return false;
Executed by:
  • tst_qasn1element - unknown status
1
80-
81 mType = tmpType;-
82 mValue.swap(tmpValue);-
83 return
executed 21 times by 1 test: return true;
Executed by:
  • tst_qasn1element - unknown status
true;
executed 21 times by 1 test: return true;
Executed by:
  • tst_qasn1element - unknown status
21
84}-
85-
86bool QAsn1Element::read(const QByteArray &data)-
87{-
88 QDataStream stream(data);-
89 return
executed 24 times by 1 test: return read(stream);
Executed by:
  • tst_qasn1element - unknown status
read(stream);
executed 24 times by 1 test: return read(stream);
Executed by:
  • tst_qasn1element - unknown status
24
90}-
91-
92void QAsn1Element::write(QDataStream &stream) const-
93{-
94-
95 stream << mType;-
96-
97-
98 qint64 length = mValue.size();-
99 if (length >= 128
length >= 128Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEevaluated 7 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
) {
1-7
100-
101 quint8 encodedLength = 0x80;-
102 QByteArray ba;-
103 while (length
lengthDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
) {
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:
  • tst_qasn1element - unknown status
1
108 stream << encodedLength;-
109 stream.writeRawData(ba.data(), ba.size());-
110 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_qasn1element - unknown status
else {
1
111-
112 stream << quint8(length);-
113 }
executed 7 times by 1 test: end of block
Executed by:
  • tst_qasn1element - unknown status
7
114-
115-
116 stream.writeRawData(mValue.data(), mValue.size());-
117}
executed 8 times by 1 test: end of block
Executed by:
  • tst_qasn1element - unknown status
8
118-
119QAsn1Element QAsn1Element::fromBool(bool val)-
120{-
121 return
executed 7 times by 1 test: return QAsn1Element(QAsn1Element::BooleanType, QByteArray(1, val ? 0xff : 0x00));
Executed by:
  • tst_qasn1element - unknown status
QAsn1Element(QAsn1Element::BooleanType,
executed 7 times by 1 test: return QAsn1Element(QAsn1Element::BooleanType, QByteArray(1, val ? 0xff : 0x00));
Executed by:
  • tst_qasn1element - unknown status
7
122 QByteArray(1, val ? 0xff : 0x00));
executed 7 times by 1 test: return QAsn1Element(QAsn1Element::BooleanType, QByteArray(1, val ? 0xff : 0x00));
Executed by:
  • tst_qasn1element - unknown status
7
123}-
124-
125QAsn1Element QAsn1Element::fromInteger(unsigned int val)-
126{-
127 QAsn1Element elem(QAsn1Element::IntegerType);-
128 while (val > 127
val > 127Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
) {
2-4
129 elem.mValue.prepend(val & 0xff);-
130 val >>= 8;-
131 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qasn1element - unknown status
2
132 elem.mValue.prepend(val & 0x7f);-
133 return
executed 4 times by 1 test: return elem;
Executed by:
  • tst_qasn1element - unknown status
elem;
executed 4 times by 1 test: return elem;
Executed by:
  • tst_qasn1element - unknown status
4
134}-
135-
136QAsn1Element 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
it != endDescription
TRUEnever evaluated
FALSEnever evaluated
; ++it)
0
142 it->write(stream);
never executed: it->write(stream);
0
143 return
never executed: return seq;
seq;
never executed: return seq;
0
144}-
145-
146QAsn1Element 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()
i < bits.size()Description
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
; ++i) {
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
nodeDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEevaluated 7 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
) {
4-7
161 *--pBuffer = quint8(((node & 0x7f) | 0x80));-
162 node >>= 7;-
163 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qasn1element - unknown status
4
164 elem.mValue += pBuffer;-
165 }
executed 7 times by 1 test: end of block
Executed by:
  • tst_qasn1element - unknown status
7
166 return
executed 2 times by 1 test: return elem;
Executed by:
  • tst_qasn1element - unknown status
elem;
executed 2 times by 1 test: return elem;
Executed by:
  • tst_qasn1element - unknown status
2
167}-
168-
169bool QAsn1Element::toBool(bool *ok) const-
170{-
171 if (*
*this == fromBool(true)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
this == fromBool(true)
*this == fromBool(true)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
) {
1-3
172 if (ok
okDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEnever evaluated
)
0-1
173 *
executed 1 time by 1 test: *ok = true;
Executed by:
  • tst_qasn1element - unknown status
ok = true;
executed 1 time by 1 test: *ok = true;
Executed by:
  • tst_qasn1element - unknown status
1
174 return
executed 1 time by 1 test: return true;
Executed by:
  • tst_qasn1element - unknown status
true;
executed 1 time by 1 test: return true;
Executed by:
  • tst_qasn1element - unknown status
1
175 } else if (*
*this == fromBool(false)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
this == fromBool(false)
*this == fromBool(false)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
) {
1-2
176 if (ok
okDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEnever evaluated
)
0-1
177 *
executed 1 time by 1 test: *ok = true;
Executed by:
  • tst_qasn1element - unknown status
ok = true;
executed 1 time by 1 test: *ok = true;
Executed by:
  • tst_qasn1element - unknown status
1
178 return
executed 1 time by 1 test: return false;
Executed by:
  • tst_qasn1element - unknown status
false;
executed 1 time by 1 test: return false;
Executed by:
  • tst_qasn1element - unknown status
1
179 } else {-
180 if (ok
okDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEnever evaluated
)
0-2
181 *
executed 2 times by 1 test: *ok = false;
Executed by:
  • tst_qasn1element - unknown status
ok = false;
executed 2 times by 1 test: *ok = false;
Executed by:
  • tst_qasn1element - unknown status
2
182 return
executed 2 times by 1 test: return false;
Executed by:
  • tst_qasn1element - unknown status
false;
executed 2 times by 1 test: return false;
Executed by:
  • tst_qasn1element - unknown status
2
183 }-
184}-
185-
186QDateTime QAsn1Element::toDateTime() const-
187{-
188 if (mValue.endsWith('Z')
mValue.endsWith('Z')Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
) {
3-4
189 if (mType == UtcTimeType
mType == UtcTimeTypeDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
&& mValue.size() == 13
mValue.size() == 13Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
)
1-2
190 return
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:
  • tst_qasn1element - unknown status
QDateTime(QDate(2000 + mValue.mid(0, 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:
  • tst_qasn1element - unknown status
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:
  • tst_qasn1element - unknown status
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:
  • tst_qasn1element - unknown status
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:
  • tst_qasn1element - unknown status
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:
  • tst_qasn1element - unknown status
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:
  • tst_qasn1element - unknown status
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:
  • tst_qasn1element - unknown status
1
197 else if (mType == GeneralizedTimeType
mType == GeneralizedTimeTypeDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
&& mValue.size() == 15
mValue.size() == 15Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
)
1-2
198 return
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:
  • tst_qasn1element - unknown status
QDateTime(QDate(mValue.mid(0, 4).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:
  • tst_qasn1element - unknown status
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:
  • tst_qasn1element - unknown status
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:
  • tst_qasn1element - unknown status
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:
  • tst_qasn1element - unknown status
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:
  • tst_qasn1element - unknown status
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:
  • tst_qasn1element - unknown status
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:
  • tst_qasn1element - unknown status
1
205 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qasn1element - unknown status
2
206 return
executed 5 times by 1 test: return QDateTime();
Executed by:
  • tst_qasn1element - unknown status
QDateTime();
executed 5 times by 1 test: return QDateTime();
Executed by:
  • tst_qasn1element - unknown status
5
207}-
208-
209QMultiMap<QByteArray, QString> QAsn1Element::toInfo() const-
210{-
211 QMultiMap<QByteArray, QString> info;-
212 QAsn1Element elem;-
213 QDataStream issuerStream(mValue);-
214 while (elem.read(issuerStream)
elem.read(issuerStream)Description
TRUEnever evaluated
FALSEnever evaluated
&& elem.mType == QAsn1Element::SetType
elem.mType == ...ement::SetTypeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
215 QAsn1Element issuerElem;-
216 QDataStream setStream(elem.mValue);-
217 if (issuerElem.read(setStream)
issuerElem.read(setStream)Description
TRUEnever evaluated
FALSEnever evaluated
&& issuerElem.mType == QAsn1Element::SequenceType
issuerElem.mTy...::SequenceTypeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
218 QVector<QAsn1Element> elems = issuerElem.toVector();-
219 if (elems.size() == 2
elems.size() == 2Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
220 const QByteArray key = elems.front().toObjectName();-
221 if (!key.isEmpty()
!key.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
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: return info;
info;
never executed: return info;
0
227}-
228-
229qint64 QAsn1Element::toInteger(bool *ok) const-
230{-
231 if (mType != QAsn1Element::IntegerType
mType != QAsn1...t::IntegerTypeDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
|| mValue.isEmpty()
mValue.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
) {
0-4
232 if (ok
okDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
233 *
never executed: *ok = false;
ok = false;
never executed: *ok = false;
0
234 return
never executed: return 0;
0;
never executed: return 0;
0
235 }-
236-
237-
238 if (mValue.at(0) & 0x80
mValue.at(0) & 0x80Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
) {
0-4
239 if (ok
okDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
240 *
never executed: *ok = false;
ok = false;
never executed: *ok = false;
0
241 return
never executed: return 0;
0;
never executed: return 0;
0
242 }-
243-
244 qint64 value = mValue.at(0) & 0x7f;-
245 for (int i = 1; i < mValue.size()
i < mValue.size()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
; ++i)
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:
  • tst_qasn1element - unknown status
2
247-
248 if (ok
okDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEnever evaluated
)
0-4
249 *
executed 4 times by 1 test: *ok = true;
Executed by:
  • tst_qasn1element - unknown status
ok = true;
executed 4 times by 1 test: *ok = true;
Executed by:
  • tst_qasn1element - unknown status
4
250 return
executed 4 times by 1 test: return value;
Executed by:
  • tst_qasn1element - unknown status
value;
executed 4 times by 1 test: return value;
Executed by:
  • tst_qasn1element - unknown status
4
251}-
252-
253QVector<QAsn1Element> QAsn1Element::toVector() const-
254{-
255 QVector<QAsn1Element> items;-
256 if (mType == SequenceType
mType == SequenceTypeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
257 QAsn1Element elem;-
258 QDataStream stream(mValue);-
259 while (elem.read(stream)
elem.read(stream)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
260 items << elem;
never executed: items << elem;
0
261 }
never executed: end of block
0
262 return
never executed: return items;
items;
never executed: return items;
0
263}-
264-
265QByteArray QAsn1Element::toObjectId() const-
266{-
267 QByteArray key;-
268 if (mType == ObjectIdentifierType
mType == ObjectIdentifierTypeDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEnever evaluated
&& !mValue.isEmpty()
!mValue.isEmpty()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEnever evaluated
) {
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()
i < mValue.size()Description
TRUEevaluated 33 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
; ++i) {
6-33
273 b = mValue.at(i);-
274 val = (val << 7) | (b & 0x7f);-
275 if (!(b & 0x80)
!(b & 0x80)Description
TRUEevaluated 21 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
) {
12-21
276 key += '.' + QByteArray::number(val);-
277 val = 0;-
278 }
executed 21 times by 1 test: end of block
Executed by:
  • tst_qasn1element - unknown status
21
279 }
executed 33 times by 1 test: end of block
Executed by:
  • tst_qasn1element - unknown status
33
280 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_qasn1element - unknown status
6
281 return
executed 6 times by 1 test: return key;
Executed by:
  • tst_qasn1element - unknown status
key;
executed 6 times by 1 test: return key;
Executed by:
  • tst_qasn1element - unknown status
6
282}-
283-
284QByteArray QAsn1Element::toObjectName() const-
285{-
286 QByteArray key = toObjectId();-
287 return
executed 2 times by 1 test: return oidNameMap->value(key, key);
Executed by:
  • tst_qasn1element - unknown status
oidNameMap->value(key, key);
executed 2 times by 1 test: return oidNameMap->value(key, key);
Executed by:
  • tst_qasn1element - unknown status
2
288}-
289-
290QString QAsn1Element::toString() const-
291{-
292-
293 if (qstrlen(mValue) < uint(mValue.size())
qstrlen(mValue...mValue.size())Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
)
6
294 return
executed 6 times by 1 test: return QString();
Executed by:
  • tst_qasn1element - unknown status
QString();
executed 6 times by 1 test: return QString();
Executed by:
  • tst_qasn1element - unknown status
6
295-
296 if (mType == PrintableStringType
mType == PrintableStringTypeDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEevaluated 5 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
|| mType == TeletexStringType
mType == TeletexStringTypeDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
1-5
297 || mType == Rfc822NameType
mType == Rfc822NameTypeDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
|| mType == DnsNameType
mType == DnsNameTypeDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
1-3
298 || mType == UniformResourceIdentifierType
mType == Unifo...IdentifierTypeDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
)
1
299 return
executed 5 times by 1 test: return QString::fromLatin1(mValue, mValue.size());
Executed by:
  • tst_qasn1element - unknown status
QString::fromLatin1(mValue, mValue.size());
executed 5 times by 1 test: return QString::fromLatin1(mValue, mValue.size());
Executed by:
  • tst_qasn1element - unknown status
5
300 if (mType == Utf8StringType
mType == Utf8StringTypeDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qasn1element - unknown status
FALSEnever evaluated
)
0-1
301 return
executed 1 time by 1 test: return QString::fromUtf8(mValue, mValue.size());
Executed by:
  • tst_qasn1element - unknown status
QString::fromUtf8(mValue, mValue.size());
executed 1 time by 1 test: return QString::fromUtf8(mValue, mValue.size());
Executed by:
  • tst_qasn1element - unknown status
1
302-
303 return
never executed: return QString();
QString();
never executed: return QString();
0
304}-
305-
306-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9