Contents

CertificateRequestBuilder Class Reference

The CertificateRequestBuilder class is a tool for creating certificate signing requests. More...

    #include <CertificateRequestBuilder>

Public Functions

CertificateRequestBuilder ()
~CertificateRequestBuilder ()
bool addNameEntry ( Certificate::EntryType type, const QByteArray & value )
bool addNameEntry ( const QByteArray & oid, const QByteArray & value, bool raw = false )
bool addSubjectAlternativeNameEntry ( QSsl::AlternateNameEntryType type, const QByteArray & value )
int error () const
QString errorString () const
QList<QByteArray> nameEntryAttributes ()
QStringList nameEntryInfo ( Certificate::EntryType attribute )
QStringList nameEntryInfo ( const QByteArray & oid )
bool setKey ( const QSslKey & qkey )
bool setVersion ( int version )
CertificateRequest signedRequest ( const QSslKey & qkey )
int version () const

Detailed Description

The CertificateRequestBuilder class is a tool for creating certificate signing requests.

Member Function Documentation

CertificateRequestBuilder::CertificateRequestBuilder ()

CertificateRequestBuilder::~CertificateRequestBuilder ()

bool CertificateRequestBuilder::addNameEntry ( Certificate::EntryType type, const QByteArray & value )

bool CertificateRequestBuilder::addNameEntry ( const QByteArray & oid, const QByteArray & value, bool raw = false )

bool CertificateRequestBuilder::addSubjectAlternativeNameEntry ( QSsl::AlternateNameEntryType type, const QByteArray & value )

int CertificateRequestBuilder::error () const

Returns the last error that occurred when using this object. The values used are those of gnutls. If there has not been an error then it is guaranteed to be 0.

QString CertificateRequestBuilder::errorString () const

Returns a string describing the last error that occurred when using this object.

QList<QByteArray> CertificateRequestBuilder::nameEntryAttributes ()

Returns the list of attributes that are present in this requests distinguished name. The attributes are returned as OIDs.

QStringList CertificateRequestBuilder::nameEntryInfo ( Certificate::EntryType attribute )

Returns the list of entries for the attribute specified.

QStringList CertificateRequestBuilder::nameEntryInfo ( const QByteArray & oid )

Returns the list of entries for the attribute specified by the oid.

bool CertificateRequestBuilder::setKey ( const QSslKey & qkey )

Sets the key that will be used for the reqest.

bool CertificateRequestBuilder::setVersion ( int version )

Set the version of the certificate signing request. This should generally be set to 1.

See also version().

CertificateRequest CertificateRequestBuilder::signedRequest ( const QSslKey & qkey )

Signs the request with the specified key and returns the signed request.

int CertificateRequestBuilder::version () const

Returns the version of the certificate signing request.

See also setVersion().