blob: ad2d2cf81c3c5f20750e1fffbf1f61d5395afd0f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
/*
* OCSP
* (C) 2012 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
#ifndef BOTAN_OCSP_H__
#define BOTAN_OCSP_H__
#include <botan/ocsp_types.h>
#include <botan/certstor.h>
namespace Botan {
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);
bool affirmative_response_for(const X509_Certificate& issuer,
const X509_Certificate& subject) const;
private:
std::vector<SingleResponse> m_responses;
};
}
}
#endif
|