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
QSslEllipticCurve Class Reference

Represents an elliptic curve for use by elliptic-curve cipher algorithms. More...

#include <qsslellipticcurve.h>

+ Collaboration diagram for QSslEllipticCurve:

Public Member Functions

constexpr QSslEllipticCurve () noexcept
 Constructs an invalid elliptic curve.
 
Q_NETWORK_EXPORT QString shortName () const
 Returns the conventional short name for this curve.
 
Q_NETWORK_EXPORT QString longName () const
 Returns the conventional long name for this curve.
 
constexpr bool isValid () const noexcept
 Returns true if this elliptic curve is a valid curve, false otherwise.
 
Q_NETWORK_EXPORT bool isTlsNamedCurve () const noexcept
 Returns true if this elliptic curve is one of the named curves that can be used in the key exchange when using an elliptic curve cipher with TLS; false otherwise.
 

Static Public Member Functions

static Q_NETWORK_EXPORT QSslEllipticCurve fromShortName (const QString &name)
 Returns an QSslEllipticCurve instance representing the named curve name.
 
static Q_NETWORK_EXPORT QSslEllipticCurve fromLongName (const QString &name)
 Returns an QSslEllipticCurve instance representing the named curve name.
 

Friends

class QSslContext
 
class QSslSocketPrivate
 
constexpr bool operator== (QSslEllipticCurve lhs, QSslEllipticCurve rhs) noexcept
 
constexpr bool operator!= (QSslEllipticCurve lhs, QSslEllipticCurve rhs) noexcept
 
constexpr size_t qHash (QSslEllipticCurve curve, size_t seed=0)
 

Related Symbols

(Note that these are not member symbols.)

QDebug operator<< (QDebug debug, QSslEllipticCurve curve)
 

Detailed Description

Represents an elliptic curve for use by elliptic-curve cipher algorithms.

Since
5.5

\reentrant

\inmodule QtNetwork

The class QSslEllipticCurve represents an elliptic curve for use by elliptic-curve cipher algorithms.

Elliptic curves can be constructed from a "short name" (SN) (fromShortName()), and by a call to QSslConfiguration::supportedEllipticCurves().

QSslEllipticCurve instances can be compared for equality and can be used as keys in QHash and QSet. They cannot be used as key in a QMap.

Note
This class is currently only supported in OpenSSL.

Definition at line 18 of file qsslellipticcurve.h.

Constructor & Destructor Documentation

◆ QSslEllipticCurve()

QSslEllipticCurve::QSslEllipticCurve ( )
inlineconstexprnoexcept

Constructs an invalid elliptic curve.

See also
isValid(), QSslConfiguration::supportedEllipticCurves()

Definition at line 20 of file qsslellipticcurve.h.

Member Function Documentation

◆ fromLongName()

QSslEllipticCurve QSslEllipticCurve::fromLongName ( const QString & name)
static

Returns an QSslEllipticCurve instance representing the named curve name.

The name is a long name for the curve, whose exact spelling depends on the SSL implementation.

If the given name is not supported, returns an invalid QSslEllipticCurve instance.

Note
The OpenSSL implementation of this function treats the name case-sensitively.
See also
longName()

Definition at line 83 of file qsslellipticcurve.cpp.

◆ fromShortName()

QSslEllipticCurve QSslEllipticCurve::fromShortName ( const QString & name)
static

Returns an QSslEllipticCurve instance representing the named curve name.

The name is the conventional short name for the curve, as represented by RFC 4492 (for instance {secp521r1}), or as NIST short names (for instance {P-256}). The actual set of recognized names depends on the SSL implementation.

If the given name is not supported, returns an invalid QSslEllipticCurve instance.

Note
The OpenSSL implementation of this function treats the name case-sensitively.
See also
shortName()

Definition at line 60 of file qsslellipticcurve.cpp.

◆ isTlsNamedCurve()

bool QSslEllipticCurve::isTlsNamedCurve ( ) const
noexcept

Returns true if this elliptic curve is one of the named curves that can be used in the key exchange when using an elliptic curve cipher with TLS; false otherwise.

Definition at line 138 of file qsslellipticcurve.cpp.

◆ isValid()

bool QSslEllipticCurve::isValid ( ) const
inlineconstexprnoexcept

Returns true if this elliptic curve is a valid curve, false otherwise.

Definition at line 31 of file qsslellipticcurve.h.

◆ longName()

QString QSslEllipticCurve::longName ( ) const
nodiscard

Returns the conventional long name for this curve.

If this curve is invalid, returns an empty string.

See also
shortName()

Definition at line 117 of file qsslellipticcurve.cpp.

◆ shortName()

QString QSslEllipticCurve::shortName ( ) const
nodiscard

Returns the conventional short name for this curve.

If this curve is invalid, returns an empty string.

See also
longName()

Definition at line 101 of file qsslellipticcurve.cpp.

Friends And Related Symbol Documentation

◆ operator!=

bool operator!= ( QSslEllipticCurve lhs,
QSslEllipticCurve rhs )
friend
Since
5.5

Returns true if the curve lhs represents a different curve than rhs; false otherwise.

Definition at line 43 of file qsslellipticcurve.h.

◆ operator<<()

QDebug operator<< ( QDebug debug,
QSslEllipticCurve curve )
related
Since
5.5

Writes the elliptic curve curve into the debug object debug for debugging purposes.

See also
{Debugging Techniques}

Definition at line 181 of file qsslellipticcurve.cpp.

◆ operator==

bool operator== ( QSslEllipticCurve lhs,
QSslEllipticCurve rhs )
friend
Since
5.5

Returns true if the curve lhs represents the same curve of rhs;

Definition at line 41 of file qsslellipticcurve.h.

◆ qHash

size_t qHash ( QSslEllipticCurve curve,
size_t seed = 0 )
friend

Definition at line 53 of file qsslellipticcurve.h.

◆ QSslContext

friend class QSslContext
friend

Definition at line 47 of file qsslellipticcurve.h.

◆ QSslSocketPrivate

friend class QSslSocketPrivate
friend

Definition at line 48 of file qsslellipticcurve.h.


The documentation for this class was generated from the following files: