summaryrefslogtreecommitdiffstats
blob: 303bcf7784aac58b85ed512b27c11bba1bb2d506 (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
/*
 * Copyright (c) 2010-2018 Isode Limited.
 * All rights reserved.
 * See the COPYING file for more information.
 */

#include <Swiften/TLS/CertificateFactory.h>

#include <cassert>
#include <memory>
#include <sstream>
#include <string>

#include <boost/algorithm/string/predicate.hpp>
#include <boost/optional.hpp>

#include <Swiften/Base/Log.h>
#include <Swiften/StringCodecs/Base64.h>
#include <Swiften/TLS/PrivateKey.h>

namespace Swift {

CertificateFactory::~CertificateFactory() {
}

std::vector<Certificate::ref> CertificateFactory::createCertificateChain(const ByteArray& /* data */) {
    assert(false);
    return std::vector<Certificate::ref>();
}

PrivateKey::ref CertificateFactory::createPrivateKey(const SafeByteArray& data, boost::optional<SafeByteArray> password) {
    return std::make_shared<PrivateKey>(data, password);
}

}