7#include <QtCore/qdatastream.h>
8#include <QtCore/qdatetime.h>
9#include <QtCore/qtimezone.h>
10#include <QtCore/qlist.h>
12#include <private/qtools_p.h>
80 for (
int i = 0;
i < bytes;
i++) {
93 const int BUFFERSIZE = 4 * 1024;
95 int remainingLength =
length;
96 while (remainingLength) {
98 const int bytesToRead =
qMin(remainingLength, BUFFERSIZE);
100 if (
count !=
int(bytesToRead))
103 remainingLength -= bytesToRead;
107 mValue.
swap(tmpValue);
126 quint8 encodedLength = 0x80;
154 elem.mValue.prepend(val & 0xff);
157 elem.mValue.prepend(val & 0x7f);
175 const QList<QByteArray>
bits =
id.split(
'.');
177 elem.mValue +=
quint8((
bits[0].toUInt() * 40 +
bits[1].toUInt()));
178 for (
int i = 2;
i <
bits.size(); ++
i) {
179 char buffer[std::numeric_limits<unsigned int>::digits / 7 + 2];
182 unsigned int node =
bits[
i].toUInt();
183 *--pBuffer =
quint8((node & 0x7f));
186 *--pBuffer =
quint8(((node & 0x7f) | 0x80));
189 elem.mValue += pBuffer;
200 }
else if (*
this ==
fromBool(
false)) {
215 if (mValue.
size() != 13 && mValue.
size() != 15)
224 if (mValue.
back() !=
'Z')
235 constexpr int rfc2459CenturyStart = 1950;
237 QDate date = QDate::fromString(inputView.
first(6), u
"yyMMdd", rfc2459CenturyStart);
257 QMultiMap<QByteArray, QString>
info;
264 const auto elems = issuerElem.toList();
265 if (elems.size() == 2) {
268 info.insert(
key, elems.back().toString());
285 if (mValue.
at(0) & 0x80 || mValue.
size() > 8) {
292 for (
int i = 1;
i < mValue.
size(); ++
i)
302 QList<QAsn1Element>
items;
318 unsigned int val = 0;
319 for (
int i = 1;
i < mValue.
size(); ++
i) {
321 val = (val << 7) | (
b & 0x7f);
334 return oidNameMap->value(
key,
key);
@ UniformResourceIdentifierType
QByteArray toObjectName() const
QMultiMap< QByteArray, QString > toInfo() const
QDateTime toDateTime() const
bool read(QDataStream &data)
qint64 toInteger(bool *ok=nullptr) const
static QAsn1Element fromVector(const QList< QAsn1Element > &items)
static QAsn1Element fromObjectId(const QByteArray &id)
void write(QDataStream &data) const
static QAsn1Element fromInteger(unsigned int val)
QAsn1Element(quint8 type=0, const QByteArray &value=QByteArray())
QByteArray toObjectId() const
bool toBool(bool *ok=nullptr) const
static QAsn1Element fromBool(bool val)
QList< QAsn1Element > toList() const
char * data()
\macro QT_NO_CAST_FROM_BYTEARRAY
QByteArray & prepend(char c)
This is an overloaded member function, provided for convenience. It differs from the above function o...
qsizetype size() const noexcept
Returns the number of bytes in this byte array.
char at(qsizetype i) const
Returns the byte at index position i in the byte array.
void swap(QByteArray &other) noexcept
bool isEmpty() const noexcept
Returns true if the byte array has size 0; otherwise returns false.
static QByteArray number(int, int base=10)
Returns a byte-array representing the whole number n as text.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
\inmodule QtCore \reentrant
constexpr bool isValid() const
Returns true if this date is valid; otherwise returns false.
int year() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
constexpr QLatin1Char first() const
constexpr QLatin1StringView sliced(qsizetype pos) const
const_iterator cend() const noexcept
const_iterator cbegin() const noexcept
iterator insert(const Key &key, const T &value)
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
\inmodule QtCore \reentrant
bool isValid() const
Returns true if the time is valid; otherwise returns false.
QSet< QString >::iterator it
Combined button and popup list for selecting options.
constexpr bool isAsciiDigit(char32_t c) noexcept
QMap< QByteArray, QByteArray > OidNameMap
static OidNameMap createOidMap()
#define QByteArrayLiteral(str)
size_t qstrlen(const char *str)
typedef QByteArray(EGLAPIENTRYP PFNQGSGETDISPLAYSPROC)()
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
#define Q_GLOBAL_STATIC_WITH_ARGS(TYPE, NAME, ARGS)
constexpr const T & qMin(const T &a, const T &b)
GLboolean GLboolean GLboolean b
GLenum GLuint GLenum GLsizei length
GLenum GLenum GLsizei count
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const void * bits
GLbitfield GLuint readBuffer
unsigned long long quint64