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 13 class BCertificate { 14 public: 15 ~BCertificate(); 16 17 int Version(); 18 19 time_t StartDate(); 20 time_t ExpirationDate(); 21 22 bool IsValidAuthority(); 23 bool IsSelfSigned(); 24 25 BString Issuer(); 26 BString Subject(); 27 BString SignatureAlgorithm(); 28 29 BString String(); 30 31 private: 32 friend class BSecureSocket::Private; 33 class Private; 34 BCertificate(Private* data); 35 36 BCertificate(const BCertificate& other); 37 // copy-construction not allowed 38 39 Private* fPrivate; 40 }; 41 42 #endif 43