QCA::ConstraintType

Search for usage in LXR

QCA::ConstraintType Class Reference

#include <QtCrypto>

Public Types

enum  Section { KeyUsage , ExtendedKeyUsage }
 

Public Member Functions

 ConstraintType ()
 
 ConstraintType (const ConstraintType &from)
 
 ConstraintType (const QString &id, Section section)
 
 ConstraintType (ConstraintTypeKnown known)
 
QString id () const
 
ConstraintTypeKnown known () const
 
bool operator!= (const ConstraintType &other) const
 
bool operator< (const ConstraintType &other) const
 
ConstraintTypeoperator= (const ConstraintType &from)
 
bool operator== (const ConstraintType &other) const
 
Section section () const
 

Detailed Description

Certificate constraint.

X.509 certificates can be constrained in their application - that is, some certificates can only be used for certain purposes. This class is used to identify an approved purpose for a certificate.

Note
It is common for a certificate to have more than one purpose.

Definition at line 363 of file qca_cert.h.

Member Enumeration Documentation

◆ Section

Section of the certificate that the constraint belongs in.

Enumerator
KeyUsage 

Stored in the key usage section.

ExtendedKeyUsage 

Stored in the extended key usage section.

Definition at line 369 of file qca_cert.h.

Constructor & Destructor Documentation

◆ ConstraintType() [1/4]

QCA::ConstraintType::ConstraintType ( )

Standard constructor.

◆ ConstraintType() [2/4]

QCA::ConstraintType::ConstraintType ( ConstraintTypeKnown known)

Construct a new constraint.

The section will be derived by known.

Parameters
knownthe type as part of the ConstraintTypeKnown enumerator

◆ ConstraintType() [3/4]

QCA::ConstraintType::ConstraintType ( const QString & id,
Section section )

Construct a new constraint.

Parameters
idthe type as an identifier string (OID or internal)
sectionthe section this type belongs in
See also
id

◆ ConstraintType() [4/4]

QCA::ConstraintType::ConstraintType ( const ConstraintType & from)

Standard copy constructor.

Parameters
fromthe constraint type to copy from

Member Function Documentation

◆ id()

QString QCA::ConstraintType::id ( ) const

The type as an identifier string.

For types that have OIDs, this function returns an OID in string form. For types that do not have OIDs, this function returns an internal identifier string whose first character is not a digit (this allows you to tell the difference between an OID and an internal identifier).

It is hereby stated that the KeyUsage bit fields shall use the internal identifier format "KeyUsage.[rfc field name]". For example, the keyEncipherment field would have the identifier "KeyUsage.keyEncipherment".

Applications should not store, use, or compare against internal identifiers unless the identifiers are explicitly documented (e.g. KeyUsage).

◆ known()

ConstraintTypeKnown QCA::ConstraintType::known ( ) const

The type as part of the ConstraintTypeKnown enumerator.

This function may return a value that does not exist in the enumerator. In that case, you may use id() to determine the type.

◆ operator!=()

bool QCA::ConstraintType::operator!= ( const ConstraintType & other) const
inline

Inequality operator.

Parameters
otherthe constraint type to compare with this constraint

Definition at line 469 of file qca_cert.h.

◆ operator<()

bool QCA::ConstraintType::operator< ( const ConstraintType & other) const

Comparison operator.

Parameters
otherthe constraint type to compare with this constraint

◆ operator=()

ConstraintType & QCA::ConstraintType::operator= ( const ConstraintType & from)

Standard assignment operator.

Parameters
fromthe constraint type to assign from

◆ operator==()

bool QCA::ConstraintType::operator== ( const ConstraintType & other) const

Comparison operator.

Parameters
otherthe constraint type to compare with this constraint

◆ section()

Section QCA::ConstraintType::section ( ) const

The section the constraint is part of.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:18:26 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.