blob: d9e2704e1081032a9aa0e77db6e6ad59a0ec283a (
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
|
/*
* Copyright (c) 2012 Isode Limited, London, England.
* Licensed under the simplified BSD license.
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
#pragma once
#include <Swiften/Base/SafeByteArray.h>
#include <Swiften/TLS/CertificateWithKey.h>
#define SECURITY_WIN32
#include <Windows.h>
#include <WinCrypt.h>
namespace Swift {
class CAPICertificate : public Swift::CertificateWithKey {
public:
CAPICertificate(const std::string& capiUri);
virtual ~CAPICertificate();
virtual bool isNull() const;
const std::string& getCertStoreName() const;
const std::string& getCertName() const;
private:
void setUri (const std::string& capiUri);
private:
bool valid_;
std::string uri_;
HCERTSTORE certStoreHandle_;
/* Parsed components of the uri_ */
std::string certStore_;
std::string certName_;
};
}
|