ability to change ca option back to user

svn path=/trunk/kdesupport/qca/; revision=440368
This commit is contained in:
Justin Karneges 2005-07-30 09:13:13 +00:00
parent acabfd9986
commit ac7b41cfcd
2 changed files with 15 additions and 5 deletions

View File

@ -190,7 +190,7 @@ namespace QCA
/** /**
Information on the subject of the certificate Information on the subject of the certificate
\sa setIn \sa setInfo
*/ */
CertificateInfo info() const; // request or create CertificateInfo info() const; // request or create
@ -205,10 +205,10 @@ namespace QCA
QStringList policies() const; // request or create QStringList policies() const; // request or create
/** /**
test if the certificate options include the certificate being a test if the certificate is a CA cert
certificate authority
\sa setAsCA \sa setAsCA
\sa setAsUser
*/ */
bool isCA() const; // request or create bool isCA() const; // request or create
@ -267,13 +267,17 @@ namespace QCA
void setPolicies(const QStringList &policies); void setPolicies(const QStringList &policies);
/** /**
set the certificate options to include the certificate being set the certificate to be a CA cert
a certificate authority
\param pathLimit the number of intermediate certificates allowable \param pathLimit the number of intermediate certificates allowable
*/ */
void setAsCA(int pathLimit = 8); // value from Botan void setAsCA(int pathLimit = 8); // value from Botan
/**
set the certificate to be a user cert (this is the default)
*/
void setAsUser();
/** /**
Set the serial number property on this certificate Set the serial number property on this certificate

View File

@ -171,6 +171,12 @@ void CertificateOptions::setAsCA(int pathLimit)
d->pathLimit = pathLimit; d->pathLimit = pathLimit;
} }
void CertificateOptions::setAsUser()
{
d->isCA = false;
d->pathLimit = 0;
}
void CertificateOptions::setSerialNumber(const QBigInteger &i) void CertificateOptions::setSerialNumber(const QBigInteger &i)
{ {
d->serial = i; d->serial = i;