Add more features in BCertificate class

* Make it possible to extract more useful data from the certificate
* Also get the OpenSSL error message when a certificate can't be
validated. Send it to the verification failure callback so it can be
shown to the user.
This commit is contained in:
Adrien Destugues
2014-11-06 15:01:59 +01:00
parent 3b657701db
commit c86ad7f93b
4 changed files with 91 additions and 23 deletions
+8 -1
View File
@@ -14,12 +14,19 @@ class BCertificate {
public:
~BCertificate();
BString String();
int Version();
time_t StartDate();
time_t ExpirationDate();
bool IsValidAuthority();
bool IsSelfSigned();
BString Issuer();
BString Subject();
BString SignatureAlgorithm();
BString String();
private:
friend class BSecureSocket::Private;
+1 -1
View File
@@ -21,7 +21,7 @@ public:
virtual ~BSecureSocket();
virtual bool CertificateVerificationFailed(BCertificate&
certificate);
certificate, const char* message);
// BSocket implementation