QCA::CertificateRequest

Search for usage in LXR

#include <QtCrypto>

Inheritance diagram for QCA::CertificateRequest:

Public Member Functions

 CertificateRequest ()
 
 CertificateRequest (const CertificateOptions &opts, const PrivateKey &key, const QString &provider=QString())
 
 CertificateRequest (const CertificateRequest &from)
 
 CertificateRequest (const QString &fileName)
 
QString challenge () const
 
void change (CSRContext *c)
 
Constraints constraints () const
 
CertificateRequestFormat format () const
 
bool isCA () const
 
bool isNull () const
 
bool operator!= (const CertificateRequest &other) const
 
CertificateRequestoperator= (const CertificateRequest &from)
 
bool operator== (const CertificateRequest &csr) const
 
int pathLimit () const
 
QStringList policies () const
 
SignatureAlgorithm signatureAlgorithm () const
 
CertificateInfo subjectInfo () const
 
CertificateInfoOrdered subjectInfoOrdered () const
 
PublicKey subjectPublicKey () const
 
QByteArray toDER () const
 
QString toPEM () const
 
bool toPEMFile (const QString &fileName) const
 
QString toString () const
 
- Public Member Functions inherited from QCA::Algorithm
 Algorithm (const Algorithm &from)
 
void change (const QString &type, const QString &provider)
 
void change (Provider::Context *c)
 
Provider::Contextcontext ()
 
const Provider::Contextcontext () const
 
Algorithmoperator= (const Algorithm &from)
 
Providerprovider () const
 
Provider::ContexttakeContext ()
 
QString type () const
 

Static Public Member Functions

static bool canUseFormat (CertificateRequestFormat f, const QString &provider=QString())
 
static CertificateRequest fromDER (const QByteArray &a, ConvertResult *result=nullptr, const QString &provider=QString())
 
static CertificateRequest fromPEM (const QString &s, ConvertResult *result=nullptr, const QString &provider=QString())
 
static CertificateRequest fromPEMFile (const QString &fileName, ConvertResult *result=nullptr, const QString &provider=QString())
 
static CertificateRequest fromString (const QString &s, ConvertResult *result=nullptr, const QString &provider=QString())
 

Additional Inherited Members

- Protected Member Functions inherited from QCA::Algorithm
 Algorithm ()
 
 Algorithm (const QString &type, const QString &provider)
 

Detailed Description

Certificate Request

A CertificateRequest is a unsigned request for a Certificate

Definition at line 1325 of file qca_cert.h.

Constructor & Destructor Documentation

◆ CertificateRequest() [1/4]

QCA::CertificateRequest::CertificateRequest ( )

Create an empty certificate request.

◆ CertificateRequest() [2/4]

QCA::CertificateRequest::CertificateRequest ( const QString & fileName)

Create a certificate request based on the contents of a file.

Parameters
fileNamethe file (and path, if necessary) containing a PEM encoded certificate request

◆ CertificateRequest() [3/4]

QCA::CertificateRequest::CertificateRequest ( const CertificateOptions & opts,
const PrivateKey & key,
const QString & provider = QString() )

Create a certificate request based on specified options.

Parameters
optsthe options to use in the certificate request
keythe private key that matches the certificate being requested
providerthe provider to use, if a specific provider is required

◆ CertificateRequest() [4/4]

QCA::CertificateRequest::CertificateRequest ( const CertificateRequest & from)

Standard copy constructor.

Parameters
fromthe request to copy from

Member Function Documentation

◆ canUseFormat()

static bool QCA::CertificateRequest::canUseFormat ( CertificateRequestFormat f,
const QString & provider = QString() )
static

Test if the certificate request can use a specified format.

Parameters
fthe format to test for
providerthe provider to use, if a specific provider is required
Returns
true if the certificate request can use the specified format

◆ challenge()

QString QCA::CertificateRequest::challenge ( ) const

The challenge associated with this certificate request.

◆ change()

void QCA::CertificateRequest::change ( CSRContext * c)
Parameters
ccontext (internal)

◆ constraints()

Constraints QCA::CertificateRequest::constraints ( ) const

The constraints that apply to this certificate request.

Note
this only applies to PKCS#10 format certificate requests

◆ format()

CertificateRequestFormat QCA::CertificateRequest::format ( ) const

the format that this Certificate request is in

◆ fromDER()

static CertificateRequest QCA::CertificateRequest::fromDER ( const QByteArray & a,
ConvertResult * result = nullptr,
const QString & provider = QString() )
static

Import the certificate request from DER.

Parameters
athe array containing the certificate request in DER format
resulta pointer to a ConvertResult, which if not-null will be set to the conversion status
providerthe provider to use, if a specific provider is required
Returns
the CertificateRequest corresponding to the certificate request in the provided array
Note
this only applies to PKCS#10 format certificate requests

◆ fromPEM()

static CertificateRequest QCA::CertificateRequest::fromPEM ( const QString & s,
ConvertResult * result = nullptr,
const QString & provider = QString() )
static

Import the certificate request from PEM format.

Parameters
sthe string containing the certificate request in PEM format
resulta pointer to a ConvertResult, which if not-null will be set to the conversion status
providerthe provider to use, if a specific provider is required
Returns
the CertificateRequest corresponding to the certificate request in the provided string
Note
this only applies to PKCS#10 format certificate requests

◆ fromPEMFile()

static CertificateRequest QCA::CertificateRequest::fromPEMFile ( const QString & fileName,
ConvertResult * result = nullptr,
const QString & provider = QString() )
static

Import the certificate request from a file.

Parameters
fileNamethe name (and path, if required) of the file containing the certificate request in PEM format
resulta pointer to a ConvertResult, which if not-null will be set to the conversion status
providerthe provider to use, if a specific provider is required
Returns
the CertificateRequest corresponding to the certificate request in the provided string
Note
this only applies to PKCS#10 format certificate requests

◆ fromString()

static CertificateRequest QCA::CertificateRequest::fromString ( const QString & s,
ConvertResult * result = nullptr,
const QString & provider = QString() )
static

Import the CertificateRequest from a string.

Parameters
sthe string containing to the certificate request
resulta pointer to a ConvertResult, which if not-null will be set to the conversion status
providerthe provider to use, if a specific provider is required
Returns
the CertificateRequest corresponding to the certificate request in the provided string
Note
this only applies to SPKAC format certificate requests

◆ isCA()

bool QCA::CertificateRequest::isCA ( ) const

Test if this Certificate Request is for a Certificate Authority certificate.

Note
this only applies to PKCS#10 format certificate requests

◆ isNull()

bool QCA::CertificateRequest::isNull ( ) const

test if the certificate request is empty

Returns
true if the certificate request is empty, otherwise false

◆ operator!=()

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

Inequality operator.

Parameters
otherthe certificate request to be compared to this certificate request

Definition at line 1473 of file qca_cert.h.

◆ operator=()

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

Standard assignment operator.

Parameters
fromthe request to assign from

◆ operator==()

bool QCA::CertificateRequest::operator== ( const CertificateRequest & csr) const

Test for equality of two certificate requests.

Parameters
csrthe certificate request to be compared to this certificate request
Returns
true if the two certificate requests are the same

◆ pathLimit()

int QCA::CertificateRequest::pathLimit ( ) const

The path limit for the certificate in this Certificate Request.

Note
this only applies to PKCS#10 format certificate requests

◆ policies()

QStringList QCA::CertificateRequest::policies ( ) const

The policies that apply to this certificate request.

Note
this only applies to PKCS#10 format certificate requests

◆ signatureAlgorithm()

SignatureAlgorithm QCA::CertificateRequest::signatureAlgorithm ( ) const

The algorithm used to make the signature on this certificate request.

◆ subjectInfo()

CertificateInfo QCA::CertificateRequest::subjectInfo ( ) const

Information on the subject of the certificate being requested.

Note
this only applies to PKCS#10 format certificate requests
See also
subjectInfoOrdered for a version that maintains order in the subject information.

◆ subjectInfoOrdered()

CertificateInfoOrdered QCA::CertificateRequest::subjectInfoOrdered ( ) const

Information on the subject of the certificate being requested, as an ordered list (QList of CertificateInfoPair).

Note
this only applies to PKCS#10 format certificate requests
See also
subjectInfo for a version that does not maintain order, but allows access based on a multimap.
CertificateInfoPair for the elements in the list

◆ subjectPublicKey()

PublicKey QCA::CertificateRequest::subjectPublicKey ( ) const

The public key belonging to the issuer.

◆ toDER()

QByteArray QCA::CertificateRequest::toDER ( ) const

Export the Certificate Request into a DER format.

Note
this only applies to PKCS#10 format certificate requests

◆ toPEM()

QString QCA::CertificateRequest::toPEM ( ) const

Export the Certificate Request into a PEM format.

Note
this only applies to PKCS#10 format certificate requests

◆ toPEMFile()

bool QCA::CertificateRequest::toPEMFile ( const QString & fileName) const

Export the Certificate into PEM format in a file.

Parameters
fileNamethe name of the file to use
Note
this only applies to PKCS#10 format certificate requests

◆ toString()

QString QCA::CertificateRequest::toString ( ) const

Export the CertificateRequest to a string.

Returns
the string corresponding to the certificate request
Note
this only applies to SPKAC format certificate requests

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 Fri Nov 29 2024 11:48:56 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.