haiku/headers/os/net/Certificate.h
Adrien Destugues 4849ab6c8b BHttpRequest: add SSL certificate exception management.
When an HTTPS request uses an SSL certificate that OpenSSL considers
untrusted, and the user decides to continue anyway, add the certificate
to an exception list. Match certificates against this list and don't ask
the user again if they are already there.

Fixes #12004. Thanks to markh for the initial patch and peeking into the
WebKit code!
2015-11-09 10:46:58 +01:00

43 lines
730 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(const BCertificate& other);
~BCertificate();
int Version() const;
time_t StartDate() const;
time_t ExpirationDate() const;
bool IsValidAuthority() const;
bool IsSelfSigned() const;
BString Issuer() const;
BString Subject() const;
BString SignatureAlgorithm() const;
BString String() const;
bool operator==(const BCertificate& other) const;
private:
friend class BSecureSocket::Private;
class Private;
BCertificate(Private* data);
Private* fPrivate;
};
#endif