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:
|
|
|
|
~BCertificate();
|
|
|
|
|
2014-11-04 17:34:19 +03:00
|
|
|
int Version();
|
2014-01-15 20:39:06 +04:00
|
|
|
|
2014-01-16 12:41:01 +04:00
|
|
|
time_t StartDate();
|
|
|
|
time_t ExpirationDate();
|
2014-11-04 17:34:19 +03:00
|
|
|
|
|
|
|
bool IsValidAuthority();
|
|
|
|
bool IsSelfSigned();
|
|
|
|
|
2014-01-15 20:39:06 +04:00
|
|
|
BString Issuer();
|
|
|
|
BString Subject();
|
2014-11-04 17:34:19 +03:00
|
|
|
BString SignatureAlgorithm();
|
|
|
|
|
|
|
|
BString String();
|
2014-01-15 20:39:06 +04:00
|
|
|
|
|
|
|
private:
|
|
|
|
friend class BSecureSocket::Private;
|
|
|
|
class Private;
|
|
|
|
BCertificate(Private* data);
|
|
|
|
|
2014-02-22 14:59:04 +04:00
|
|
|
BCertificate(const BCertificate& other);
|
|
|
|
// copy-construction not allowed
|
|
|
|
|
2014-01-15 20:39:06 +04:00
|
|
|
Private* fPrivate;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|