Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qsslpresharedkeyauthenticator.h
Go to the documentation of this file.
1// Copyright (C) 2014 Governikus GmbH & Co. KG.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QSSLPRESHAREDKEYAUTHENTICATOR_H
6#define QSSLPRESHAREDKEYAUTHENTICATOR_H
7
8#include <QtNetwork/qtnetworkglobal.h>
9#include <QtCore/QString>
10#include <QtCore/QSharedDataPointer>
11#include <QtCore/QMetaType>
12
14
15QT_BEGIN_NAMESPACE
16
17class QSslPreSharedKeyAuthenticatorPrivate;
19{
20 Q_GADGET_EXPORT(Q_NETWORK_EXPORT)
21public:
26
28
29 void swap(QSslPreSharedKeyAuthenticator &other) noexcept { d.swap(other.d); }
30
31 Q_NETWORK_EXPORT QByteArray identityHint() const;
32
33 Q_NETWORK_EXPORT void setIdentity(const QByteArray &identity);
36
37 Q_NETWORK_EXPORT void setPreSharedKey(const QByteArray &preSharedKey);
40
41private:
42 Q_NETWORK_EXPORT bool isEqual(const QSslPreSharedKeyAuthenticator &other) const;
43
44 friend class QTlsBackend;
45
47 { return lhs.isEqual(rhs); }
49 { return !lhs.isEqual(rhs); }
50
51 QSharedDataPointer<QSslPreSharedKeyAuthenticatorPrivate> d;
52};
53
54
55Q_DECLARE_SHARED(QSslPreSharedKeyAuthenticator)
56
57QT_END_NAMESPACE
58
59QT_DECL_METATYPE_EXTERN(QSslPreSharedKeyAuthenticator, Q_NETWORK_EXPORT)
60QT_DECL_METATYPE_EXTERN_TAGGED(QSslPreSharedKeyAuthenticator*, QSslPreSharedKeyAuthenticator_ptr, Q_NETWORK_EXPORT)
61
62#endif // QSSLPRESHAREDKEYAUTHENTICATOR_H
The QSslPreSharedKeyAuthenticator class provides authentication data for pre shared keys (PSK) cipher...
friend bool operator==(const QSslPreSharedKeyAuthenticator &lhs, const QSslPreSharedKeyAuthenticator &rhs)
void swap(QSslPreSharedKeyAuthenticator &other) noexcept
\memberswap{authenticator}
QSslPreSharedKeyAuthenticator & operator=(QSslPreSharedKeyAuthenticator &&other) noexcept
Move-assigns the QSslPreSharedKeyAuthenticator object authenticator to this object,...
Q_NETWORK_EXPORT void setIdentity(const QByteArray &identity)
Sets the PSK client identity (to be advised to the server) to identity.
friend bool operator!=(const QSslPreSharedKeyAuthenticator &lhs, const QSslPreSharedKeyAuthenticator &rhs)
Q_NETWORK_EXPORT int maximumIdentityLength() const
Returns the maximum length, in bytes, of the PSK client identity.
Q_NETWORK_EXPORT ~QSslPreSharedKeyAuthenticator()
Destroys the QSslPreSharedKeyAuthenticator object.
Q_NETWORK_EXPORT void setPreSharedKey(const QByteArray &preSharedKey)
Sets the pre shared key to preSharedKey.
Q_NETWORK_EXPORT int maximumPreSharedKeyLength() const
Returns the maximum length, in bytes, of the pre shared key.
QT_REQUIRE_CONFIG(ssl)