BCertificate: fixup the API

* Add an operator== and a copy constructor
* Make the getters const so they are easier to use
This commit is contained in:
Adrien Destugues
2015-11-08 23:47:29 +01:00
parent ba307a12db
commit 6c32f50a64
3 changed files with 61 additions and 30 deletions
+12 -12
View File
@@ -12,30 +12,30 @@
class BCertificate {
public:
BCertificate(const BCertificate& other);
~BCertificate();
int Version();
int Version() const;
time_t StartDate();
time_t ExpirationDate();
time_t StartDate() const;
time_t ExpirationDate() const;
bool IsValidAuthority();
bool IsSelfSigned();
bool IsValidAuthority() const;
bool IsSelfSigned() const;
BString Issuer();
BString Subject();
BString SignatureAlgorithm();
BString Issuer() const;
BString Subject() const;
BString SignatureAlgorithm() const;
BString String();
BString String() const;
bool operator==(const BCertificate& other);
private:
friend class BSecureSocket::Private;
class Private;
BCertificate(Private* data);
BCertificate(const BCertificate& other);
// copy-construction not allowed
Private* fPrivate;
};