Task #34
closedGenerate API information
Added by Felix Tiede over 12 years ago. Updated almost 12 years ago.
Description
Create definitve API from which to start development of the library's unit tests and internal coding.
Updated by Felix Tiede over 12 years ago
- Due date changed from 02/11/2013 to 02/18/2013
- Status changed from New to In Progress
- % Done changed from 0 to 10
Definitely required is the following API:
namespace Kca {
namespace OpenSSL {
enum Digest;
enum RevocationReason;
struct X509Extension {
bool replace;
bool critical;
QString name;
QString value;
};
typedef QList< X509Extension > ExtensionList;
struct CRLEntry {
quint64 serial;
RevocationReason reason;
QDateTime revoked;
};
typedef QList< CRLEntry > CRL;
quint64 random();
const QSslKey generateKeyPair(const int length=2048);
const ExtensionList emailCertExtensions();
const QString requestSubject(const QByteArray& request);
const ExtensionList requestExtensions(const QByteArray& request);
class Certificate : public QSslCertificate
{
public:
struct SignatureDetails {
quint64 serial;
Digest digest;
QDateTime effectiveDate;
QDateTime expiryDate;
};
const QSslCertificate sign(const QByteArray& request, const QSslKey& signingKey,
const SignatureDetails& details,
const ExtensionList& extensions) const;
const QByteArray sign(const CRL& crl, const QSslKey& signingkey,
const SignatureDetails& details,
const ExtensionList& extensions) const;
}; // End class Certificate
}; // End namespace OpenSSL
}; // End namespace Kca
Updated by Felix Tiede over 12 years ago
- Due date changed from 02/18/2013 to 02/11/2013
- Status changed from In Progress to Completed
- % Done changed from 10 to 100
Added methods to extract information from certificate signing requests, see #34-1 (comment 1).
Updated by Felix Tiede over 12 years ago
- Due date set to 02/13/2013
- Status changed from Completed to In Progress
- % Done changed from 0 to 80
It might be a good idea - based on what can wrong during signing operations to create an exception which carries detailed information back to the caller about what went wrong.
Something like this:
namespace Kca {
namespace OpenSSL {
class SignatureException : public exception {
public:
enum Operation {
signCsr,
signCrl,
};
enum Failure {
KeyMismatch,
Timeconstraint,
ObjectError,
};
Operation operation();
Failure failure();
char* description();
};
};
};
Updated by Felix Tiede over 12 years ago
- Status changed from In Progress to Closed
- % Done changed from 80 to 100
Applied in changeset libkca_ossl|78c84fee87923588145b88d82092f3201842c7e2.
Updated by Felix Tiede over 12 years ago
Latest API can be found in the wiki at API.
Updated by Felix Tiede almost 12 years ago
Updated API to follow latest changes in 2.0 release tree.
Updated by Felix Tiede almost 12 years ago
Following Qt coding styles returned objects are no longer const.