1/* 2 * Copyright 2014 Haiku, Inc. 3 * Distributed under the terms of the MIT License. 4 */ 5#ifndef _CERTIFICATE_H 6#define _CERTIFICATE_H 7 8 9#include <SecureSocket.h> 10#include <String.h> 11 12 13class BCertificate { 14public: 15 BCertificate(const BCertificate& other); 16 ~BCertificate(); 17 18 int Version() const; 19 20 time_t StartDate() const; 21 time_t ExpirationDate() const; 22 23 bool IsValidAuthority() const; 24 bool IsSelfSigned() const; 25 26 BString Issuer() const; 27 BString Subject() const; 28 BString SignatureAlgorithm() const; 29 30 BString String() const; 31 32 bool operator==(const BCertificate& other) const; 33 34private: 35 friend class BSecureSocket::Private; 36 class Private; 37 BCertificate(Private* data); 38 39 Private* fPrivate; 40}; 41 42#endif 43