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