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:
@@ -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;
|
||||
|
||||
@@ -21,7 +21,7 @@ public:
|
||||
virtual ~BSecureSocket();
|
||||
|
||||
virtual bool CertificateVerificationFailed(BCertificate&
|
||||
certificate);
|
||||
certificate, const char* message);
|
||||
|
||||
// BSocket implementation
|
||||
|
||||
|
||||
Reference in New Issue
Block a user