Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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
13
QT_REQUIRE_CONFIG
(
ssl
);
14
15
QT_BEGIN_NAMESPACE
16
17
class
QSslPreSharedKeyAuthenticatorPrivate;
18
class
QSslPreSharedKeyAuthenticator
19
{
20
Q_GADGET_EXPORT(Q_NETWORK_EXPORT)
21
public
:
22
Q_NETWORK_EXPORT
QSslPreSharedKeyAuthenticator
();
23
Q_NETWORK_EXPORT
~
QSslPreSharedKeyAuthenticator
();
24
Q_NETWORK_EXPORT
QSslPreSharedKeyAuthenticator
(
const
QSslPreSharedKeyAuthenticator
&
authenticator
);
25
Q_NETWORK_EXPORT
QSslPreSharedKeyAuthenticator
&
operator
=(
const
QSslPreSharedKeyAuthenticator
&
authenticator
);
26
27
QSslPreSharedKeyAuthenticator
&
operator
=(
QSslPreSharedKeyAuthenticator
&&other)
noexcept
{
swap
(
other
)
;
return
*
this
; }
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);
34
Q_NETWORK_EXPORT
QByteArray
identity
()
const
;
35
Q_NETWORK_EXPORT
int
maximumIdentityLength
()
const
;
36
37
Q_NETWORK_EXPORT
void
setPreSharedKey
(
const
QByteArray &preSharedKey);
38
Q_NETWORK_EXPORT
QByteArray
preSharedKey
()
const
;
39
Q_NETWORK_EXPORT
int
maximumPreSharedKeyLength
()
const
;
40
41
private
:
42
Q_NETWORK_EXPORT
bool
isEqual(
const
QSslPreSharedKeyAuthenticator
&other)
const
;
43
44
friend
class
QTlsBackend;
45
46
friend
bool
operator
==(
const
QSslPreSharedKeyAuthenticator
&lhs,
const
QSslPreSharedKeyAuthenticator
&rhs)
47
{
return
lhs.isEqual(rhs); }
48
friend
bool
operator
!=(
const
QSslPreSharedKeyAuthenticator
&lhs,
const
QSslPreSharedKeyAuthenticator
&rhs)
49
{
return
!lhs.isEqual(rhs); }
50
51
QSharedDataPointer<QSslPreSharedKeyAuthenticatorPrivate> d;
52
};
53
54
55
Q_DECLARE_SHARED(QSslPreSharedKeyAuthenticator)
56
57
QT_END_NAMESPACE
58
59
QT_DECL_METATYPE_EXTERN(QSslPreSharedKeyAuthenticator, Q_NETWORK_EXPORT)
60
QT_DECL_METATYPE_EXTERN_TAGGED(QSslPreSharedKeyAuthenticator*, QSslPreSharedKeyAuthenticator_ptr, Q_NETWORK_EXPORT)
61
62
#
endif
// QSSLPRESHAREDKEYAUTHENTICATOR_H
QSslPreSharedKeyAuthenticator
The QSslPreSharedKeyAuthenticator class provides authentication data for pre shared keys (PSK) cipher...
Definition
qsslpresharedkeyauthenticator.h:19
QSslPreSharedKeyAuthenticator::operator==
friend bool operator==(const QSslPreSharedKeyAuthenticator &lhs, const QSslPreSharedKeyAuthenticator &rhs)
Definition
qsslpresharedkeyauthenticator.h:46
QSslPreSharedKeyAuthenticator::swap
void swap(QSslPreSharedKeyAuthenticator &other) noexcept
\memberswap{authenticator}
Definition
qsslpresharedkeyauthenticator.h:29
QSslPreSharedKeyAuthenticator::operator=
QSslPreSharedKeyAuthenticator & operator=(QSslPreSharedKeyAuthenticator &&other) noexcept
Move-assigns the QSslPreSharedKeyAuthenticator object authenticator to this object,...
Definition
qsslpresharedkeyauthenticator.h:27
QSslPreSharedKeyAuthenticator::setIdentity
Q_NETWORK_EXPORT void setIdentity(const QByteArray &identity)
Sets the PSK client identity (to be advised to the server) to identity.
Definition
qsslpresharedkeyauthenticator.cpp:139
QSslPreSharedKeyAuthenticator::operator!=
friend bool operator!=(const QSslPreSharedKeyAuthenticator &lhs, const QSslPreSharedKeyAuthenticator &rhs)
Definition
qsslpresharedkeyauthenticator.h:48
QSslPreSharedKeyAuthenticator::maximumIdentityLength
Q_NETWORK_EXPORT int maximumIdentityLength() const
Returns the maximum length, in bytes, of the PSK client identity.
Definition
qsslpresharedkeyauthenticator.cpp:164
QSslPreSharedKeyAuthenticator::~QSslPreSharedKeyAuthenticator
Q_NETWORK_EXPORT ~QSslPreSharedKeyAuthenticator()
Destroys the QSslPreSharedKeyAuthenticator object.
Definition
qsslpresharedkeyauthenticator.cpp:85
QSslPreSharedKeyAuthenticator::setPreSharedKey
Q_NETWORK_EXPORT void setPreSharedKey(const QByteArray &preSharedKey)
Sets the pre shared key to preSharedKey.
Definition
qsslpresharedkeyauthenticator.cpp:179
QSslPreSharedKeyAuthenticator::maximumPreSharedKeyLength
Q_NETWORK_EXPORT int maximumPreSharedKeyLength() const
Returns the maximum length, in bytes, of the pre shared key.
Definition
qsslpresharedkeyauthenticator.cpp:203
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QT_REQUIRE_CONFIG
QT_REQUIRE_CONFIG(ssl)
qtbase
src
network
ssl
qsslpresharedkeyauthenticator.h
Generated on
for Qt by
1.18.0