2014-01-15 20:39:06 +04:00
|
|
|
/*
|
|
|
|
* 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:
|
2015-11-09 01:43:38 +03:00
|
|
|
BCertificate(const BCertificate& other);
|
2014-01-15 20:39:06 +04:00
|
|
|
~BCertificate();
|
|
|
|
|
2015-11-09 01:43:38 +03:00
|
|
|
int Version() const;
|
|
|
|
|
|
|
|
time_t StartDate() const;
|
|
|
|
time_t ExpirationDate() const;
|
2014-01-15 20:39:06 +04:00
|
|
|
|
2015-11-09 01:43:38 +03:00
|
|
|
bool IsValidAuthority() const;
|
|
|
|
bool IsSelfSigned() const;
|
2014-11-04 17:34:19 +03:00
|
|
|
|
2015-11-09 01:43:38 +03:00
|
|
|
BString Issuer() const;
|
|
|
|
BString Subject() const;
|
|
|
|
BString SignatureAlgorithm() const;
|
2014-11-04 17:34:19 +03:00
|
|
|
|
2015-11-09 01:43:38 +03:00
|
|
|
BString String() const;
|
2014-11-04 17:34:19 +03:00
|
|
|
|
2015-11-09 12:46:58 +03:00
|
|
|
bool operator==(const BCertificate& other) const;
|
2014-01-15 20:39:06 +04:00
|
|
|
|
|
|
|
private:
|
|
|
|
friend class BSecureSocket::Private;
|
|
|
|
class Private;
|
|
|
|
BCertificate(Private* data);
|
|
|
|
|
|
|
|
Private* fPrivate;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|