diff options
author | lloyd <[email protected]> | 2014-01-10 03:41:59 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2014-01-10 03:41:59 +0000 |
commit | 6894dca64c04936d07048c0e8cbf7e25858548c3 (patch) | |
tree | 5d572bfde9fe667dab14e3f04b5285a85d8acd95 /src/lib/cert/x509/ocsp.h | |
parent | 9efa3be92442afb3d0b69890a36c7f122df18eda (diff) |
Move lib into src
Diffstat (limited to 'src/lib/cert/x509/ocsp.h')
-rw-r--r-- | src/lib/cert/x509/ocsp.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/src/lib/cert/x509/ocsp.h b/src/lib/cert/x509/ocsp.h new file mode 100644 index 000000000..b2a06b9a4 --- /dev/null +++ b/src/lib/cert/x509/ocsp.h @@ -0,0 +1,61 @@ +/* +* OCSP +* (C) 2012 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ + +#ifndef BOTAN_OCSP_H__ +#define BOTAN_OCSP_H__ + +#include <botan/cert_status.h> +#include <botan/ocsp_types.h> + +namespace Botan { + +class Certificate_Store; + +namespace OCSP { + +class BOTAN_DLL Request + { + public: + Request(const X509_Certificate& issuer_cert, + const X509_Certificate& subject_cert) : + m_issuer(issuer_cert), + m_subject(subject_cert) + {} + + std::vector<byte> BER_encode() const; + + std::string base64_encode() const; + + const X509_Certificate& issuer() const { return m_issuer; } + + const X509_Certificate& subject() const { return m_subject; } + private: + X509_Certificate m_issuer, m_subject; + }; + +class BOTAN_DLL Response + { + public: + Response(const Certificate_Store& trusted_roots, + const std::vector<byte>& response); + + Certificate_Status_Code status_for(const X509_Certificate& issuer, + const X509_Certificate& subject) const; + + private: + std::vector<SingleResponse> m_responses; + }; + +BOTAN_DLL Response online_check(const X509_Certificate& issuer, + const X509_Certificate& subject, + const Certificate_Store* trusted_roots); + +} + +} + +#endif |