blob: 3f24c2f429db6b27a89ffb050f2f1ddaa057a21b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "transport_security_options.h"
#include <memory>
namespace vespalib::net::tls {
// TODO consider renaming TransportSecurityOptions -> TlsConfig
/**
* Throws IoException if file_path or any files referenced by it can't be accessed
* Throws IllegalArgumentException if file is not parseable as a valid TLS config file or
* if mandatory JSON fields are missing or incomplete.
*/
std::unique_ptr<TransportSecurityOptions> read_options_from_json_file(const vespalib::string& file_path);
// Same properties as read_options_from_json_file()
std::unique_ptr<TransportSecurityOptions> read_options_from_json_string(const vespalib::string& json_data);
}
|