xref: /openbmc/bmcweb/http/mutual_tls.hpp (revision 40e9b92ec19acffb46f83a6e55b18974da5d708e)
1 // SPDX-License-Identifier: Apache-2.0
2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors
3 #pragma once
4 
5 #include "persistent_data.hpp"
6 
7 #include <boost/asio/ip/address.hpp>
8 #include <boost/asio/ssl/verify_context.hpp>
9 
10 #include <memory>
11 #include <string_view>
12 
13 std::string getUsernameFromCommonName(std::string_view commonName);
14 
15 std::shared_ptr<persistent_data::UserSession>
16     verifyMtlsUser(const boost::asio::ip::address& clientIp,
17                    boost::asio::ssl::verify_context& ctx);
18