haiku/headers/os/net/Certificate.h
Adrien Destugues c86ad7f93b 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.
2014-11-06 15:01:59 +01:00

43 lines
662 B
C++

/*
* Copyright 2014 Haiku, Inc.
* Distributed under the terms of the MIT License.
*/
#ifndef _CERTIFICATE_H
#define _CERTIFICATE_H
#include <SecureSocket.h>
#include <String.h>
class BCertificate {
public:
~BCertificate();
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;
class Private;
BCertificate(Private* data);
BCertificate(const BCertificate& other);
// copy-construction not allowed
Private* fPrivate;
};
#endif