Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/network/ssl/qsslellipticcurve_openssl.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | - | |||||||
5 | - | |||||||
6 | - | |||||||
7 | - | |||||||
8 | QString QSslEllipticCurve::shortName() const | - | ||||||
9 | { | - | ||||||
10 | QString result; | - | ||||||
11 | - | |||||||
12 | if (id != 0
| 10-268 | ||||||
13 | result = QString::fromLatin1(q_OBJ_nid2sn(id)); executed 268 times by 1 test: result = QString::fromLatin1(q_OBJ_nid2sn(id)); Executed by:
| 268 | ||||||
14 | - | |||||||
15 | return executed 278 times by 1 test: result;return result; Executed by:
executed 278 times by 1 test: return result; Executed by:
| 278 | ||||||
16 | } | - | ||||||
17 | - | |||||||
18 | QString QSslEllipticCurve::longName() const | - | ||||||
19 | { | - | ||||||
20 | QString result; | - | ||||||
21 | - | |||||||
22 | if (id != 0
| 10-268 | ||||||
23 | result = QString::fromLatin1(q_OBJ_nid2ln(id)); executed 268 times by 1 test: result = QString::fromLatin1(q_OBJ_nid2ln(id)); Executed by:
| 268 | ||||||
24 | - | |||||||
25 | return executed 278 times by 1 test: result;return result; Executed by:
executed 278 times by 1 test: return result; Executed by:
| 278 | ||||||
26 | } | - | ||||||
27 | - | |||||||
28 | QSslEllipticCurve QSslEllipticCurve::fromShortName(const QString &name) | - | ||||||
29 | { | - | ||||||
30 | if (name.isEmpty()
| 2-68 | ||||||
31 | return executed 2 times by 1 test: QSslEllipticCurve();return QSslEllipticCurve(); Executed by:
executed 2 times by 1 test: return QSslEllipticCurve(); Executed by:
| 2 | ||||||
32 | - | |||||||
33 | QSslSocketPrivate::ensureInitialized(); | - | ||||||
34 | - | |||||||
35 | QSslEllipticCurve result; | - | ||||||
36 | - | |||||||
37 | - | |||||||
38 | const QByteArray curveNameLatin1 = name.toLatin1(); | - | ||||||
39 | - | |||||||
40 | int nid = q_OBJ_sn2nid(curveNameLatin1.data()); | - | ||||||
41 | - | |||||||
42 | - | |||||||
43 | - | |||||||
44 | - | |||||||
45 | - | |||||||
46 | - | |||||||
47 | result.id = nid; | - | ||||||
48 | - | |||||||
49 | - | |||||||
50 | return executed 68 times by 1 test: result;return result; Executed by:
executed 68 times by 1 test: return result; Executed by:
| 68 | ||||||
51 | } | - | ||||||
52 | - | |||||||
53 | QSslEllipticCurve QSslEllipticCurve::fromLongName(const QString &name) | - | ||||||
54 | { | - | ||||||
55 | if (name.isEmpty()
| 2-68 | ||||||
56 | return executed 2 times by 1 test: QSslEllipticCurve();return QSslEllipticCurve(); Executed by:
executed 2 times by 1 test: return QSslEllipticCurve(); Executed by:
| 2 | ||||||
57 | - | |||||||
58 | QSslSocketPrivate::ensureInitialized(); | - | ||||||
59 | - | |||||||
60 | QSslEllipticCurve result; | - | ||||||
61 | - | |||||||
62 | - | |||||||
63 | const QByteArray curveNameLatin1 = name.toLatin1(); | - | ||||||
64 | - | |||||||
65 | int nid = q_OBJ_ln2nid(curveNameLatin1.data()); | - | ||||||
66 | result.id = nid; | - | ||||||
67 | - | |||||||
68 | - | |||||||
69 | return executed 68 times by 1 test: result;return result; Executed by:
executed 68 times by 1 test: return result; Executed by:
| 68 | ||||||
70 | } | - | ||||||
71 | static const int tlsNamedCurveNIDs[] = { | - | ||||||
72 | - | |||||||
73 | 721, | - | ||||||
74 | 722, | - | ||||||
75 | 723, | - | ||||||
76 | 724, | - | ||||||
77 | 725, | - | ||||||
78 | 726, | - | ||||||
79 | 727, | - | ||||||
80 | 728, | - | ||||||
81 | 729, | - | ||||||
82 | 730, | - | ||||||
83 | 731, | - | ||||||
84 | 732, | - | ||||||
85 | 733, | - | ||||||
86 | 734, | - | ||||||
87 | - | |||||||
88 | 708, | - | ||||||
89 | 709, | - | ||||||
90 | 710, | - | ||||||
91 | 711, | - | ||||||
92 | 409, | - | ||||||
93 | 712, | - | ||||||
94 | 713, | - | ||||||
95 | 714, | - | ||||||
96 | 415, | - | ||||||
97 | 715, | - | ||||||
98 | 716, | - | ||||||
99 | - | |||||||
100 | - | |||||||
101 | 927, | - | ||||||
102 | 931, | - | ||||||
103 | 933 | - | ||||||
104 | }; | - | ||||||
105 | - | |||||||
106 | static const size_t tlsNamedCurveNIDCount = sizeof(tlsNamedCurveNIDs) / sizeof(tlsNamedCurveNIDs[0]); | - | ||||||
107 | - | |||||||
108 | bool QSslEllipticCurve::isTlsNamedCurve() const noexcept | - | ||||||
109 | { | - | ||||||
110 | const int * const tlsNamedCurveNIDsEnd = tlsNamedCurveNIDs + tlsNamedCurveNIDCount; | - | ||||||
111 | return executed 1 time by 1 test: std::find(tlsNamedCurveNIDs, tlsNamedCurveNIDsEnd, id) != tlsNamedCurveNIDsEnd;return std::find(tlsNamedCurveNIDs, tlsNamedCurveNIDsEnd, id) != tlsNamedCurveNIDsEnd; Executed by:
executed 1 time by 1 test: return std::find(tlsNamedCurveNIDs, tlsNamedCurveNIDsEnd, id) != tlsNamedCurveNIDsEnd; Executed by:
| 1 | ||||||
112 | } | - | ||||||
113 | - | |||||||
114 | - | |||||||
Switch to Source code | Preprocessed file |